Raspberry Pi 4-based multiroom audio server supporting Spotify, AirPlay, and Google Cast, synchronized across Raspberry Pi Zero clients with DAC+ Zero using Snapcast.
- Raspberry Pi 4 (any RAM variant)
- MicroSD card (16GB+)
- Power supply
- Ethernet connection (recommended)
- Raspberry Pi Zero W
- DAC+ Zero (pHAT DAC)
- MicroSD card (8GB+)
- Power supply
- Raspbian Lite on all devices
- Docker and Docker Compose on the server
Flash Raspbian Lite to your Pi 4's SD card and boot it up.
Follow convenience script steps
git clone https://github.com/tipbr/multiroom-server.git
cd multiroom-server
docker compose up -dThe server will start and be accessible at http://<pi4-ip>:1780
Flash Raspbian Lite to your Pi Zero's SD card.
Edit /boot/firmware/config.txt:
sudo nano /boot/firmware/config.txtAdd this line:
dtoverlay=hifiberry-dac
Comment out or remove:
#dtparam=audio=on
Reboot:
sudo rebootsudo apt-get update
sudo apt-get install -y snapclientEdit the configuration:
sudo nano /etc/default/snapclientReplace <SERVER_IP> with your Pi 4's IP address:
SNAPCLIENT_OPTS="--host <SERVER_IP> --soundcard hw:CARD=sndrpihifiberry"
sudo systemctl enable snapclient
sudo systemctl start snapclientRepeat steps 1-5 for each room/client.
- Open Spotify on your phone/computer
- Look for "Spotify Multiroom" in available devices
- Select it and start playing
- Open Control Center on iOS or use AirPlay menu on macOS
- Select "AirPlay Multiroom"
- Start playing audio
- Open any Cast-enabled app
- Tap the Cast icon
- Select the multiroom server
- Start casting
Access http://<pi4-ip>:1780 to:
- View all connected clients
- Adjust individual room volumes
- Group/ungroup rooms
- Switch between audio sources
Container not starting:
docker logs librespot-snapcastRebuild after changes:
docker-compose down
docker-compose up -d --buildNo audio from DAC+ Zero:
# Verify DAC is recognized
aplay -l
# Should show: card 0: sndrpihifiberry
# Test audio
speaker-test -c 2 -t wav -D hw:CARD=sndrpihifiberryClient not connecting:
# Check if server is reachable
ping <SERVER_IP>
# Check snapclient status
sudo systemctl status snapclient
# View logs
sudo journalctl -u snapclient -fAudio stuttering on WiFi:
# Increase latency buffer
sudo nano /etc/default/snapclient
# Change to:
SNAPCLIENT_OPTS="--host <SERVER_IP> --soundcard hw:CARD=sndrpihifiberry --latency 200"
sudo systemctl restart snapclientAll devices must be on the same network. For best performance:
- Use ethernet for the server (Pi 4)
- WiFi is acceptable for clients (Pi Zero W)
- Ensure router has good WiFi coverage
- Reserve IP addresses for all devices in your router
Edit snapserver.conf to change encoder settings:
nano snapserver.confRepeat the client setup for each room. Each client will appear in the web interface where you can:
- Name each room
- Create groups for synchronized playback
- Adjust individual volumes
- Apply delay compensation if needed
- 1704: Snapcast server
- 1705: Snapcast control
- 1780: Web interface
- 4713: PulseAudio (Google Cast)
- 5353: mDNS/Avahi
Spotify/AirPlay/Cast → Named Pipes → Snapserver → Network → Snapclients → DAC+ Zero → Speakers
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
This project uses:
- Snapcast - Synchronous multiroom audio
- librespot - Spotify client
- shairport-sync - AirPlay receiver
- PulseAudio - Google Cast receiver