Users on Linux really don’t have many choices when it comes to cloud music services. Of the popular cloud music services, Spotify, Pandora, Apple Music, Google Music, etc., Linux users tend to gravitate towards Google Music. This is because Google Music supports Linux as well as it does for other operating systems. Still, for as good of a product Google Music is, the service isn’t for everyone especially if you value your privacy. The single best alternative to Google Music on Linux is Spotify. It’s not hard to see why too: Spotify has one of the largest music collections online and the paywall is optional. Here’s how you can install Spotify on Linux.
Install Spotify For Ubuntu and Debian
Ubuntu, Debian and Linux distributions with an Ubuntu/Debian base have direct support from Spotify. In fact, this is the only official binary distributed for Linux. Other non-Debian based Linuxes will have to install the desktop app a different way. To get it running, you’ll need to open a terminal window.
Before you can install the Spotify client, you need to add the repo key. This key lets your PC know that the repository you’re installing software from can be trusted. Do not ever add a repository to your sources file without a key. Your operating system will refuse to install the software, and you’ll get a warning that you’re installing software from an unsafe source!
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 0DF731E45CE24F27EEEB1450EFDC8610341D9410
With the key added, we can add the actual software source to the sources file.
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
After the software repo key has been added, your PC will recognize the SPotify server as a secure repository. The next step is to update the software sources. Updating software sources will allow your PC to see the Spotify client in package manager.
sudo apt-get update
After the software sources updated, you can install the app to your system.
sudo apt-get install spotify-client
Install Spotify For Other Linux Distributions
A few years ago, if you didn’t use Ubuntu, Debian or Linuxes based on these operating systems, the odds of using Spotify on your PC were very slim. In 2017, this is no longer true. With the advent of such things as Snap packages, and Flatpaks, Spotify can be installed on virtually anything.
To start off, install FlatPak. FlatPak is on virtually every Linux distribution. Open up a terminal, search for Flatpak and install it. With Flatpak working, it’s time to install Spotify. This can be done in two ways: terminal or Gnome software.
First, install the Flatpak directly from the web to your Linux PC. DO NOT RUN THIS COMMAND AS SUDO! If you run it as root you may run into permission issues.
flatpak install --from https://s3.amazonaws.com/alexlarsson/spotify-repo/spotify.flatpakref
After installing the flatpak package, run the app with:
flatpak run com.spotify.Client
If you’re not interested in installing the Spotify Flatpak with the terminal, you can just download a flatpakref file and open it with the Gnome Software Store. To get the Spotify flatpakref file, head over to this page. Scroll down and look for “Spotify”. Click the download button next to it to start the download.
With flatpakref file downloaded, the install process can begin. Open your file manager, and go to the “Downloads” folder. From here, click on “spotify.flatpakref”. This will launch it in Gnome Software.
Inside Gnome Software, you’ll see a Spotify icon with a brief description of the app. To install the app, click the install button. Do not worry about having to re-download the Spotify flatpak app to update it. Since Flatpak is tied heavily into Gnome software, you’ll be prompted to install updates directly from there!
Other Ways To Use Spotify On Linux
If you’re on a version of Linux that can’t use Flatpaks or Debian packages, there is still a way to enjoy Spotify. Consider loading up the web version of the service instead. To be clear, there are real drawbacks to using this over the desktop app. For example, by accessing Spotify via the web, you won’t get native desktop notifications, or native playback integration into your desktop environment, and etc.
Still, if your Linux distro doesn’t support these installation methods, visit this website. Additionally, those using Chromium/Google Chrome should check out the Spotify Chrome app. It adds the ability to open the web player in a dedicated window.
Spotify is a great music service. It’s got a great selection of music that can be accessed with only a few clicks. That’s why it’s so refreshing to see that it’s easy to get the desktop app working on Linux. Hopefully more companies will take Spotify’s lead and treat Linux like a first class citizen.