Overview User Guide Tech Specs Reviews(...)

How to Play Apple Music on Raspberry Pi

The Raspberry Pi is a revolutionary, low-cost, single-board computer originally designed to promote computer science education. However, its versatility allows it to perform astounding tasks far beyond the classroom. From creating a network media server for your TV to building a dedicated Hi-Fi music station, the possibilities are endless.

While tools like Pi MusicBox allow you to stream Spotify, SoundCloud, and YouTube, native Apple Music integration is not available on Raspberry Pi. However, don't worry, that doesn't mean your Raspberry Pi can't become a high-end Apple Music streamer. This article will explores three methods to play Apple Music on Raspberry Pi via AirPlay, Apple Music Web Player, or local playback.

apple music on raspberry pi

Part 1. How to AirPlay Apple Music to Raspberry Pi

Nothing beats the comfort of sitting on your sofa and wirelessly beaming your Apple Music library to your stereo speakers. By setting up an AirPlay receiver, your Raspberry Pi acts as a bridge between your Apple devices and your sound system. You can easily browse Apple Music on your iPhone, iPad, or Mac, and simply cast the audio to your Pi. This supports CD-quality streaming (16-bit/44.1kHz), which is perfect for most Hi-Fi setups.

Tools You Need to Use AirPlay for Raspberry Pi
  • Raspberry Pi: (Models 3, 4, or 5 are recommended for the best performance).
  • Audio Output: A 3.5mm stereo cable, USB DAC, or a HiFiBerry HAT for superior sound.
  • Storage: A microSD card (8GB+).
  • Peripherals: Power supply, HDMI cable (for initial setup), and a USB keyboard/mouse.
  • Connectivity: Ethernet or a Wi-Fi connection.
  • Apple Device: An iPhone, iPad, or Mac running Apple Music.

How to Play Apple Music on Raspberry Pi via AirPlay

If you are already running Raspberry Pi OS (formerly Raspbian) and want to add Apple Music support without wiping your system, you should use Shairport Sync. This is a command-line tool that emulates an AirPlay receiver. While you can use Shairport Sync for audio-only setups, using a media center like Kodi (via LibreELEC) provides a visual interface.

Step 1. Open your terminal on the Raspberry Pi and ensure your package lists are up to date by running sudo apt update && sudo apt upgrade.

Step 2. Install the necessary dependencies and the application itself. For most modern Raspberry Pi OS versions, you can install it directly from the package manager:

Bash
apt install shairport-sync
copy

Step 3. Enable the service so it starts automatically whenever you turn on your Raspberry Pi. Run the command sudo systemctl enable shairport-sync --now.

Step 4. Use the Raspberry Pi Imager to flash LibreELEC (the modern successor to OpenELEC) onto your SD card.

Step 5. Insert the SD card into your Pi, connect your display and speakers, and power it on. Follow the on-screen wizard to connect to your Wi-Fi.

Step 6. Navigate to "Settings" > "Services" > "AirPlay". Toggle "Enable AirPlay support" to "ON".

Step 7. Open Apple Music on your iPhone or Mac. Tap the "AirPlay" icon and select your Raspberry Pi. Your Apple Music will now stream through the Pi's connected speakers!

airplay apple music to raspberry pi

Part 2. How to Play Apple Music on Raspberry Pi via the Web Browser

If you use your Raspberry Pi as a desktop computer with a monitor and mouse, you don't need extra devices to listen to Apple Music. You can access your Apple Music library directly through the browser on the Raspberry Pi.

Tools You Need to Use Apple Music Web Player on Raspberry Pi
  • Raspberry Pi 4 or 5 (The web player is resource-heavy and requires the extra RAM/CPU power of newer models).
  • OS: Raspberry Pi OS (Desktop version).
  • Browser: Chromium (pre-installed).

How to Listen to Apple Music on Raspberry Pi Online

Step 1. Open the default Chromium browser on the Raspberry Pi desktop.

Step 2. Navigate to the Apple Music Web Player official website and sign in with your Apple Account.

Step 3. Now, you can browse your entire Apple Music library and choose your favorite songs or playlists to play on the Raspberry Pi.

Note:

To create an "App-like" experience, run the browser in Kiosk mode. You can do this by launching Chromium via the terminal with specific flags:

Bash
--kiosk https://music.apple.com
copy

This command forces the browser to open full screen without address bars or window borders, making it look like a native application.

Part 3. How to Play Local Apple Music on Raspberry Pi Offline

AirPlay is great, but it requires your Apple device to be nearby and connected to the network. Besides, the browser method also does not support downloading all Apple Music songs for offline listening. If you want to play Apple Music directly from the Pi, or if you're looking for a simpler way to manage your library, transferring local files is the best solution.

Because Apple Music files are encrypted M4P files (DRM-protected), they won't play on standard Pi media players like VLC or Volumio. To fix this, you can use DRmare Apple Music Converter. It features a built-in Apple Music Web Player, enabling users to download Apple Music songs and playlists to local MP3, FLAC, WAV, M4A, M4B, and AIFF without protection.

It runs at a 30X faster conversion speed without the original audio quality loss. At the same time, it can keep ID3 tag info, metadata, album cover, and archive the output files as you like. Once converted, these Apple Music files can be stored on a USB drive or the Pi's SD card, making them accessible even if you log out of your Apple Account.

Step 1Import Apple Music to DRmare

Install and open DRmare Apple Music Converter on your computer and tap the "Sign In" button to log in to your Apple Account. After that, you can browse your Apple Music library and open the favorite item. Click the "Add" > "Add to List" button to import them to the conversion queue.

add apple music files to drmare audio converter

Step 2Select Apple Music output format for Raspberry Pi

As long as there is no DRM protection, all formats of your music files should be supported by the Raspberry Pi. You can click the "Menu" or "DRmare Apple Music Converter" to choose the "Preferences" > "Conversion to open the settings window and customize the output format. For Raspberry Pi, MP3 is the most compatible, while FLAC is ideal if you are using a Hi-Fi DAC for lossless listening.

change audio format for apple music marshall

Step 3Download Apple Music for Raspberry Pi

Press the "Convert" button to start the conversion process. Once finished, locate the Apple Music files in your output folder by clicking the "Converted" > "Folder" icon and copy these Apple Music songs onto a USB Flash Drive.

convert apple music for marshall speaker

Step 4Enjoy Apple Music on Raspberry Pi Offline

Insert the USB drive into your Raspberry Pi. You can now play your Apple Music using any local player like VLC, Audacious, or the audiophile-grade Volumio.

Part 4. Verdict

Method Best For... Requirements
AirPlay Controlling music from your sofa via iPhone. iOS Device + Local Network
Web Browser Using the Pi as a desktop computer. Pi 4/5 + Monitor/Mouse
Local Playback High-quality, offline, and permanent playback. PC for initial conversion

Regardless of the path you choose, the Raspberry Pi proves that you don't need expensive, proprietary hardware to enjoy a world-class Apple Music experience. By combining this tiny computer with the right software and tools, you can create a custom media center that rivals high-end commercial alternatives.

Related Articles

User Comments

Leave a Comment