Need help with spotify-connect-web?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

438 Stars 70 Forks MIT License 86 Commits 49 Opened issues

Services available


Need anything else?

Contributors list

Spotify Connect Web

This is based off of the example code from

Quickstart using a packaged release

This is a version of spotify-connect-web with all dependencies bundled (about 7MB compressed, 13MB extracted)
For armv7+ (Rpi 2, Rpi 3, etc, but not Rpi 1/Rpi Zero) devices only for now

Grab the latest release from Releases

Installation instructions (example):

tar zxvf spotify-connect-web_0.0.4-alpha.tar.gz


directory will be created, and you'll need to put your
in that directory


Just run

in the extracted directory
Supports the same options as the regular version

Quickstart using a pre-built chroot

Grab the latest release from Releases

If you just want to get running, you can use a pre-built chroot with the latest version installed.

Installation instructions (example):

curl -O curl -OL
chmod u+x
# Download the current chroot (~ 180 MB)
./ install
# Copy your `spotify_appkey.key` into the app directory. (See below for information on how to get that file.)
sudo cp spotify_appkey.key spotify-connect-web-chroot/usr/src/app/
# Run using normal cmdline options
./ --username 12345678 --password xyz123 --bitrate 320

(~~Btw, the chroot is built nightly from master using Docker on a C1.~~ Manually built for now. See the Makefile for details.)

Quickstart with Docker

(You will have to use

if not logged in as root.)
  • Get Docker running on your machine. (See this preliminary documentation for advice.)
  • Get your
    and put it into the base directory. (See below for details.)
  • Build the container via
    docker build -t spotify-connect-web .
  • Run it via

Installation from source

Requires development packages for

, and

- For Debian/Ubuntu:
apt-get install python-dev libffi-dev libasound2-dev

To install the other requirements:

pip install -r requirements.txt


usage: [-h] [--device DEVICE | --playback_device PLAYBACK_DEVICE]
               [--mixer_device_index MIXER_DEVICE_INDEX] [--mixer MIXER]
               [--dbrange DBRANGE] [--cors CORS] [--debug] [--key KEY]
               [--username USERNAME] [--password PASSWORD] [--name NAME]
               [--bitrate {90,160,320}] [--credentials CREDENTIALS]

Web interface for Spotify Connect

optional arguments: -h, --help show this help message and exit --device DEVICE, -D DEVICE alsa output device (deprecated, use --playback_device) --playback_device PLAYBACK_DEVICE, -o PLAYBACK_DEVICE alsa output device (get name from aplay -L) --mixer_device_index MIXER_DEVICE_INDEX alsa card index of the mixer device --mixer MIXER, -m MIXER alsa mixer name for volume control --dbrange DBRANGE, -r DBRANGE alsa mixer volume range in Db --lastfm_username LASTFM_USERNAME your username --lastfm_password LASTFM_PASSWORD your password --lastfm_api_key LASTFM_API_KEY your API key --lastfm_api_secret LASTFM_API_SECRET your API secret --lastfm_credentials LASTFM_CREDENTIALS file to load credentials from --cors CORS enable CORS support for this host (for the web api). Must be in the format ://:. Port can be excluded if its 80 (http) or 443 (https). Can be specified multiple times --debug, -d enable libspotify_embedded/flask debug output --key KEY, -k KEY path to spotify_appkey.key (can be obtained from ) --username USERNAME, -u USERNAME your spotify username --password PASSWORD, -p PASSWORD your spotify password --name NAME, -n NAME name that shows up in the spotify client --bitrate {90,160,320}, -b {90,160,320} Sets bitrate of audio stream (may not actually work) --credentials CREDENTIALS, -c CREDENTIALS File to load and save credentials from/to
must be in the same directory as the python scripts.
Also requires a spotify premium account, and the
(the binary version) file can be be obtained from Fill the 'App-key Request Form' in, send it and wait until you get the key sent via email (it can take a few weeks...).

After receiving it, you need to place it in the python scripts directory, or have the path specified with the


Launching from source

  • Running without debug output
  • Running with debug output
    LD_LIBRARY_PATH=$PWD python -d
  • Run with only flask debug output (flask debug output allows you to see the python exceptions that are thrown)
    DEBUG=true LD_LIBRARY_PATH=$PWD python
  • Can also be run without the web server (Requires username and password to be passed in as parameters)
    LD_LIBRARY_PATH=$PWD python -u username -p password


Generated with

cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h
was taken from from

Web server

Server runs on port


Logging in

After logging in successfully, a blob is sent by Spotify and saved to disk (to

by default), and is use to login automatically on next startup.


There's a login button on the webpage to enter a username and password, or you can pass the


If you want to enable scrobbling, you should first obtain API key at You can pass your

on the command line. You can also use
and pass
--lastfm_credentials lastfm_credentials.json
to the command line. You can find an example of the file format in
. You need to explicitly pass the credentials file, otherwise the module will not launch.

Passwordless/Multiuser (Zeroconf/Avahi)

Zeroconf (Avahi) login can be used after executing the command

avahi-publish-service TestConnect _spotify-connect._tcp 4000 VERSION=1.0 CPath=/login/_zeroconf
is in the


You can file an issue or come to the Gitter chat

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.