The Raspberry Pi is an ultra-popular single-board computer (SBC) that's great for a variety of purposes, from a basic desktop to a multimedia and gaming machine, a home server, or any number of uses. Because of its small size, energy efficiency, and ability to output up to a 4K resolution, the Raspberry Pi 4 is a fantastic maker board for entertainment. Streaming media or local file playback using the likes of Kodi, an open-source media player, works great. Though technically capable of streaming from services such as Netflix, Hulu, and Disney+, the Raspberry Pi previously lacked the proper digital rights management (DRM) to stream from many sites. However, in a major 2021 update, the Chromium web browser on the Raspberry Pi gained Widevine DRM support. As such, it's not possible to easily stream Spotify on the Raspberry Pi. Learn how to make a Raspberry Pi Spotify player!
What is Widevine DRM?
Lots of popular streaming video and music sites require DRM to correctly play back content in a web browser. Initially, the Raspberry Pi's default Chromium web browser lacked Widevine DRM which is necessary to stream copy-protected content. However, in a March 2021 update, Widevine support came to the official Raspberry Pi packages.
So you can now easily and quickly install Widevine for streaming from a smattering of different sources on the Raspberry Pi, thus transforming the Pi into a full-fledged multimedia machine. Without WideVine installed on the Raspberry Pi, trying to launch the Spotify web app won't even work. You'll be promoted to use a secure browser.
How to Make a Raspberry Pi Spotify Player
Getting Widevine DRM installed and turning the Raspberry Pi into a computer capable of streaming music from Spotify is pretty simple. You'll need a Raspberry Pi 4, and I recommend either the 4GB or 8GB model. Additionally, you'll need a keyboard and mouse, case, and microSD card. You may want a cooling fan or heatsink (or both!) to keep your Pi board cool.
On the software side, you'll need Raspberry Pi OS, a Linux distribution made specifically for the Raspberry Pi. And you'll need to download Widevine. Aside from that, you'll only need access to Spotify and an active Internet connection.
- Raspberry Pi 4 or Raspberry Pi 400 (4GB or 8GB recommended)
- Keyboard and mouse
- Case (optional, recommended)
- Heatsink (optional, recommended)
- Power supply
- HDMI cable
- microSD card (16GB or larger)
- Display (TV, monitor, or projector)
- Active Internet connection
- Raspberry Pi OS mounted to your microSD card
Update Your Raspberry Pi OS
Before you install Widevine, it's important to make sure your Raspberry Pi operating system is up to date. In a new terminal window, update the package list to check for packages that need updates:
sudo apt-get update
Then, download new versions of software packages with available updates:
sudo apt-get upgrade
After that, your underlying Raspberry Pi operating system should be updated and you can install Widevine.
Install Widevine DRM on the Raspberry Pi
With your Raspberry Pi OS successfully updated, go ahead and install Widevine. In a command prompt, enter:
sudo apt-get install libwidevinecdm0
Now, simply wait for installation to complete. Once Widevine is installed, there's still another step before you can begin jamming out to Spotify. You'll need to reboot your Raspberry Pi board. To restart your Raspberry Pi via the command line, run
sudo reboot in a terminal. Or, you can navigate to Menu > Logout > Reboot to restart your Raspberry Pi.
Start Streaming From Spotify on the Raspberry Pi
When your Raspberry Pi has restarted, Widevine should be ready to use. Fire up the Chromium web browser and head over to Spotify. You should be able to log in and start grooving out to your tunes. Since Spotify consumes very few system resources, it's a great use of your Raspberry Pi. I've been able to use my Raspberry Pi for work while writing and editing, and the ability to run Spotify in the background for listening to music while hammering away at the keyboard is incredibly useful.
How to Listen to Spotify on the Raspberry Pi - Final Thoughts
Overall, the Raspberry Pi 4 is a powerful device, especially for the size and price. New features like the inclusion of Widevine DRM directly in its packages continues to make the RasPi a solid board for everyday tasks, from entertainment to productivity. Whether you want to create a dedicated music streaming jukebox or listen to music while you work using the Raspberry Pi as a desktop, you can now stream from Spotify easily and painlessly on the Raspberry Pi.
Your turn: How are you putting your Raspberry Pi to good use?