HowTo: Raspberry Pi – Install “Shairport” Airplay server on the Raspberry Pi

Anyone who uses one (or more) Apple devices is certainly familiar with the AirPlay function. Thanks to this, media of all kinds can be streamed to other devices in the network. You can display photos on an AirPlay-enabled television, play videos or play music on AirPlay-enabled speakers.

At least the latter can be easily achieved with a RaspberryPi and thus convert a RaspberryPi into an AirPlay capable speaker.

I use this solution in my MagicMirror, for example. So you can use the RaspberryPi (which is built into the magicMirror) as a music speaker, too. 🙂

Everything you need to set up your RaspberryPi is described in the following article.

Safety instructions

I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance.

Affiliate links / advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and shop via this link, receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support in being able to offer further useful projects in the future. 🙂


Helpful Articles:
Before you start with this article, you should have prepared the RaspberryPi so that it can be reached via the network and controlled via SSH.

The following three articles describe what needs to be done to prepare the RaspberryPi:
RaspberryPi – Setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH

Required tools:
– none –

Required material:

Log in via SSH on the RaspberryPi

To get started, you first need to log in to RasPi with SSH on Putty. How to do it is described in the article

After entering your username and password you can start to enter the first commands.

Update package management

The package management in Linux is a "central point" over which various software packages can be installed. For this to work reliably, the lists and sources of package management should be updated before installing any new packages.

To start the package management update you have to enter the following command.
sudo apt-get update && sudo apt-get upgrade
Depending on how long your last update of the package management is, this process can take some time. First, the lists are updated in which the individual repositories are referenced.
Then the packages themselves are updated. As this additional memory is occupied, you will again asked for your consent. You have to confirm this with a "J"(in German) or a "Y" and "Enter".
When the update is complete, you will see a small summary of the duration and scope of the update.

Install Shairport

The installation of Shairport is very easy thanks to the package manager.

Simply enter the following command into the console of your RaspberryPi.

sudo apt-get install shairport-sync

You can confirm a possible note that additionaly memory is being used by this with “Y” and “Enter”.

The installation then runs automatically.

To start Shairport after the installation, you now have to execute the following command

sudo systemctl start shairport-sync

Show status

Thanks to the command line tool systemctl you can easily get an overview of the status of your Shairport server.

Simply enter the following command in the console of your RaspberryPi.

sudo systemctl status shairport-sync

Here you can now see whether the Shairport server is “active” or “inactive”.

Activate autostart

So that your Shairport server starts again automatically after a restart of the RaspberryPi, you should now activate its autostart.

Simply enter the following command into the console of your RaspberryPi.

sudo systemctl enable shairport-sync

Start music playback

That’s all. You should now be able to use your self-made AirPlay receiver on your iPhone (or other Apple device). 🙂

For example, you will now find the marked symbol in your “Podcasts” app.

As soon as you click on it …

… A menu should open in which the AirPlay speaker you just set up (called “MagicMirror” here) is displayed.

As soon as you click on it, music playback should start on it.

I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂


P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂

Buy Me a Coffee at


  1. Hi,

    danke für den Artikel. Läuft!

    Kleiner Hinweis: Du hast Paketverwaltung aktualisieren doppel drinne.


Leave a Reply

Your email address will not be published. Required fields are marked *