Repository navigation
Spotify
There are two ways to bring Spotify into Kopuz, and both need Premium:
- The built-in source: your saved tracks, albums and playlists, a Discover page and search, played through Spotify's Web Playback SDK or any Spotify Connect device. It needs a Spotify app of your own; the one-time setup, what you get and what Spotify limits are below.
- The Spotify Premium plugin: install it from Settings → Library → Plugins and sign in through Spotify's own page in your browser, with no app of your own. Your library, liked songs and playlists play in Kopuz's own audio engine. See kopuz-plugin-spotify.
Note
Since 27 November 2025, Spotify only accepts HTTPS redirect URIs or a loopback
IP such as http://127.0.0.1, and refuses localhost. Kopuz signs in with
the authorization code flow and PKCE on http://127.0.0.1:8898/callback,
which Spotify still allows. Register it exactly like that: an app set up with
localhost will not sign in.
(Spotify's notice)
Spotify works differently from every other backend in Kopuz, so it needs a bit of one-time setup. Kopuz talks to the official Web API for your library, and the audio itself is played by Spotify's official Web Playback SDK running in a browser on your machine. Kopuz drives that player and shows everything in its own UI, but it never touches the audio stream, and it never asks for your password.
You need three things:
-
Spotify Premium. The Web Playback SDK refuses to stream on free accounts. Browsing your library still works without Premium, playback does not.
-
Your own Spotify client. Kopuz does not ship a Client ID, you create one in about two minutes and paste it in.
-
A supported browser installed. Chrome, Edge, Brave, Chromium, Vivaldi, Helium or Safari on macOS. Firefox is not usable here: the SDK has a long-standing bug in Firefox where playback dies a few seconds in, so Kopuz will not pick it.
[!NOTE] To use the Spotify backend with Helium, you need to place the Widevine files in the correct location. See here for more information. On NixOS using hjem, this can be done by adding
hjem.users.your-username = { xdg.config.files."net.imput.helium/WidevineCdm/latest-component-updated-widevine-cdm".text = '' {"Path":"${pkgs.widevine-cdm}/share/google/chrome/WidevineCdm"} ''; };
to your configuration.
-
Open developer.spotify.com/dashboard and log in with the account you want to listen with.
-
Click Create app. Name and description can be anything, they are only shown to you.
-
In Redirect URIs, add exactly this, no trailing slash:
http://127.0.0.1:8898/callbackSpotify compares this string character by character, so a typo here is the single most common reason sign-in fails.
Use
127.0.0.1, notlocalhost: since 27 November 2025 Spotify refuseslocalhostredirect URIs and accepts only HTTPS or a loopback IP (Spotify's notice). -
Under Which API/SDKs are you planning to use?, tick both Web API and Web Playback SDK.
-
Save, then open the app's Settings and copy the Client ID. You never need the Client Secret, Kopuz uses PKCE instead.
-
Go to the app's User Management and add the display name and email of every Spotify account that will sign in, including your own.
Important
A freshly created app is in Spotify's Development Mode. That means at most five listed users can sign in, the app owner needs Premium, and some API surfaces are restricted (see What Spotify limits below). This is Spotify's policy, not a Kopuz limitation.
Go to Settings → Media servers → Add → Spotify, paste your Client ID into the Spotify Client ID field, and save.
Kopuz opens Spotify's consent page in your default browser. Approve it, and the
redirect comes back to a small listener Kopuz runs on 127.0.0.1:8898 just for
those few seconds. Make sure nothing else is sitting on port 8898 while you sign
in. After that the source is ready, and Kopuz refreshes the token on its own
from then on.
There are two places your music can come out, and you can switch between them whenever you like.
The in-app player (default). The first time you hit play, Kopuz opens a small player tab in a supported browser. That tab is doing the actual playing, because DRM playback only works in a real browser. Leave it open in the background and forget about it. Everything is still controlled from Kopuz: play/pause, seek, volume, next/previous, your queue, and your system media keys. The tab closes itself when you quit Kopuz.
Browsers block sound until you interact with a page, so if the very first track sits there doing nothing, click once anywhere in that tab. Kopuz waits for that and then starts the track.
A Spotify Connect device. The device button in the bottom bar lists whatever Spotify Connect targets you have around: your phone, the desktop app, a speaker, a TV. Pick one and Kopuz sends playback straight there, with no browser tab involved at all. Progress, play state, and the current track stay in sync in Kopuz, and your OS media widget follows along too. Pick kopuz (this app) to come back to the in-app player.
Both of these live on the Spotify row under Settings → Media servers:
- Spotify playback browser. Which browser gets the player tab. Automatic picks the first supported one it finds installed.
- Spotify playback device. What Kopuz should do when Spotify is already playing somewhere else as Kopuz starts up. Other device (the default) means Kopuz adopts that session and just syncs to it instead of yanking playback away from it. This app means Kopuz always plays locally.
Saved tracks show up as favorites, saved albums as your library, and your playlists are browsable. There is a Discover page with On repeat, Jump back in, and All-time favorites, search across tracks/albums/artists, liking and unliking, and scrobbling to Libre.fm and ListenBrainz like any other source.
Most of the rough edges here come from Spotify's Development Mode, not from Kopuz:
- Search returns at most ten results per type. Development Mode apps get a hard cap on the search endpoint.
- Playlists are read-only. You can browse and play them, but creating and editing playlists is not available for Spotify sources.
- Playlists you only follow may look empty. Spotify only exposes the tracks of playlists you own or collaborate on. Editorial playlists (Discover Weekly, Release Radar, and friends) are off limits to third-party apps entirely.
- No downloads, no tag editing, no radio for Spotify tracks.
- No equalizer, crossfade, or gapless on Spotify audio. The browser owns that audio pipeline, so Kopuz's own audio features do not apply to it.
- "Spotify playback needs Chrome, Edge, Brave, Chromium, Vivaldi, Helium, or Safari" means none of those were found. Install one, then pick it under Settings → Media servers.
-
Sign-in never completes. Check the redirect URI on your Spotify app
character by character, that it says
127.0.0.1and notlocalhost, and that nothing else is using port 8898. - Sign-in is refused for a friend's account. Add them under User Management on your app first. Development Mode allows five users total.
- Auth errors after the app has been closed for a while. Kopuz refreshes the token on startup, so give it a moment. If it sticks, remove the Spotify source and add it again.
- The Discover page is empty. If you signed in before updating Kopuz, your token may predate the scopes Discover needs. Sign out and back in.
- A track plays in the tab but Kopuz looks frozen, or the other way around. Closing the player tab by hand disconnects the device. Press play again in Kopuz and it will open a fresh one.