← How-Tos
raspberry-pi Aug 25, 2026 ◑ 4 views ◯ 5 min read

Turning a Raspberry Pi into an AirPlay and Spotify Connect Receiver with Shairport-Sync and Raspotify

raspberry piairplayspotify connectshairport-syncraspotifylibrespotaudio streamingdaci2s

This site already covers building a Raspberry Pi into a full whole-home audio streaming server with Volumio and multi-room sync, which is the right project if you're building a serious music server from scratch. But a lot of the time what you actually want is much simpler: turn an old pair of powered speakers or a stereo receiver into an AirPlay or Spotify Connect target, so your phone can just throw audio at it the way it would to a HomePod or a smart speaker, without running a full media server. That's a smaller, cheaper project, and it's what Shairport-Sync and Raspotify are built for. This guide covers setting up both on a single Pi so it answers to AirPlay from iOS/macOS and Spotify Connect from any Spotify client, sharing one audio output.

What Each Piece Does

Running both at once is a common and well-supported combination — they don't conflict, since each only activates when its respective protocol actually starts streaming, and normal use means only one is active at a time anyway.

Hardware Considerations

Audio output quality depends entirely on how you get sound out of the Pi, and this is worth deciding before you start:

Output MethodQualityNotes Pi's built-in 3.5mm jackMediocre — audible noise floorFine for casual/background listening, not for a serious speaker setup USB DAC (even a cheap one)GoodEasiest upgrade path, works with any Pi model, no GPIO needed I2S DAC HAT (PCM5102A, HiFiBerry, IQaudio)Very goodBypasses the Pi's onboard audio entirely, best option for a dedicated build HDMI (into an AV receiver)GoodSimplest if the destination is already an HDMI-input receiver

A Pi Zero 2 W is plenty of compute for this — both Shairport-Sync and Raspotify are lightweight, so there's no reason to dedicate a Pi 4 or 5 to what's fundamentally a network audio bridge.

Installing Shairport-Sync

On recent Raspberry Pi OS, Shairport-Sync is available directly from the package repos, which is the easiest path:

sudo apt update sudo apt install shairport-sync

The default config at /etc/shairport-sync.conf is usable out of the box, but two settings are worth checking:

If you need full AirPlay 2 support (multi-room grouping with real Apple devices, not just basic single-target streaming), you'll need to build Shairport-Sync from source with the AirPlay 2 feature flags enabled rather than using the packaged version, which typically only supports "classic" AirPlay 1. For a single-speaker bridge, classic AirPlay is sufficient and much less setup.

Installing Raspotify

Raspotify ships its own install script that sets up the systemd service and package repo for you:

curl -sL https://dtcooper.github.io/raspotify/install.sh | sh

Configuration lives in /etc/raspotify/conf. The settings worth changing immediately:

Restart the service after any config change with sudo systemctl restart raspotify.

Running Both Together

Both services bind to the same ALSA output device but don't need exclusive access simultaneously in normal use, since only one plays audio at a time. If you do run into audio device contention (one service holding the device open and blocking the other), routing both through dmix in ALSA, or through PulseAudio/PipeWire as a shared audio server, resolves it — but for a simple single-speaker bridge most people never hit this in practice, since AirPlay and Spotify streaming sessions are inherently exclusive from the source side.

Troubleshooting

SymptomLikely Fix Device doesn't show up in AirPlay pickerCheck that mDNS/Bonjour traffic isn't blocked — a VLAN or guest network without multicast forwarding will hide it; confirm with avahi-browse -a on the Pi Device doesn't show up in Spotify ConnectConfirm the raspotify service is actually running (systemctl status raspotify) and that you're logged into a Premium account in the Spotify app Audio stutters or dropsUsually WiFi signal to the Pi — move it closer to the AP or switch to Ethernet, especially for a Pi Zero 2 W's single-band WiFi No sound at all despite a connected sessionWrong ALSA output device set in one or both configs — re-check with aplay -l and match the card/device numbers exactly

This is a genuinely small project as far as Pi builds go — an afternoon, at most, once you've got the DAC hardware sorted — but it's one of the more satisfying ones because the payoff is immediate and used daily. It's worth thinking of as the lightweight alternative to the full Volumio/multi-room setup already covered on this site: reach for Shairport-Sync and Raspotify when you just want to turn a pair of speakers into an AirPlay/Spotify target, and reach for the full Volumio build when you actually want a music server with its own library and multi-room sync.