Skip to content

Instantly share code, notes, and snippets.

@snixon
Last active November 6, 2025 16:50
Show Gist options
  • Save snixon/3d1d59f1a7623b97895318d1c8ed12b8 to your computer and use it in GitHub Desktop.
Save snixon/3d1d59f1a7623b97895318d1c8ed12b8 to your computer and use it in GitHub Desktop.
Notes on using a Raspberry Pi Zero 2w as a headless plexamp client
# Headless Plexamp setup with an RPI0-2w
## Hardware
* RPI-0 2w
* USB soundcard (Fosi Audio MC331 in my case)
## Goal
* Teeny-tiny player to use as a streaming target for plexamp and airplay
## OS
* Raspberry Pi OS Lite (64bit)
Do a regular install, get your Pi on the network and normally operational.
## Software Prereqs
### NodeJS 20
```bash
# Add Node repo, keys and set version
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install -y nodejs
```
### Shairport-sync (for Airplay if you want it)
```bash
sudo apt update
sudo apt install -y shairport-sync
```
### Plexamp
1. Grab the headless plexamp package, move it to your RPI
2. Unpack it, your homedir is fine
```bash
curl -o plexamp-headless.tar.bz2 https://plexamp.plex.tv/headless/Plexamp-Linux-headless-v4.12.4.tar.bz2
tar -xjvf plexamp-headless.tar.bz2
```
3. Edit plexamp/plexamp.service
a. Change all instances of /home/pi to match your own username eg: /home/my_user
4. Copy the plexamp.service file to /etc/systemd/system
5. Enable and start the service: `sudo systemctl daemon-reload && sudo systemctl enable plexamp`
### IMPORTANT: Fix the USB audio on the Pi
The default config for the zero 2 pi enables the HDMI audio channel, we need to fix this
```bash
# Edit the config.txt
sudo vi /boot/firmware/config.txt
# Disable the onboard audio:
# Comment out the line dtparam=audio=on -> #dtparam=audio=on
# Change the HDMI driver to disable the audio channel:
# dtoverlay=vc4-kms-v3d -> dtoverlay=vc4-kms-v3d,noaudio
```
Restart the Pi
### Plexamp setup
1. Go to https://plex.tv/claim and get a claim token
2. Go to your home directory and run: `node plexamp/js/index.js`
3. Enter your claim code there. You should be ready
### Final Thoughts
You should now be able to run `lsusb` and see your USB soundcard, `aplay -l` should also list your device
If you can't see them, you need to troubleshoot USB issues:
Is the cable you used charge only?
Did you plug your usb cable into the usb port closest to the HDMI connector? (The other is power only)
That's it, have fun.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment