craft calculator

Raspberry Pi as Bluetooth & AirPlay receiver

One for all: We will show you how to use the Raspberry Pi to create a multi-stream receiver that you can use to play music from all sources on the stereo system.

If old stereo systems are to be connected to the network, there are various options. So you can just a small Airplay dongle Buy one that will surely serve the purpose. However, Bluetooth isn't always the best solution - and Apple's Airport Express AirPlay receiver is no longer manufactured and doesn't support DLNA either. If you want to have everything in one device, it makes sense to simply make your own AirPlay, DLNA and Bluetooth receiver. With the Raspberry Pi this is no problem.

Multi-Music-Receiver: What you need

The construction of a multi-music receiver with DLNA, AirPlay, Spotify and Bluetooth is made possible with the help of the Free Tools Rpi Audio Receiver. You don't need much to make a device like this:

It should be a Raspberry Pi 3 (Image: BenjaminNelan/Pixabay)
It should be a Raspberry Pi 3 (Image: BenjaminNelan/Pixabay)

Build Raspberry Pi audio receivers for AirPlay, Bluetooth, DLNA and Spotify

Once you have all the pieces together, the rest is easy Raspberry Pi tinkering with no overly complex setup steps. Accordingly, you can start now: First install the Raspberry Pi, activate SSH and integrate it into the WLAN. We have here instructions on how to do the basic setup in just a few simple steps. Then you can start:

The installation is done quickly via SSH.
The installation is done quickly via SSH.
  1. Insert the configured memory card into the Raspberry Pi and connect it so that it starts. After the basic setup, it will automatically connect to your WLAN.
  2. Opens a Terminal window (Mac/Linux/Windows 10) or PuTTy (older versions of Windows) and give here ssh pi@raspberry to connect via SSH.
  3. Enter "raspberry" as the password. You are then connected via SSH and can control the Pi.
  4. After that you have to sudo apt-get updateto update the package lists.
  5. After the process you bring the system with you sudo apt-get upgrade -y up to date.
  6. Now you can start the actual installation of the multi-audio receiver. Give for it first sudo apt install -y --no-install-recommends git to install Git.
  7. Then give git clone, which copies the multi-receiver tool from Github to the Pi.
  8. Switch now cd rpi-audio-receiver into the directory of the currently loaded software...
  9. ...and calls along ./ the installer of the multi-audio tool.
  10. The installer will first ask you for the hostname that you want to set. It is currently "raspberrypi", you can either keep it with the enter key or set a new hostname, such as "musicpi". It is important that you remember the new name.
  11. Now the installer asks you for a "Pretty hostname", this is what is displayed as an AirPlay receiver, for example. Keep "Raspberry Pi" with Enter or set a new "pretty" name like "MusicPi".
  12. The installer will now work for a while and post-install software. Then he asks with "Do you want to install Bluetooth Audio (BlueALSA)?". [y/N]” if you want to install the Bluetooth audio module. Confirm with "y" for "Yes".
  13. Next, the installer will ask you if you want to install AirPlay: "Do you want to install Shairport Sync AirPlay Audio Receiver (shairport-sync v3.3.5)?" [y/N]”. Confirm here with "y".
  14. After a little installation work, the next question follows: Do you want to install the Spotify Connect service? "Do you want to install Spotify Connect (spotified v0.2.5)? [y/N]" - can't hurt, enter "y" to confirm the installation.
  15. And one more question: “Do you want to install UPnP renderer (gmrender-resurrect)? [y/N]” installs UPnP service as DLNA support. Confirm here with "y".
  16. "Do you want to install Snapcast client (snapclient})? [y/N]" still installs the SnapCast service. It is about for an open source version of AirPlay and Co., which of course can't hurt either. So press "y" and enter and in with it!
  17. "Do you want to install Startup sound? [y/N]” installs a startup sound. It may or may not make sense, but we would definitely take it with us and disable it later if necessary. So press "y" and enter.
  18. "Do you want to install ALSA VU meter plugin (pivumeter) [y/N]" uses additional audio functions. A “y” followed by the Enter key is also appropriate here.
  19. Now the Pi is ready. With sudo reboot you restart it to activate the settings and services. Attention: It is now no longer accessible via SSH under "pi@raspberrypi", but under "pi@(your-hostname-from-step-10)".
The music Raspberry behaves unobtrusively on the stereo system. (Image: Tutonaut)
The music Raspberry behaves unobtrusively on the stereo system. (Image: Tutonaut)

Use multi-music receiver

That's it: You can now use the Raspberry Pi as a multi-music receiver. It will show up as a Bluetooth audio device and as an AirPlay and DLNA receiver on appropriate devices. You can now play your music on your stereo system via the Pi without any major fuss – with whatever standard you prefer.

Music-Pi: Both via Bluetooth...
Music-Pi: Both via Bluetooth…

With us, the Pi appeared on the Mac, as well as on Windows and iOS as an AirPlay receiver and as a Bluetooth device, and the connection was established with a flick of the wrist. However, the volume was very low. To change that, we logged into the Pi with SSH and alsamixer started. The output volume can then be adjusted here.

... as well as accessible via AirPlay.
... as well as accessible via AirPlay.

Better audio quality with Raspberry Pi DAC

Of course, the Pi does not deliver the best sound quality with the built-in jack. If you want more, for example because the Music Pi is supposed to play a high-quality system, you should go to one additional DAC for the Raspberry Pi to grab. These are plug-in boards with which you can significantly increase the sound quality.

You can use the Alsamixer to increase the volume of the Pi's jack output.
You can use the Alsamixer to increase the volume of the Pi's jack output.

The multi-music receiver supports corresponding boards, but the HifiBerry as the most supported audio adapter for the Pi. He can for small money can be purchased from Amazon. We haven't gone through the setup with the HifiBerry: additional setup steps may be necessary. What is practical, however, is that the multi-audio receiver then dutifully does its job.

Watch at Amazon
Product prices and availability are correct as of the date/time shown and are subject to change. All pricing and availability information on at the time of purchase applies to the purchase of this product.
Product prices and availability are correct as of the date/time shown and are subject to change. All pricing and availability information on at the time of purchase applies to the purchase of this product.
Product prices and availability are correct as of the date/time shown and are subject to change. All pricing and availability information on at the time of purchase applies to the purchase of this product.

Christian Rentrop

Graduate journalist, born in 1979. First attempts at walking in 1986 at the Schneider CPC. In 1997 it went online. Ever since then as a scribbler in deadwood forests and on digital highways. Often also on the Vespa or with the caravan on the way. Daughter father since 2020, so always very happy about one small coffee donation.


  1. Hello Christian, thank you very much for the instructions. This worked immediately for me (Raspberry 3B; Bullseye Pi OS without graphics). I rejected all of Airplay and the other suggestions because I don't need it. This also works for me with Kodi running and an external USB sound card (stick). The Raspberry is connected to my 70s stereo system and I then play Spotify from the Android on it. Perfect.

  2. Hallo,
    Thank you for the very good guide! It works very well.
    I still have two questions:
    1. How can I change the assigned host names?
    2. How to uninstall the whole thing?


  3. Hello Christian,

    Would it be possible or how is it possible that I play Spotify via Bluetooth and play a certain song by pressing a button and Spotify continues running normally after this song?

    Thanks in advance :-)

    LG benG

  4. hey christian,

    great guide. Unfortunately, I only got it running so poorly. For me the solution to all my problems was HiFiBerry-OS. Bring all of the above and more. Of course, it only makes sense if you use the HiFiBerry DAC.

    Anyway, your article gave me the idea

    1. Hello Mirko, could you please write instructions on how you did it?
      For a long time I've been looking for a way to stream my cell phone sound to the Raspberry 4 via Bluetooth, which then forwards it to my Sonos system.

  5. I've been using the Bluetooth solution from the Script Collection for over a year and it's worked fine on X installs.

    Unfortunately no longer with the latest Raspberry Pi OS version:
    Release date: May 7th 2021
    Kernel version: 5.10

    I use the image to completely reinstall the system and install with:
    wget -q

    the script and when using "bluetoothctl" to eg set discoverable on/off, bluetoothctl.

    Anyone else have this?

    The error also occurs when changing (e.g. through sudo apt upgrade) from pi-bluetooth 0.1.15 to 0.1.17.

    So I can no longer use the Raspi as a BT receiver, which annoys me a lot.

      1. I commented out the following in the script:

        Make Bluetooth discoverable after initialization

        #mkdir -p /etc/systemd/system/bthelper@.service.d
        #cat <<'EOF' > /etc/systemd/system/bthelper@.service.d/override.conf
        #ExecStartPost=/usr/bin/bluetoothctl discoverable off
        #ExecStartPost=/bin/hciconfig %I piscan
        #ExecStartPost=/bin/hciconfig %I sspmode 1

        Now "bluetoothctl" no longer hangs and the Raspi can serve as a BT receiver again.

      2. So:

        sudo rm /etc/systemd/system/bthelper@.service.d/override.conf

        and a reboot and then bluetoothctl no longer hangs

  6. Hi all,

    That works really well, thank you very much for the successful instructions!

    Two things I noticed:

    Bluetooth: The Bluez Alsa build used here for Bluetooth only supports the SBC codec. This is pretty much the worst that Bluetooth codecs have to offer. iOS users should normally be interested that at least the AAC codec is supported. AptX or AptX-HD would be important for Android users. And in the future you will probably hear more and more about LDAC.
    Colleague Steve Block wrote a great guide on his blog on how to compile Bluez-Alsa including the most common HQ codecs:
    Actually, in my opinion, this is a must for every Bluetooth user. :-)
    Spotify: Doesn't work out-of-the-box on ARMv6 (Raspberry Pi 1 and Zero). Solution: Before installing, open the '' file and enter "armv6" instead of "armhf" as the architecture:
    ARCH=armv6 # Change to armv6 for Raspberry Pi 1/Zero

  7. There are still problems after a reboot/restart of the Raspi. Somehow the Sound Modules get mixed up. Sometimes the bcm2835 standard modules of the Raspberry (HDMI and headphones) have absolutely the same name
    0 snd_bcm2835
    1 snd_bcm2835
    only via cat /proc/asound/cards you can find out what is what.
    Sometimes the HDMI module disappears and the cinch connection moves from position 1 to position 0
    0 snd_bcm2835
    Switching according to the Peter Frei method works, but only until the next restart/reboot, when the headphone module (maybe) changes its module number again.

    1. It's always nice when you find the solution yourself:
      It seems that the Raspberry sometimes finds the HDMI connection in a headless configuration (i.e. without keyboard/monitor/mouse etc.) and sometimes not.
      Then the sound modules get mixed up, i.e. with my standard Raspi
      Raspberry Pi Model B Rev 1 (with HDMI enabled)
      0 snd_bcm2835 (HDMI)
      1 snd_bcm2835 (headphones
      0 snd_bcm2835 (headphones)
      or back again after a reboot/shutoff.
      With the entry of the following line in /root/config.txt (sudo nano /root/config.txt)
      sets Raspbmc to activate HDMI mode even if no HDMI monitor is detected.
      This means that the HDMI is always active in position 0, and the headphone connection is always in position 1.
      This means that the setting in alsa.conf
      defaults.ctl.card 1
      defaults.pcm.card 1
      always be correct.
      Has lasted 20 reboots/shutoffs so far.

  8. Salue, since I still had some old Raspberry 1 Rev B lying around I thought what the heck, you can try it.
    And I have to say, the whole thing with a USB WLAN plug and I already had a working Airplay server for my (also not quite fresh) stereo system!
    Even if it was a bit fiddly with the sound setting, the usual methods didn't work because HDMI sound and cinch sound both had the same names in the system. But with the solution proposed by my colleague Peter Frei above, I managed to do it. There is actually nothing wrong with connecting a USB Bluetooth connector.
    The whole thing is particularly fun with a Pirate Radio from Pimoroni, for which you don't even have to buy the (quite expensive) kit, but simply a PhatBeat DAC and a Raspberry Zero, then Raspian Lite on it, then the Pirate Radio software on it
    curl ¦ bash
    and then this software according to Gusto.
    If you connect the whole thing to a stereo system, you have a web radio/airstream/bluetooth/multistream client.

  9. Hello, great post worked immediately.
    I have now set up a media server with emby etc. (Ubuntu Server 20.04) with the PI, hence the question of how can I set up Bluetooth & AirPlay under Ubuntu :-).
    After querying the hostname, the first error “raspi-config: command not found” appears, I don’t have the tools for config etc. with Ubuntu.
    Can you possibly help me? Would be nice!
    Thank you

  10. Very exciting topic.
    My questions would be whether the Raspi (model 4 8GB) gets problems with 2x BT (BT internal + BT keyboard). Additionally, I'm wondering if I always have to set the audio output via terminal command? Example: First YouTube video via HDMI audio/video output on the TV, then stream music via Bluetooth on the stereo system via the jack. That would be very cumbersome. I would be very happy about experiences. LG Frank

  11. Hello Christian,
    Thank you for your contribution.
    I wanted to transfer all the sounds from my cell phone to the Respi via Bluetooth and from there to my Sonos system via a 3,5 jack. I have followed all the points of your instructions and the following happens:
    The RPI shows up as a BT component on my phone - I try to connect and then it's gone from my phone's BT menu... ...forever until I completely reinstall the Pi. Then the game repeats itself.
    I've searched a lot on the Internet, but I can't find a single guide on how to turn my RPI into a Bluetooth adapter (i.e. receive BT and then forward it via the audio output)...
    Do I really have to buy a BT adapter for EUR 20?! I'm sure that the RPI can do that too... So now my question, also to everyone here: did you manage it with the BT, or did you have problems like mine? Are there any solutions?
    I would really appreciate some tips.
    Many greetings, the RPI newcomer

  12. The installation worked without any problems.

    Unfortunately, I still get a sound via Bluetooth via AirPlay.
    If I play music, for example from YouTube, via the Pi web browser, the sound comes out.

    How can I solve this problem?

    LG Timo

    1. Hello Timo, I had the same problem. First find out whether you can hear the sound from both modules via HDMI (please increase the sound volume via alsamixer)
      If so, then I recommend the solution of the colleague (a few posts below).

      View which audio interfaces are available:
      cat / proc / asound / modules
      Note the number of the desired audio interface here
      cat /proc/asound/cards
      still shows the sound cards

      Change default audio interface:
      cd /usr/share/alsa
      sudo cp alsa.conf alsa.conf.orig
      sudo nano alsa.conf
      In the alsa.conf file, look for the following two lines and replace the zero with the number of the desired audio interface:
      defaults.ctl.card 0
      defaults.pcm.card 0

      This worked for me. Somehow the Alsa Mixer messes up the interfaces.

  13. Installation was successful, but when I connected via bluetooth there is still a voice that constantly says some text and I don't know where I can deactivate it.

    1. Sorry I did the config without a monitor connected. Now connected the rest still configured runs perfectly with Bluetooth and Airplay. Thanks

      1. Hello Hans Glover, how did you get rid of the "voice" exactly? Do I have to connect a monitor for this?

      2. It might also work with
        "sudo raspi-config"
        However, I had connected a monitor and since the configuration was finished everything has been running smoothly ever since.

  14. Hi Thanks for the guide, I encountered an error installing the Shairport Sync AirPlay Audio Receiver:

    dpkg: error processing archive files/shairport-sync_3.3.5-1~bpo10+1_armhf.deb (–install):
    Pre-dependency problem - shairport-sync is not installed
    Errors occurred while editing:

    can it be that I don't have read/write rights to a file? Thanks

  15. I have a USB sound card connected to the Raspi. After installation, however, the sound was output via the internal headphone jack during Bluetooth playback. To correct this, one must do the following:

    View which audio interfaces are available:
    cat / proc / asound / modules
    Change default audio interface:
    cd /usr/share/alsa
    sudo cp alsa.conf alsa.conf.orig
    sudo nano alsa.conf
    In the alsa.conf file, look for the following two lines and replace the zero with the number of the desired audio interface:
    defaults.ctl.card 0
    defaults.pcm.card 0

    I then restarted the Raspi. Then the sound received via Bluetooth came out of the USB sound card as desired.

      1. It is a Speedlink Vigo (item no. SL-8850-BK-01) USB sound card. It contains a C-Media CM108 chip (which can be found with the "lsusb" command). Other USB sound cards containing the same chip should behave identically.

  16. Hallo,
    Thank you for the good guide!
    I'm trying to get a USB sound card to work. Everything works directly via the rpi. AirPlay & Spotify unfortunately not. The connection can be established, but everything remains silent. Can someone help me where to look for the error?

    1. Here, too, the recommendation to proceed according to Peter Frei's method. Somehow the Alsamixer mixes up the sound modules.
      If the command via console
      speaker-test -c2 -twav
      works over the desired port, then proceed as below. worked for me

  17. Hallo,
    what about the support of usable Bluetooth codecs (AAC and aptx (HD))?. Is this supported by default? Because driving it via SBC is nonsense.
    Bluez-alsa should theoretically support that by now. At least that's built into Raspbian Buster.
    Or do you have to unlock/activate it in some way?

    Best regards,

  18. Hello and thanks for the great guide! Everything works for me except Bluetooth. How can I enable Bluetooth (my Pi doesn't show up on Bluetooth).

    1. I solved the bluetooth problem.
      However, I have noticed that when I stream via DLNA, the music sometimes falters or plays faster than it should (especially when it is streamed from my server on the Pi). Is there a setting option to buffer the streamed music on the Pi. With AirPlay, there is no problem. Can someone help me there? Thanks in advance! :)

      1. Hi David, I'm probably having a similar problem. My Pi doesn't show up over Bluetooth. How did you solve that?

        Best regards

      2. Hello Raspoli, I had not yet activated Bluetooth in general. As soon as I did that, it was via Bluetooth. But what I haven't found a solution for yet is the dropouts - which also appear with AirPlay... Greetings!

  19. Very nice project, the installation worked without any problems (Raspi4B, Raspbian OS). However, I also have the problem with the HDMI/analogue output, HDMI works with an adapter, unfortunately there is no sound directly via the jack output. Does anyone already have a solution?

    1. Was able to fix the problem myself: Installed Pulse Audio, called alsamixer again and selected "0:Headphone" as the sound card?

  20. Hallo,

    Thank you for the exciting project. So far everything worked. Get both a Bluetooth and a Spotify Connect connection between Raspberry and smartphone. Unfortunately, I can't get the Raspberry to output the sound of the Bluetooth connection via the 3,5mm jack, which is the goal of the tutorial. It is always output via the HDMI channel. However, all other system sounds (e.g. when I play a YouTube video in the Chromium browser) of the Raspberry are output via the 3,5mm jack, as intended. Do you have an idea how I can change that?


    1. Hello, I have the same problem. It seems as if only one sound card is recognized, which always outputs the sound via HDMI. I was still able to play music via an HDMI adapter with a 3.5 socket under the "Audio output analog" setting. Unfortunately, it is only possible via the 3.5 socket installed on the Raspberry!
      I'm trying with a PI3+
      Greetings Lennart

  21. Hey Christian,
    Top instructions! Thank you for that! runs as described and is a delighted to install.
    maybe you can help I also have a Hifiberry amp2 on the pi, which also runs great with e.g. YouTube via the pi, but the sound via bluetooth and airplay only arrives via Hdmi. I haven't found a solution for this until now.

    Thank you

  22. Hello Christian, thanks for this guide. Really straight forward and not a thing even for me as a Raspi newcomer.
    Alerindgs now has the problem that the Raspberry has been appearing in the network for a few days and also via Bluetooth, but with Airpay it has something and does not appear. After a few reboots it comes back or not. I'm a bit clueless.
    I already did your last post with a fixed IP address and Mac Firewall, but that doesn't solve the problem.

    1. But is the signal quality right? If you have a router with dual WLAN, you should connect the Pi via Ethernet and check that or bring it closer to the box. The problem with dual WLAN is sometimes that the connection is extremely bumpy if the router and end device are too close together.

      1. That actually seems to have been the solution. Now have the WLAN on the Raspberry and directly via Lan to the Fritzbox. It's currently running.
        Thank you for the quick tip.

      2. I don't know if that's just a FritzBox problem, but various "simpler" devices have problems with the dual-band WLAN, especially those that don't have AC. In a second step, you could try separating the two WLANs, i.e. give them different names. Most of the time this is not practical...

  23. Hello Christian, my coffee is also running through :-)
    Before I look for my PI again, a quick question...

    The PI is now the "bluetooth receiver" for my cell phone. For example, my Amazon playlist runs on my cell phone. Can I also provide this stream from the analog socket as a DLNA stream in the network (server, not client)

    Cell phone –> PI –> LAN –> DLNA receiver

    With that I would have built a very inexpensive multiroom system if that were possible :-)

    1. That doesn't really make sense from my point of view... in this case I would rather set up the Pi as a DLNA server, store the music there and use the cell phone only as a control unit. This would give you a central point in the household from which you can stream media to all recipients. In this context it would make sense to use the Pi as Kodi ( or plex ( and use the mobile phone as a kind of remote control.

      1. Hello Christian,
        What you are describing is already running on my Fritzbox with mp3s that I own and have saved.

        Unfortunately I haven't found a way to distribute my music that I stream from the Internet via the Fritzbox.

        Now I would have a device (the PI) which can receive this stream via Bluethoot and output it again analogously via socket.
        If I could now manage to pipe this stream digitally back into the home network as an mp3, I could supply all my DLNA-capable radios and soundbars with it.

        It would be a dream if the PI could also provide the stream on its Ethernet interface if you now understand what I mean.

        My Fritzbox could accept this stream. Ideally, the PI would provide the stream itself via DLNA.

        Have I now better expressed what I intend to do? Kodi doesn't bring me anything because I don't have any files but a stream.

      2. Hello Christian,
        it took a while :-)

        The trick is to set up a loopback device. You can then stream the output with cvlc comfortably over the network or hand it over to the DLNA server of the Fritzbox.

  24. Hi, great guide that works right away.
    Thank you,
    But unfortunately I have the problem that the volume is very quiet.
    I have read that this can be changed by starting alsamix.
    However, I don't know how alsamix starts or configures via SSH.
    Could you write a few sentences or post a link showing/explaining it?
    Thanks in advance

      1. It worked, oh man that was easy, yesterday I just couldn't find it. Thanks for the quick help.

  25. Hallo,

    Thanks for the great tutorial!

    I tried to equip the PI with an equalizer in addition to the Hifi Berry. I followed these instructions:

    Installation etc. went without any problems, but unfortunately the equalizer has no effect on the sound...
    Is it possible that you also have to change something in the settings of the audio receiver? Similar to here for Squeezelite

    SG and thank you


  26. Hallo,

    Thank you for the brilliant guide. Unfortunately, I always get the error: E: The bluealsa package cannot be found. How can I fix this?
    Thank you very much

    1. Just say no when asked if you want to install bluealsa and then go through the setup.
      Then just repeat the setup and it should work (at least it did for me).

  27. An interesting post.
    Also, is there a way to not only stream audio to the Pi, but also an image? I'm looking for a way to use a Pi as a receiver for screen sharing from Apple, Win10 and Android devices.

Leave a Comment

Your e-mail address will not be published. Required fields are marked with * marked

This website uses Akismet to reduce spam. Learn more about how your comment data is processed.

Back to Top button


Please deactivate your ad blocker.