How to stream Apple Music to a Raspberry Pi

With the recent release of Apple Music I wanted to play music through some speakers in my home that had a bit more oomph than my laptop. Unfortunately I don’t have a hi-fi system or any speakers, just an Xbox One and the TV, I do however have a spare Raspberry Pi.

Kodi (née XBMC) supports Apple’s AirPlay protocol out of the box so I just needed to get it running on the Raspberry Pi, which was a little more fiddly than I expected. I tried flashing an SD card with the images provided on the Raspberry Pi Foundation’s website, but none of them worked – this was probably more due to the very old laptop I was using to flash the card – in the end I found a much simpler solution which doesn’t require using the command line or flashing SD cards.

Instead you can use the NOOBS Lite GUI installer to setup OpenELEC on the Pi, which is an version of Kodi optimised to run on low power devices such as the Raspberry Pi.

For this method you will need: A blank SD card, a Raspberry Pi with an Ethernet port, an Ethernet cable, a HDMI cable and a USB keyboard or mouse. Note that for the initial setup you will need the Ethernet cable for a wired internet connection, after setup you can switch to WiFi.

  1. Download NOOBS Lite.
  2. Connect the SD card to your computer.
  3. Unzip the files and copy them across to the SD card.
  4. Disconnect the SD card from your computer and insert it into the Raspberry Pi.
  5. Connect the Ethernet, HDMI, USB keyboard/mouse and power supply to the Raspberry Pi.
  6. The Raspberry Pi should boot up and display a list of operating systems to install.
  7. Select ‘OpenELEC’ from the list and click ‘Install’ or press I if you only have a keyboard.
  8. Once the latest version of OpenELEC has been downloaded and installed you are almost ready to go, the Pi should automatically restart and launch Kodi.
  9. Navigate to System > Settings > Services > AirPlay, and make sure the option ‘Allow Kodi to receive AirPlay content’ has been checked.
  10. If you have a USB WiFi adapter you can now connect it to your network by going to System > OpenELEC > Connections, then select your network from the list and enter the password.

After that’s all setup you should see Kodi appear in the AirPlay list on your Mac or iOS device and you can stream everything to your Raspberry Pi. As you are using AirPlay the Pi can also receive video and images from your devices simultaneously. I was able to stream music from my iPhone whilst I browsed photos from my iPad connected at the same time, pretty nifty!

Whilst this is all a bit more fiddly than just getting an Apple TV box, it’s a lot cheaper – you can pick up a Model B+ for around £16.