Connect with us

Raspberry Pi

How to Set up a Raspberry Pi AirPlay Receiver?



Raspberry Pi AirPlay

Apple’s AirPlay is an outstanding feature, for this, you need to have enough Apple products to make it work. Apple AirPlay allows you to sling from the Apple device to another device. But Apple has been a little nicer than the usual about licensing the tech out to third-party companies, But there is still a good chance, that your particular stereo isn’t AirPlay-capable, which is very bad, but this is the problem you can solve with the Raspberry Pi. The Raspberry Pi AirPlay receiver can be made with few commands in Terminal. You can Plug the Raspberry Pi into your TV with the HDMI cable, and bingo: you are ready to rock, and all this without the need to buy the Apple TV. The only limitation is that the receiver is audio-only. This article helps you to connect your Raspberry Pi to your speaker then installing the software so that it becomes recognized as the AirPlay receiver on your internet network. To set up the AirPlay Receiver, we can make use of the open-source software called Shairport Sync. This lets your Pi to act as an AirPlay receiver by implementing Apple’s proprietary protocols So that it can receive music from other devices.

Raspberry Pi AirPlay
Raspberry Pi AirPlay

Related: How to set up a Web Server on the Raspberry Pi?

How to Set up a Raspberry Pi AirPlay Receiver?

Setting up the Raspberry Pi AirPlay receiver is a very simple task, as long as you have a good internet connection and a set of speakers to connect your Raspberry Pi to its relatively simple process.

Step 1: Before getting started, first run an update and upgrade on your Raspberry Pi to make sure that you are running the latest software.

sudo apt-get update
sudo apt-get upgrade

Raspberry Pi AirPlay
Raspberry Pi AirPlay

Step 2: Once that has completed you need to install several different packages, and run the following commands on the Raspberry Pi to install all of the packages that you need.

sudo apt-get install autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev
sudo apt-get install avahi-daemon libavahi-client-dev
sudo apt-get install libssl-dev

Step 3: You can clone the shairport-sync source to the Raspberry Pi. Shairport-Sync is the best fork of the original Shairport code and enables the syncing across multiple rooms.

Run the following commands on the Raspberry Pi to download the source code to your Raspberry Pi.

cd ~
git clone

Step 4: Now you have cloned the Shairport-Sync repository to your Raspberry Pi, we can now build and install the Shairport software. Before we get started, we must first move into the shairport-sync folder and configure the system. To do this, you should run a few commands on the Raspberry Pi.

cd shairport-sync
autoreconf -i -f
./configure –with-alsa –with-avahi –with-ssl=openssl –with-systemd –with-metadata

The autoreconf command setups the basic config file. The configure command further sets up the build system, telling it to utilize the ALSA audio backend, the Avahi network and set it to use the OpenSSL for encryption.

Step 5: With the configuration process, now completed you can finally compile the Shairport-sync and install it. you can run two make commands below on the Raspberry Pi to compile and install the Shairport-Sync to the device. This process sets up numerous things including the autostart script.

sudo make install

Raspberry Pi AirPlay
Raspberry Pi AirPlay

Step 6: To enable the Shairport Sync software to start automatically at the system startup, you have to enter the following command to the terminal on the Raspberry Pi.

sudo systemctl enable shairport-sync

Step 7: Finally, you can start up the Shairport software instantly by running the command below on your Raspberry Pi.

sudo service shairport-sync start

Raspberry Pi AirPlay
Raspberry Pi AirPlay

Related: How to Boot Your Raspberry Pi from a USB Mass Storage Device?

You can now be able to play audio files through the Raspberry Pi AirPlay Receiver using any of the AirPlay-capable devices. If you are not suing the non-apple device such as the Android device, then there are few applications, which enables you to utilize the Airplay.

On the AirPlay-enabled device, your Raspberry Pi AirPlay receiver should appear as the RaspberryPi in the devices list, and this name will be the same as your device’s hostname. You can also change the name of your Raspberry Pi anytime.

Thank you for reading this post.