How to Install Spotify on Raspberry Pi (Step-by-Step)

By Adam Gorden Updated on December 12, 2024

raspberry pi

So, you've got your Raspberry Pi, speakers, and a plan to turn it into a music streaming hub. It sounds simple enough - just fire up Spotify and start listening to your playlists. But then, things don't go as smoothly as you'd hoped. You run into confusing instructions, the audio doesn't work, or maybe you're just unsure how to get it all set up. Frustrating, right?

If you've tried getting Spotify on your Raspberry Pi, you're not alone. The process can be a bit tricky, especially if you're not super tech-savvy. There are several steps involved - installing the right software, configuring the audio properly, and figuring out how to control it all without a screen. And when you throw in Spotify Connect, you might wonder if you need your phone to control it or if there's an easier way.

But here's the good news: it's totally doable. With the right steps, you can get Spotify up and running smoothly on your Raspberry Pi. Before you know it, you'll be enjoying your favorite music just the way you want. Let's break down how it works and what you need to do to get started.

Way 1: Get Spotify on Raspberry Pi with Connect

If you want an easy way to stream Spotify on your Raspberry Pi, both Raspotify and Spotifyd are excellent options that support Spotify Connect. With either method, you can use your phone, tablet, or computer to control and stream music to your Raspberry Pi, just like you would with any other Spotify Connect device (e.g., smart speakers). The choice between these two methods depends on your needs: Raspotify is faster and simpler to set up, while Spotifyd offers more customization and control over playback.

Option 1: Get Spotify on Raspberry Pi with Raspotify

Raspotify is one of the easiest ways to turn your Raspberry Pi into a Spotify Connect device. It's lightweight, simple to install, and works great for users who just want to stream music without needing complex configurations.

Here's how to set it up:

  1. Open a terminal on your Raspberry Pi and run the following command:

    sudo apt install raspotify

  2. After installation, customize the name that appears in the Spotify app by editing the configuration file:

    sudo nano /etc/raspotify.conf

  3. Find the line:

    #DEVICE_NAME="My Spotify Connect Device"

  4. and change it to something like:

    DEVICE_NAME="Living Room Speaker"

  5. Save the file and restart Raspotify with:

    sudo systemctl restart raspotify

  6. Open the Spotify app on your phone or computer, log in to your account, and select your Raspberry Pi from the list of available devices under Devices Available. Music will start playing on your Pi.

Option 2: Get Spotify on Raspberry Pi with Spotifyd

For users who want more control over playback, Spotifyd offers extra flexibility. This lightweight daemon runs in the background and allows you to configure settings like volume control and audio output preferences. Although it requires a bit more setup, it's ideal for those who want more customization.

Here's how to set it up:

  1. Make sure your Raspberry Pi OS is up to date by running:

    sudo apt update && sudo apt upgrade

  2. Spotifyd requires several libraries. Install them with:

    sudo apt install libasound2 libcurl4 libssl-dev

  3. Download the latest version of Spotifyd for ARMv7 architecture and install it:

    curl -sL https://github.com/Spotifyd/spotifyd/releases/download/v0.3.0/spotifyd-linux-armv7.tar.gz | tar xz


    cd spotifyd-linux-armv7


    sudo cp spotifyd /usr/local/bin/

  4. You'll need to configure your Spotify account and playback settings. Edit the spotifyd.conf file:

    sudo nano /etc/spotifyd.conf

  5. Example configuration:

    [global] username = your_spotify_username password = your_spotify_password device_name = Raspberry Pi volume_ctrl = softvol

  6. Launch Spotifyd with the following command:

    spotifyd --no-daemon --username YOUR_USERNAME --password YOUR_PASSWORD

  7. Open the Spotify app, log in, and select your Raspberry Pi as the playback device. Your Pi will now stream music directly.

Way 2: Get Spotify on Raspberry Pi with Pi MusicBox

Pi MusicBox is an all-in-one, pre-configured music streaming solution that transforms your Raspberry Pi into a versatile media server. It supports multiple services such as Spotify, SoundCloud, radio stations, and more. With an easy-to-use web interface and support for Spotify Connect, Pi MusicBox is a great way to manage your music.

Here's how to set it up:

install musicbox

  1. Go to the official Pi MusicBox website and download the image that matches your Raspberry Pi model.
  2. Use a tool like Etcher or Raspberry Pi Imager to flash the Pi MusicBox image onto an SD card (at least 8GB). Simply select the downloaded image, choose your SD card, and start the flashing process.
  3. Insert the SD card into your Raspberry Pi and power it up. Pi MusicBox will automatically boot, preparing the system for use.
  4. On any device connected to the same network (laptop, phone, etc.), open a web browser and enter the Pi MusicBox IP address. You can find the IP address through your router or use a tool like Fing to locate it.
    • Example URL:

      http://Loading...:5000

  5. Once the web interface loads, log in to your Spotify Premium account (required for Spotify Connect). You can also log in to other services like SoundCloud if desired.
  6. The web interface allows you to customize playback settings, including audio output and volume. You can also browse and play playlists, albums, and tracks.

Way 3: Get Spotify on Raspberry Pi with Chromium

For a more interactive Spotify experience, using Chromium (the open-source version of Google Chrome) on your Raspberry Pi gives you direct access to the Spotify Web Player. This method allows you to log into your Spotify account and control playback right from the browser, letting you browse playlists, create new ones, and enjoy a full-featured Spotify experience.

Here's how to set it up:

  1. Chromium is typically pre-installed on Raspberry Pi OS. If not, you can easily install it by opening a terminal and running:

    sudo apt install chromium-browser

  2. To stream Premium content and ensure smooth playback, you'll need the Widevine DRM plugin. Install it by running:

    sudo apt install libwidevinecdm0

  3. Launch Chromium from the main menu and go to the Spotify Web Player by typing:

    https://www.spotify.com

  4. Log in to your Spotify account, and you'll be able to stream music directly from the browser. You can search for songs, create playlists, and fully control playback.

Way 4: Get Spotify on Raspberry Pi with Kodi

Kodi is a popular open-source media center that lets you stream music, videos, and more. To access Spotify on Kodi, you'll need to use Spotty, an unofficial add-on that enables Spotify streaming. Although it offers great functionality, Spotty does require some configuration and may encounter compatibility issues with certain devices.

Here's how to set it up:

  1. Open Kodi on your Raspberry Pi and navigate to Settings > Add-ons.
  2. Enable Unknown Sources to allow third-party add-ons.
  3. Add the Spotty repository by entering its URL or install it directly from a ZIP file.
  4. Open the Spotty add-on from the Music Add-ons section.
  5. Log in using your Spotify account credentials (either via username/password or through Spotify's OAuth system).
  6. Note that authentication tokens can expire, so you may need to log in again after a few days.
  7. Once logged in, you can browse Spotify's library directly within Kodi. Search for artists, albums, playlists, and tracks to begin streaming music.

Way 5: Get Spotify on Raspberry Pi with ViWizard

Spotify doesn't offer native support for Raspberry Pi, and even with a Premium subscription, Spotify downloads are stored as cache files, which can't be played directly on your Pi. The best solution is to convert Spotify music into standard audio formats like MP3, which are compatible with Raspberry Pi. ViWizard Spotify Music Converter allows you to easily convert and download Spotify music in formats like MP3, FLAC, and AAC, even without a Premium account.

spotify music converter

Key Features of ViWizard Spotify Music Converter

Free Trial Free Trial

* Security verified. 5, 481,347 people have downloaded it.

  • Download Spotify songs, albums, playlists, podcasts, audiobooks
  • Convert Spotify music to lossless MP3, AAC, FLAC, WAV, M4A, M4B
  • Support playing offline Spotify music on any device at any time
  • Compatible with Windows and macOS, as well as, the latest Spotify

Here's how to set it up:

select output format

  1. Download and launch ViWizard on your computer. It will automatically load the Spotify app.
  2. Log into your Spotify account and browse your music library.
  3. Drag and drop your favorite songs, albums, or playlists into ViWizard, or paste a playlist URL into the search box.
  4. After adding the music, click the Format button to select your preferred output format.
  5. You can choose from MP3, FLAC, AAC, and more. For Raspberry Pi, MP3 is the most common format.
  6. Adjust audio quality settings like bitrate and sample rate if desired.
  7. Click Convert to start the conversion process. ViWizard will save the tracks to a folder on your computer.
  8. Once the conversion is complete, transfer the MP3 files to your Raspberry Pi.
  9. You can use a USB drive, an external hard drive, or upload the files to a cloud service and then download them to your Pi.

Conclusion

The following part is all the ways to help you stream music from Spotify on your Raspberry Pi. The final choice is up to you, and you could one according to your personal demand. However, for me, I think the ViWizard software is the best option if you just want to enjoy music from Spotify with your Raspberry Pi. Compared with other three methods, it is easier for you to start music tracks from Spotify with your Raspberry Pi.

You May Be Interested

spotify for linux

How to Install, Play, Download Spotify to Linux

Learn More >>
apple music linux

How to Install and Play Apple Music on Linux

Learn More >>
spotify connect not working

Spotify Connect Not Working? Solved!

Learn More >>
spotify on mp3 player

How to Download Spotify Music to MP3 Player

Learn More >>
spotify ipod

How to Use Spotify on iPod Touch/Shuffle/Nano/Classic

Learn More >>

Leave a Comment (0)

  1. Home >
  2. Spotify >
  3. How to Install Spotify on Raspberry Pi (Step-by-Step)
Spotify Music Converter
Spotify Music Converter Sidebar