# Install USB Relay on a Raspberry Pi

> Pick a Raspberry Pi model, image the SD card with Raspberry Pi OS Lite, and install the arm64 USB Relay package on it.

A Raspberry Pi is a common, low-cost way to run USB Relay near the Stream Decks it's relaying: this guide covers choosing a model, imaging the SD card, and getting it ready for the software. Installing and managing the software itself is identical to [Install USB Relay on Linux](/docs/buttons/v1.10/integrations/usb-relay/linux), so this page links there rather than repeating those steps.

## Choose a model

USB Relay only needs a 64-bit ARM Raspberry Pi (the current package targets arm64) and isn't especially memory-hungry: a 4GB model comfortably covers most setups. As an informal guideline from Bitfocus' own testing, not an exhaustive benchmark:

| Model | Test case | Recommendation |
| --- | --- | --- |
| 3B, 1GB | 15 buttons | A single Stream Deck with feedbacks that don't need high frame rates; avoid scrolling text. |
| 4B, 4GB | 42 buttons | Comfortably handles 1–3 Stream Decks depending on model. |
| 5, 8GB | 50–100+ buttons | Should suffice for most setups: you're more likely to be limited by available USB power than the Pi itself. If you need more than 4 USB ports, use a powered hub and confirm it's compatible with your Pi first. |

If in doubt, test with your actual hardware and button count rather than relying on this table alone.

## Image the SD card

1. Download **Raspberry Pi Imager** from [raspberrypi.com/software](https://www.raspberrypi.com/software/) and insert your SD card.
2. Select your Raspberry Pi model.
3. Choose **Raspberry Pi OS (other)** → **Raspberry Pi OS Lite (64-bit)**: a CLI-only image keeps boot time and resource use down, and USB Relay has no need for a desktop environment.

![Raspberry Pi Imager's Choose operating system step inside Raspberry Pi OS (other), listing Raspberry Pi OS Lite (64-bit), a port of Debian Trixie with no desktop environment, above Raspberry Pi OS Full (64-bit)](https://bitfocus.io/api/docs-media/file/imager-os-lite.png?prefix=docs-media)

4. Select your SD card (double check you haven't selected another connected drive by mistake).

![Raspberry Pi Imager's Select your storage device step showing a single 29.7 GB card reader, with Exclude system drives ticked](https://bitfocus.io/api/docs-media/file/imager-storage.png?prefix=docs-media)

5. Set a **Hostname**: this also becomes the relay's name when it shows up in Buttons, so make it something recognizable.

![Raspberry Pi Imager's Customisation: Choose hostname step with the hostname USB-Relay-1](https://bitfocus.io/api/docs-media/file/imager-hostname.png?prefix=docs-media)

6. Set your localization settings.
7. Set a username and password for the Pi's admin account, and record it somewhere safe.
8. Configure Wi-Fi if you're not using a wired connection.
9. Enable **SSH**, with password authentication or a key pair as you prefer.

![Raspberry Pi Imager's Customisation: SSH authentication step with Enable SSH on and Use password authentication selected](https://bitfocus.io/api/docs-media/file/imager-ssh.png?prefix=docs-media)

10. Write the image, then move the card to the Pi, connect it to the network, and plug in your Stream Deck and power supply.

## Connect and install

1. Connect to the Pi, either over SSH or with Raspberry Pi Connect (a remote-access service from the Raspberry Pi Foundation, useful if the Pi isn't on your local network):

```bash
ssh <username>@<ip of the Pi>
```

2. Download the arm64 USB Relay package and transfer the `.deb` file to the Pi (an SFTP client such as FileZilla, connecting to `sftp://<pi ip>:22`, works well for this).
3. Install it exactly as on any other Linux system:

```bash
sudo apt install ./bitfocus-buttons-usb-relay-headless_*.deb
```

4. Confirm it started:

```bash
systemctl status bitfocus-buttons-usb-relay
```

   The service should show as **active (running)**:

![A remote shell on a Pi named USB-Relay-1 showing systemctl status for bitfocus-buttons-usb-relay.service, loaded and active (running), followed by recent log lines](https://bitfocus.io/api/docs-media/file/relay-service-status.png?prefix=docs-media)

From here, everything else (checking logs, configuring outbound connection mode, managing the service, uninstalling, and handling a Buttons certificate change) is exactly as described in [Install USB Relay on Linux](/docs/buttons/v1.10/integrations/usb-relay/linux).

## If you get stuck

| What you see | What to try |
| --- | --- |
| The Pi feels underpowered for your button count. | Compare your setup against the model guidance above, and consider a higher-memory model or fewer Stream Decks per Pi. |
| USB devices behave inconsistently with several Stream Decks attached. | Use a powered USB hub, and confirm it's actually compatible with your specific Pi model before assuming the software is at fault. |
| Everything past installation: service status, logs, discovery, uninstall. | See [Install USB Relay on Linux](/docs/buttons/v1.10/integrations/usb-relay/linux); the software behaves identically once installed. |

## Where to go next

- [Install USB Relay on Linux](/docs/buttons/v1.10/integrations/usb-relay/linux)
- [Add and attach a surface](/docs/buttons/v1.10/surfaces/add-and-attach-a-surface)
