Introduction: Apple AirPlay Server on Your Raspberry Pi

AirPlay lets you share music from Apple devices to your favourite speakers. You can set up your own AirPlay Server on your Raspberry Pi and connect it to your favourite speakers.

Step 1: Equipment List

For your AirPlay Server you need the following equipment:

Recommended:

Step 2: Construction

  1. Connect the speakers to the 3.5mm audio jack (I personally recommend these speakers, because they do not need to much space and have a pretty good sound)
  2. Set up the Raspberry Pi
    How to set up the Raspberry Pi?

Step 3: Check for Updates

Type in this command to check for updates:

sudo apt-get update

Step 4: Install All Necessary Packages

  1. Install the dependencies
    sudo apt-get install autoconf automake avahi-daemon build-essential git libasound2-dev libavahi-client-dev libconfig-dev libdaemon-dev libpopt-dev libssl-dev libtool xmltoman
  2. Clone the shairport repository
    git clone https://github.com/mikebrady/shairport-sync.git

Step 5: Install Shairport

  1. Navigate to the cloned folder
    cd shairport-sync
  2. Build the program
    autoreconf -i -f

    ./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata

  3. Compile the program
    make
    sudo make install

Step 6: Enable Shairport to Start on Boot

  1. Register the service
    sudo systemctl enable shairport-sync
  2. Start the service
    sudo service shairport-sync start
    (From now on the service will automatically start on boot)

Step 7: Customize Your AirPlay Server

You can change the name of your AirPlay Server by editing the file 'shairport-sync.conf' in '/usr/local/etc'

sudo nano /usr/local/etc/shairport-sync.conf

  1. Delete the two slashes (//) in front of the name variable (where name = "%H")
  2. Change the "%H" to a name of your choice (e.g. "Living Room")

You can also set a password to your AirPlay server and many other options in the 'shairport-sync.conf'


That's it! You can now connect your iPhone or iPad to your new AirPlay Server. Have fun with it!

If you have any questions, don't hesitate to contact me.