Spotify is the most popular music streaming service with over 600 million active users worldwide. This guide walks you through four different ways to install Spotify on Ubuntu 24.04, Linux Mint 22, and Debian 13 – from the simplest snap package to a headless daemon for server setups. Each method includes verification steps so you know the installation worked before moving on.
Prerequisites
Before you begin, make sure you have the following in place:
- A running installation of Ubuntu 24.04, Linux Mint 22, or Debian 13
- A user account with sudo privileges
- A working internet connection
- A free or premium Spotify account (sign up at spotify.com/signup if you do not have one)
Update your system packages first:
sudo apt update && sudo apt upgrade -y
Method 1 – Install Spotify Using Snap (Simplest on Ubuntu)
Snap is pre-installed on Ubuntu 24.04, which makes this the fastest path to a working Spotify client. Snap packages are sandboxed and update automatically in the background.
Note: Linux Mint 22 disables snap by default. If you are on Mint, skip to Method 2 (Flatpak) or Method 3 (APT repository).
Install Spotify with a single command:
sudo snap install spotify
Sample output:
spotify 1.2.x from Spotify✓ installed
Verify the installation:
snap info spotify | grep -E "name|installed|tracking"
You should see the package name, installed version, and the tracking channel (stable). Launch Spotify from your application menu or run:
spotify &
To remove Spotify installed via snap later:
sudo snap remove spotify
Method 2 – Install Spotify Using Flatpak (Works on All Distros)
Flatpak is the default package manager for sandboxed apps on Linux Mint 22 and works well on Ubuntu 24.04 and Debian 13 too. If you want a single method that works everywhere, this is it.
Step 1 – Install Flatpak and add Flathub
On Linux Mint 22, Flatpak and the Flathub repository are already configured. On Ubuntu 24.04 or Debian 13, install them:
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
If you are running a GNOME desktop, also install the Flatpak plugin for GNOME Software:
sudo apt install -y gnome-software-plugin-flatpak
Reboot your system after adding Flathub for the first time so the new repository is picked up properly:
sudo reboot
Step 2 – Install Spotify from Flathub
flatpak install flathub com.spotify.Client -y
Verify the installation:
flatpak list | grep -i spotify
Expected output:
Spotify com.spotify.Client 1.2.x stable system
Launch Spotify from your application menu or from the terminal:
flatpak run com.spotify.Client &
To remove the Flatpak version later:
flatpak uninstall com.spotify.Client -y
Method 3 – Install Spotify from the Official APT Repository
Spotify maintains its own Debian repository. This method gives you a native .deb package that integrates tightly with your system and updates through apt alongside your other packages.
Step 1 – Add the Spotify GPG key
Download and store the signing key in the system keyring directory:
curl -sS https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/spotify.gpg
Step 2 – Add the Spotify repository
echo "deb [signed-by=/etc/apt/trusted.gpg.d/spotify.gpg] http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
Step 3 – Install the Spotify client
sudo apt update
sudo apt install -y spotify-client
Verify the installation:
spotify --version
Also confirm the package is recognized by apt:
apt policy spotify-client
You should see the installed version and the repository URL pointing to repository.spotify.com. Launch Spotify from your application menu or run:
spotify &
To remove the APT version later:
sudo apt remove --purge spotify-client -y
sudo rm /etc/apt/sources.list.d/spotify.list
sudo rm /etc/apt/trusted.gpg.d/spotify.gpg
sudo apt update
Method 4 – Install spotifyd for Headless / Server Playback
If you run a home server or a Raspberry Pi and want Spotify playback without a graphical interface, spotifyd is a lightweight daemon that acts as a Spotify Connect receiver. You control it from your phone, another computer, or any Spotify client on the same network.
Note: spotifyd requires a Spotify Premium account.
Step 1 – Install spotifyd
Install required dependencies and download the latest release:
sudo apt install -y libasound2-dev libssl-dev pkg-config curl
Download the latest spotifyd binary from the GitHub releases page:
SPOTIFYD_VERSION=$(curl -s https://api.github.com/repos/Spotifyd/spotifyd/releases/latest | grep tag_name | cut -d '"' -f4)
curl -L "https://github.com/Spotifyd/spotifyd/releases/download/${SPOTIFYD_VERSION}/spotifyd-linux-default.tar.gz" -o /tmp/spotifyd.tar.gz
tar xzf /tmp/spotifyd.tar.gz -C /tmp
sudo mv /tmp/spotifyd /usr/local/bin/
sudo chmod +x /usr/local/bin/spotifyd
Step 2 – Configure spotifyd
Create the configuration directory and file:
mkdir -p ~/.config/spotifyd
cat > ~/.config/spotifyd/spotifyd.conf << 'EOF'
[global]
username = "YOUR_SPOTIFY_USERNAME"
password = "YOUR_SPOTIFY_PASSWORD"
backend = "alsa"
device_name = "spotifyd-server"
bitrate = 320
cache_path = "/tmp/spotifyd-cache"
no_audio_cache = false
volume_normalisation = true
EOF
Replace YOUR_SPOTIFY_USERNAME and YOUR_SPOTIFY_PASSWORD with your actual Spotify credentials. Secure the config file:
chmod 600 ~/.config/spotifyd/spotifyd.conf
Step 3 – Create a systemd user service
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/spotifyd.service << 'EOF'
[Unit]
Description=Spotifyd - Spotify Connect daemon
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/spotifyd --no-daemon
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
EOF
Enable and start the service:
systemctl --user daemon-reload
systemctl --user enable --now spotifyd.service
Verify the service is running:
systemctl --user status spotifyd.service
You should see Active: active (running) in the output. Open Spotify on your phone or another device and look for the device named spotifyd-server in the Spotify Connect device list.
Configure Spotify Settings
After installation, take a few minutes to configure Spotify for the best experience on your Linux desktop.
Streaming Quality
Open Spotify and navigate to Settings (click your profile icon, then Settings). Under Audio Quality:
- Streaming quality – Set to “Very High” (320 kbps) if you have a Premium account and a stable connection
- Auto adjust quality – Disable this if you always want maximum quality and your bandwidth is reliable
- Normalize volume – Enable this to keep volume consistent across tracks
Download Location (Offline Storage)
By default, Spotify stores offline content in your home directory. If you have a dedicated media partition or want to use a different disk, you can change the cache location.
For the APT or snap installation, Spotify stores data in:
~/.cache/spotify/
For Flatpak:
~/.var/app/com.spotify.Client/cache/spotify/
To move the cache to another location (for example, a secondary drive mounted at /mnt/data), create a symlink:
# Close Spotify first
mkdir -p /mnt/data/spotify-cache
mv ~/.cache/spotify/* /mnt/data/spotify-cache/
rm -rf ~/.cache/spotify
ln -s /mnt/data/spotify-cache ~/.cache/spotify
Hardware Acceleration
Spotify uses hardware acceleration by default. If you notice graphical glitches or high CPU usage, you can disable it. Go to Settings and toggle off Enable hardware acceleration at the bottom of the settings page.
Alternatively, launch Spotify with hardware acceleration disabled from the terminal:
spotify --disable-gpu &
To make this permanent for the APT installation, edit the desktop file:
sudo sed -i 's|Exec=spotify|Exec=spotify --disable-gpu|' /usr/share/applications/spotify.desktop
Keyboard Shortcuts
Spotify on Linux supports the following keyboard shortcuts inside the application window:
| Shortcut | Action |
|---|---|
| Space | Play / Pause |
| Ctrl + Right Arrow | Next track |
| Ctrl + Left Arrow | Previous track |
| Ctrl + Up Arrow | Volume up |
| Ctrl + Down Arrow | Volume down |
| Ctrl + Shift + Up | Maximum volume |
| Ctrl + Shift + Down | Mute |
| Ctrl + L | Focus search bar |
| Ctrl + F | Filter in playlists |
| Ctrl + S | Toggle shuffle |
| Ctrl + R | Toggle repeat |
| Alt + Left Arrow | Go back |
| Alt + Right Arrow | Go forward |
For global media key support (play/pause, next, previous using your keyboard media keys), make sure you have playerctl installed:
sudo apt install -y playerctl
Verify that Spotify responds to media keys:
playerctl --list-all
You should see spotify in the list when the application is running. Most modern desktop environments (GNOME, Cinnamon, KDE Plasma) handle media key routing automatically once playerctl is available.
System Tray Integration
Spotify can minimize to the system tray so it stays out of your taskbar while playing music in the background.
GNOME Desktop (Ubuntu 24.04)
GNOME does not include a system tray by default. Install the AppIndicator extension to get tray support:
sudo apt install -y gnome-shell-extension-appindicator
Log out and log back in, then enable the extension:
gnome-extensions enable [email protected]
Verify the extension is active:
gnome-extensions show [email protected] | grep State
The state should show ACTIVE. Restart Spotify and you will see its icon in the top panel tray area.
Cinnamon Desktop (Linux Mint 22)
Linux Mint 22 with Cinnamon includes system tray support out of the box. Spotify will appear in the tray automatically – no extra configuration needed.
KDE Plasma (Debian 13 / Kubuntu)
KDE Plasma has built-in system tray support. Spotify will appear in the system tray by default. Right-click the tray area and select “Configure System Tray” if you need to adjust visibility settings.
Troubleshooting
No Sound Output
If Spotify opens but plays no audio, check the following:
1. Confirm PulseAudio or PipeWire is running:
# For PipeWire (default on Ubuntu 24.04 and Debian 13)
systemctl --user status pipewire pipewire-pulse
# For PulseAudio (some Mint configurations)
systemctl --user status pulseaudio
Both services should show active (running).
2. Check that Spotify is not muted in the audio mixer:
sudo apt install -y pavucontrol
pavucontrol &
In the Playback tab, look for the Spotify stream and make sure it is not muted and the volume slider is up.
3. Restart the audio stack:
# PipeWire
systemctl --user restart pipewire pipewire-pulse
# PulseAudio
systemctl --user restart pulseaudio
Close and reopen Spotify after restarting the audio service.
High CPU Usage
Spotify can sometimes consume excessive CPU, especially on older hardware. Try these fixes:
1. Disable hardware acceleration (see the configuration section above).
2. Clear the Spotify cache:
# For APT/snap installation
rm -rf ~/.cache/spotify/Data
rm -rf ~/.cache/spotify/Storage
# For Flatpak installation
rm -rf ~/.var/app/com.spotify.Client/cache/spotify/Data
rm -rf ~/.var/app/com.spotify.Client/cache/spotify/Storage
3. Check CPU usage before and after the cache clear:
ps aux | grep spotify | grep -v grep
The %CPU column should stay under 10% during normal playback.
Login Issues
If Spotify gets stuck on the login screen or fails to authenticate:
1. Remove stored credentials and preferences:
# APT/snap installation
rm -rf ~/.config/spotify
# Flatpak installation
rm -rf ~/.var/app/com.spotify.Client/config/spotify
2. Check that your system clock is accurate:
timedatectl status
Make sure “System clock synchronized” shows yes and the time zone is correct. An inaccurate system clock causes authentication failures with Spotify servers.
3. If you use a proxy or VPN, try disconnecting and logging in directly. Spotify sometimes blocks connections from certain VPN providers.
4. Test network connectivity to Spotify:
curl -sI https://accounts.spotify.com | head -5
You should see HTTP/2 200 or a redirect response. If the connection times out, check your firewall rules.
Scaling Issues on HiDPI Displays
On 4K or other high-resolution displays, Spotify may appear too small or have blurry text. Fix this by setting a scaling factor.
For the APT installation, launch Spotify with a forced scale factor:
spotify --force-device-scale-factor=1.5 &
Adjust the value (1.25, 1.5, 2.0) to match your display. To make this permanent, edit the desktop file:
sudo sed -i 's|Exec=spotify|Exec=spotify --force-device-scale-factor=1.5|' /usr/share/applications/spotify.desktop
For the Flatpak installation, pass the flag through an environment variable:
flatpak override --user --env=SPOTIFY_SCALE_FACTOR=1.5 com.spotify.Client
Alternatively, use the Flatpak environment override for the Electron/CEF flag:
flatpak run --env=--force-device-scale-factor=1.5 com.spotify.Client &
For the snap installation, create a wrapper script:
mkdir -p ~/bin
cat > ~/bin/spotify-hidpi << 'EOF'
#!/bin/bash
snap run spotify --force-device-scale-factor=1.5
EOF
chmod +x ~/bin/spotify-hidpi
Verify the scaling change by launching Spotify with the new settings. The interface elements and text should look sharp and appropriately sized for your display.
Summary
You now have Spotify running on your Ubuntu 24.04, Linux Mint 22, or Debian 13 system. Here is a quick recap of the four methods covered:
| Method | Best For | Update Mechanism |
|---|---|---|
| Snap | Ubuntu users who want the simplest setup | Automatic via snapd |
| Flatpak | Linux Mint, Debian, or any distro | flatpak update |
| APT Repository | Users who prefer native .deb packages | apt upgrade |
| spotifyd | Headless servers, Raspberry Pi | Manual binary update |
Pick the method that fits your workflow and distribution. For most desktop users on Ubuntu 24.04, the snap package is the fastest option. On Linux Mint 22, Flatpak is the natural choice. If you want full system integration and control over updates, the official APT repository is the way to go.























































