Turn a Raspberry Pi into a Snapcast server that accepts AirPlay & Spotify Connect streams (from any smartphone and Laptop / PC) and re‑distributes them to any Snapclients you add later. The server itself also runs the first Snapclient, giving you an instant master room.
The Hardware if have choosen here is to power some biger passive Speakers using Amp4 and some smaller passive Speakers using the miniAmp.
NOTE: This is a basic setup to stream music via airplay (1 & 2) and spotify connect. You ca add more streams follwing the snapcast docs here: https://github.com/badaix/snapcast
| Component | Version / Role |
|---|---|
| Raspberry Pi OS Lite/Debian | Bookworm / operating system |
| Snapserver | 0.31.0 / recives and distributes streams |
| Snapclient | 0.31.0 / recives and plays streams |
| Shairport‑Sync | 4.3.x / handles airplay 1+2 |
| Libresport | x.x / handles spotify connect |
| Device overlay | HiFiBerry Amp4 Pro / hardware driver (swap for your own overlay if needed) |
| Beatnik Hardware API | x.x / soundcard management & hardware control, works together with CamillaDSP |
| Docker | x.x –Containerize & host controller |
| Part | Notes | Image |
|---|---|---|
| Pi 5 | Raspberry Pi OS Lite 64‑bit Bookworm recommended | ![]() |
| HiFiBerry Amp4 Pro | Just Plug it on your GPIOs | ![]() |
| Power Supply | Amp4 is powered via DC and the pi via GPIO | |
| 3d Printed Custom Case | Currently working on cases, check our subbredit r/beatnikAudio to see the progress. |
| Part | Notes |
|---|---|
| Pi Zero 2 WH | Raspberry Pi OS Lite 64‑bit Bookworm recommended |
| HifiBerry Mini Amp | Just Plug it on your GPIOs |
| Power Supply | Amp is powered via GPIO |
| 3d Printed Custom Case | Currently working on cases, check our subbredit r/beatnikAudio to see the progress. |
-
Download Raspberry Pi Imager.
-
Select Raspberry Pi OS Lite (64‑bit, Bookworm).
-
In OS customisation:
- Enable SSH and add your credentials (eg. user: beatnik, pw: changeMe)
- Hostname:
beatnik-server - (Optional) enter Wi‑Fi credentials if you plan using Wi-Fi
-
Flash the card, insert it, boot up the Pi.
ssh beatnik@beatnik-server.local
sudo apt update && sudo apt full-upgrade -yNOTE: If you're using a diffent soundcard (DAC/amp) check the soundcard folder in the docs
Based on hifi berry docs: https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/
sudo nano /boot/firmware/config.txtRemove the line:
dtparam=audio=on
Add instead:
dtoverlay=hifiberry-amp4proScorll down and find this line:
dtoverlay=vc4-kms-v3d
add "noaudio" and makesure it looks exactly like this:
dtoverlay=vc4-kms-v3d,noaudio
Reboot,
sudo reboot
SSH back in,then verify:
aplay -l # must list "sndrpihifiberry"cd /tmp
wget https://github.com/badaix/snapcast/releases/download/v0.31.0/snapserver_0.31.0-1_arm64_bookworm.deb https://github.com/badaix/snapcast/releases/download/v0.31.0/snapclient_0.31.0-1_arm64_bookworm.deb
sudo apt install ./snapserver_* ./snapclient_* -ysudo apt install shairport-sync -y # v4.3.xKeep its systemd service disabled – Snapserver will spawn its own instance.
sudo systemctl disable shairport-sync.serviceI had some issues with installing librespot on debian boowkworm. To install libresport withouht issues we will workaround using raspotify & afteerwards disable it.
Run the installation script:
sudo apt-get -y install curl && curl -sL https://dtcooper.github.io/raspotify/install.sh | shDisable raspotify: (snapcast will spawn its own instance)
sudo systemctl disable raspotify
sudo systemctl stop raspotifysudo nano /etc/snapserver.confIn the strream section add your streams as follows: (if you have trouble setting up your streams consult the sample snapserver.conf in this repo docs/sample-configs/sample-snapserver.conf)
More details here: https://github.com/badaix/snapcast/blob/develop/doc/configuration.md#airplay
[stream]
source = airplay:///usr/bin/shairport-sync?name=AirPlay&devicename=Beatnik-Airplay1&port=5000More details here: https://github.com/badaix/snapcast/blob/develop/doc/configuration.md#airplay
[stream]
source = airplay:///shairport-sync?name=AirPlay2&devicename=Beatnik-Airplay2&port=7000Find options for device names etc here: https://github.com/badaix/snapcast/blob/develop/doc/configuration.md
[stream]
source = spotify:///librespot?name=Spotify&devicename=Beatnik-SpotifyAudio is processed by CamillaDSP before it reaches your amp (see step 9 & camilla-dsp.md), so Snapclient must send its audio into a virtual ALSA Loopback device instead of directly to your amp's sound card.
sudo usermod -aG audio snapclient # grant ALSA access
# Create the virtual loopback cable Snapclient -> CamillaDSP
sudo modprobe snd-aloop
echo "snd-aloop" | sudo tee /etc/modules-load.d/snd-aloop.conf > /dev/null
sudo tee /etc/snapclient.conf >/dev/null <<'EOF'
[snapclient]
host = localhost
sound_device = plughw:Loopback,0,0
# buffer = 80 # optional client buffer (ms)
EOFCamillaDSP (not Snapclient) needs to know your amp's real soundcard, since it sits between the Loopback device and the amp. Check for your soundcard number:
aplay -l Should list your soundcard like this:
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: DigiAMP [RPi DigiAMP+], device 0: Raspberry Pi DigiAMP+ HiFi pcm512x-hifi-0 [Raspberry Pi DigiAMP+ HiFi pcm512x-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
In this example our amp is card 1 (DigiAMP). Use that card name/number as the playback device in CamillaDSP's config — continue with camilla-dsp.md to finish wiring CamillaDSP's capture (hw:Loopback,1,0) to this playback device.
sudo systemctl enable --now snapserver snapclientReboot the pi:
sudo rebootCheck live logs:
journalctl -u snapserver -f
journalctl -u snapclient -f # “… Connected to … hw:0,0 …”
For more information check the controller repo here: https://github.com/byrdsandbytes/beatnik-controller
Docker & docker compose. If you have trouble setting up docker compose check our guide: DOCKER_INSTALLATION.md
Clone the repo:
git clone https://github.com/byrdsandbytes/beatnik-controller.git
cd beatnik-controllerdocker compose up -dThis will build the Docker image and start the application in the background.
Open your web browser and navigate to http://localhost:8181, http://beatnik-server.local:8181 or http://your-hostname.local:8181. You should now see the Beatnik Controller interface.
Open http://beatnik-server.local:1780
- Streams – should list AirPlay
- Clients – should list audiopi with live meters & volume
The Beatnik Hardware API is a small Node.js service that exposes hardware control & status (e.g. amp status) over HTTP. Full details are in the beatnik-hardware-api repo.
Soundcard management: The Hardware API takes over soundcard management (device selection & output routing) in combination with CamillaDSP (see step 5 & camilla-dsp.md). CamillaDSP handles the audio processing/EQ pipeline, while the Hardware API coordinates which soundcard/output it routes to, so install both together rather than configuring the soundcard manually afterwards.
- Node.js 22 — installed automatically via NVM by the setup script below (or manually, see the repo's guide, if you prefer)
mkdir -p ~/beatnik-hardware-api
cd ~/beatnik-hardware-api
wget https://raw.githubusercontent.com/byrdsandbytes/beatnik-hardware-api/master/setup.sh
chmod +x setup.sh
./setup.shThe script downloads the latest release artifact, installs Node.js 22 via NVM (if not already present), installs production dependencies, and installs/starts the beatnik-hardware.service systemd unit.
Prefer building from source instead? See Method 2: Manual Source Installation in the beatnik-hardware-api installation guide.
sudo systemctl status beatnik-hardware.service
curl http://localhost:3000/api/hardware/statusThe Beatnik Bleno service exposes Beatnik over Bluetooth Low Energy (BLE) for setup/control. Full details are in the beatnik-bleno repo.
- Node.js 22 — installed automatically via NVM by the setup script below (or manually, see the repo's guide, if you prefer)
mkdir -p ~/beatnik-bleno
cd ~/beatnik-bleno
wget https://raw.githubusercontent.com/byrdsandbytes/beatnik-bleno/master/setup.sh
chmod +x setup.sh
./setup.shThe script downloads the latest release artifact, installs Node.js 22 via NVM (if not already present), installs production dependencies, and installs/starts the beatnik-bleno.service systemd unit.
Prefer building from source instead? See Method 2: Manual Source Installation in the beatnik-bleno installation guide.
sudo systemctl status beatnik-bleno.service
sudo journalctl -u beatnik-bleno.service -f # verify Bluetooth advertising and connections- macOS / appple music → AirPlay
- iPhone / iPad → apple music → AirPlay Snapweb flips to playing and audio starts after ≈ 0.4 s.
On another Pi (e.g. Pi Zero 2 W + MiniAmp):
Imager settings
OS : Raspberry Pi OS Lite (32‑bit, Bookworm)
Hostname : pizero-mini # must be unique
SSH : enabled
Wi‑Fi : your credentials
ssh pi@pizero-mini.local
sudo passwd pi
sudo apt update && sudo apt full-upgrade -y(Depending on your RAM this could take a while)
sudo nano /boot/firmware/config.txt
# add:
dtoverlay=hifiberry-dac # MiniAmp overlayReboot and confirm aplay -l shows sndrpihifiberry.
cd /tmp
wget https://github.com/badaix/snapcast/releases/download/v0.31.0/snapclient_0.31.0-1_arm64_bookworm.deb
sudo apt install ./snapclient_* -ysudo usermod -aG audio snapclient
sudo tee /etc/snapclient.conf >/dev/null <<'EOF'
[snapclient]
host = beatnik-server.local # hostname of beatnik server pi
sound_device = hw:0,0 # card index from `aplay -l`
buffer = 120 # Wi‑Fi cushion (ms)
EOFsudo systemctl enable --now snapclient
journalctl -u snapclient -f # look for “Connected to beatnik-server.local:1704 …”- Open Snapweb → Clients on the main Pi.
- Drag pizero-mini onto the default group tile.
- Adjust its volume slider — it plays in sync immediately.
Repeat for as many extra Pis as you like. Just give each one a unique hostname and point
host = beatnik-server.local(or your server’s IP) in/etc/snapclient.conf.
Happy listening! 🎈
This project utilizes the following open-source software and hardware projects:
- Snapcast for synchronous multi-room audio distribution.
- Shairport Sync for AirPlay 1 & 2 receiver support.
- librespot & Raspotify for Spotify Connect integration.
- Mopidy & MPD for extensible music server capabilities.
- CamillaDSP for audio processing and equalization.
- HiFiBerry for audio hardware (DACs, Amps) and Linux overlay support.
- ALSA for the core Linux audio framework.
- Raspberry Pi & Raspberry Pi Imager for hardware infrastructure and OS flashing.
- Docker for containerization.
- Caddy for web server and reverse proxy capabilities.
- Raspberry Pi OS Lite, Debian & Linux for the underlying operating system environment.
A special thanks to the countless community members, bloggers, and forum contributors who have written tutorials and guides explaining these technologies. This project wouldn't exist without that shared knowledge.
Thank you for making Beatnik possible.


