Apple AirPlay Server on Your Raspberry Pi
by alexposcher in Circuits > Raspberry Pi
5248 Views, 9 Favorites, 0 Comments
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.
Equipment List
For your AirPlay Server you need the following equipment:
- Raspberry Pi
- Micro SD Card with Raspbian
- Ethernet Cable or WiFi Dongle (Pi 3 has WiFi inbuilt)
- Power Adapter
Recommended:
Construction
- 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)
- Set up the Raspberry Pi
How to set up the Raspberry Pi?
Check for Updates
Type in this command to check for updates:
sudo apt-get update
Install All Necessary Packages
- 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 - Clone the shairport repository
git clone https://github.com/mikebrady/shairport-sync.git
Install Shairport
- Navigate to the cloned folder
cd shairport-sync - Build the program
autoreconf -i -f./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata
-
Compile the program
make
sudo make install
Enable Shairport to Start on Boot
- Register the service
sudo systemctl enable shairport-sync - Start the service
sudo service shairport-sync start
(From now on the service will automatically start on boot)
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
- Delete the two slashes (//) in front of the name variable (where name = "%H")
- 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.