$linuxjunkies
>

Install Spotify on Linux (Cleanly)

Install Spotify on Linux cleanly using Flatpak, Snap, or Arch's spotify-launcher. Includes Wayland flags, URI handler fixes, and audio troubleshooting.

BeginnerUbuntuDebianFedoraArch7 min readUpdated June 7, 2026

Before you start

  • A desktop environment (GNOME, KDE, etc.) with audio configured
  • Internet access for the initial download
  • sudo / root privileges to install packages

Spotify doesn't ship a native .deb or .rpm through standard repos anymore — or rather, they do maintain a repo, but it's perpetually lagging and causes dependency headaches. The three methods that actually work cleanly in 2024 are the Snap package, the Flatpak, and spotify-launcher on Arch. Each has real trade-offs; pick based on your distro and priorities.

Flatpak gives you a sandboxed, up-to-date Spotify build that works across virtually every distro. It's the cleanest option if you're not on Arch and don't want Snap infrastructure.

1. Install Flatpak and add Flathub

Most distros now ship Flatpak by default, but verify and add the Flathub remote if it's missing.

# Debian / Ubuntu
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Fedora (Flatpak is pre-installed; Flathub may already be present)
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Arch
sudo pacman -S flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

2. Install Spotify

flatpak install flathub com.spotify.Client

3. Launch it

flatpak run com.spotify.Client

Or use your desktop launcher — a .desktop entry is created automatically.

Wayland note (Flatpak)

Spotify's Electron shell defaults to XWayland. It runs fine, but if you want true Wayland rendering (better HiDPI, no XWayland compositor overhead), pass the flag at launch:

flatpak run --env=SPOTIFY_FORCE_ENABLE_WAYLAND=1 com.spotify.Client --enable-features=UseOzonePlatform --ozone-platform=wayland

To make this permanent, override the command in the Flatpak desktop entry or create a wrapper script. Native Wayland support in Spotify's Electron build is still maturing — if you see rendering glitches, drop back to XWayland.

Method 2: Snap

Snap is the path of least resistance on Ubuntu because snapd is already running. On other distros it means installing and enabling a new daemon, which many users prefer to avoid.

1. Ensure snapd is running

# Ubuntu — already present; verify
systemctl status snapd
# Fedora
sudo dnf install snapd
sudo systemctl enable --now snapd.socket
# Create symlink required for classic snaps
sudo ln -s /var/lib/snapd/snap /snap
# Arch (from AUR)
yay -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

2. Install Spotify

sudo snap install spotify

3. Launch it

spotify

The Snap package auto-updates silently in the background via snapd. This is convenient but means you can't pin a version easily.

Wayland note (Snap)

The same Ozone flags apply. Create or edit ~/.local/share/applications/spotify_spotify.desktop (copy it from /var/lib/snapd/desktop/applications/ first) and append the flags to the Exec line:

Exec=env SPOTIFY_FORCE_ENABLE_WAYLAND=1 spotify --enable-features=UseOzonePlatform --ozone-platform=wayland %U

Method 3: spotify-launcher (Arch Linux)

spotify-launcher is a small Rust utility in the Arch community repo. It downloads and keeps the official Spotify binary up to date without Flatpak or Snap overhead — the closest you get to a native install on Arch.

1. Install from the community repo

sudo pacman -S spotify-launcher

2. First run (triggers the Spotify download)

spotify-launcher

On first launch it downloads the Spotify client into ~/.local/share/spotify-launcher/ and caches it. Subsequent launches are instant.

3. Desktop integration

A .desktop entry is installed automatically. You can also pin it to your app launcher normally. Updates happen automatically the next time you launch the app.

Wayland note (spotify-launcher)

spotify-launcher -- --enable-features=UseOzonePlatform --ozone-platform=wayland

Arguments after -- are forwarded to the Spotify binary. Embed this in the Exec line of a local copy of the .desktop file at ~/.local/share/applications/.

Method Comparison

MethodDistrosAuto-updatesDisk overheadSandboxed
FlatpakAllManual / GNOME Software~300 MB runtime (shared)Yes
SnapAll (snapd needed)Automatic~250 MB snapYes
spotify-launcherArch onlyAutomatic on launch~200 MBNo

Verification

After installing, confirm Spotify is visible to your system and can open a URI:

# Flatpak
flatpak list | grep -i spotify
# Expected output: com.spotify.Client   Spotify   1.x.x.xxx   stable   flathub   user
# Snap
snap list spotify
# Expected output: Name     Version   Rev   Tracking   Publisher   Notes
#                  spotify  1.x.x.x   xxx   latest/..  spotify✓    -
# Arch / spotify-launcher
pacman -Q spotify-launcher

To test deep-link handling (important for browser "Open in Spotify" buttons), run:

xdg-open "spotify:track:4cOdK2wGLETKBW3PvgPWqT"

This should open Spotify and start playing — if it doesn't, see Troubleshooting below.

Troubleshooting

With Flatpak, the spotify: URI handler must be registered. Run:

flatpak override --user --talk-name=org.freedesktop.portal.OpenURI com.spotify.Client
update-desktop-database ~/.local/share/applications/

For Snap on non-Ubuntu systems, verify the .desktop file from /var/lib/snapd/desktop/applications/ is in a directory on your XDG_DATA_DIRS path, or copy it to ~/.local/share/applications/.

No audio output

Flatpak Spotify needs PipeWire or PulseAudio to be reachable from inside the sandbox. If audio is silent:

flatpak override --user --socket=pulseaudio com.spotify.Client

On PipeWire systems this is handled automatically via the PulseAudio compatibility socket — ensure pipewire-pulse is running:

systemctl --user status pipewire-pulse

Blank/white window on Wayland

This is a known Electron + Wayland compositor timing issue. Drop the --ozone-platform=wayland flag and let it run under XWayland, or upgrade to a compositor that fully supports xdg-shell (most current KDE Plasma and GNOME versions do).

spotify-launcher: "update check failed"

This is usually a transient network issue on Spotify's CDN. Re-run spotify-launcher — it will use the cached binary if the update check fails.

tested on:Ubuntu 24.04Fedora 40Arch 2024.05.01Debian 12

Frequently asked questions

Why not use Spotify's official apt/dnf repository?
Spotify's official Linux repo frequently lags months behind the current version, can break on dependency updates, and is not actively maintained. Flatpak and Snap both track the current release reliably.
Does Spotify on Flatpak support hardware media keys?
Yes. The Flatpak sandbox allows D-Bus access to the MPRIS2 interface, so media keys and desktop integration (GNOME, KDE) work correctly without extra configuration.
Will Spotify remember my login between updates?
Yes for all three methods. Flatpak stores user data in ~/.var/app/com.spotify.Client/, Snap uses ~/snap/spotify/, and spotify-launcher uses ~/.local/share/spotify-launcher/ — all persist across updates.
Can I run Spotify offline or on a metered connection?
Spotify's downloaded songs (Premium) are cached in the data directory. The app itself requires an initial internet connection to authenticate, but cached tracks play offline after that.
Is there a performance difference between Flatpak and Snap?
Snap Spotify tends to start slightly faster after first launch because it mounts a squashfs image. Flatpak cold-start is comparable and generally considered more transparent. Real-world audio playback performance is identical.

Related guides