Sign inSign up

giof71/spotconnect

By giof71

Updated 6 days ago

Run SpotConnect (UPnP and AirPlay mode) on docker

Image
1

10K+

giof71/spotconnect repository overview

spotconnect-docker

A docker image for SpotConnect.
This repository replaces the previous airplay and upnp separate variants of the project, which will be no longer updated.
The latest images include version 0.20.8.

References

This is based on this project by philippe44.
In UPnP mode (SPOTCONNECT_MODE=upnp), it will let you use your upnp renderers (including those created with upmpdcli and mpd) as Spotify Connect devices.
In AirPlay mode (SPOTCONNECT_MODE=raop), it will let you use your AirPlay renderers as Spotify Connect devices, including those that you have created using Shairport Sync.

REPOSITORYDESCRIPTION
Source codeGitHub
Docker imagesDocker Hub

Build

Simply build using the following:

docker build . -t giof71/spotconnect:latest

Configuration

Configuration is available through a set of environment variables.
There are currently just a few variables available to set, but more will come as soon as possible.

VARIABLEDESCRIPTION
PUIDGroup used to run the application, defaults to 1000
PGIDGroup used to run the application, defaults to 1000
PREFER_STATICPrefer -static version of the executable, defaults to no
VORBIS_BITRATESet the vorbis bitrate to 320, 160 or 96, defaults to 320
STORE_CRED_XMLSet to yes to store credentials in the configuration file (-j), defaults to no
SPOTCONNECT_MODESpotConnect mode: upnp or raop (for AirPlay), defaults to upnp
OUTPUT_CODECCodec for the UPnP version, see here, possible values here
UPNP_HTTP_CONTENT_LENGTH_MODEFor UPnP mode only, see here, possible values here
UPNP_HTTP_CACHING_MODECaching mode for UPnP mode only, possible values here
APPLETV_PAIRING_MODERuns in Apple TV Pairing mode, see issue #1
CONFIG_FILE_PREFIXPrefix for the config file, empty by default
LOG_LEVEL_ALLEnables log of type all using the provided value
LOG_LEVEL_MAINEnables log of type main using the provided value, possible values here
LOG_LEVEL_UTILEnables log of type util using the provided value, possible values here
LOG_LEVEL_UPNPEnables log of type upnp using the provided value, possible values here
LOG_LEVEL_RAOPEnables log of type raop using the provided value, possible values here
ENABLE_AUTO_NETWORKAllows to automatically set NETWORK_SELECT, defaults to yes, but this does not override an explicitly set NETWORK_SELECT variable anyway
NETWORK_SELECTSets the network interface or ip and optionally port
AUTO_NETWORK_URLUsed for selecting the network to use, defaults to 1.1.1.1
NETWORK_USE_IPUse ip instead of network card for -b, defaults to yes
HTTP Content length modes (UPnP only)

From the application's own help text:

-g -3|-2|-1|0|<n> HTTP content-length mode (-3:chunked(*), -2:if known, -1:none, 0:fixed, <n> your value)

So the variable UPNP_HTTP_CONTENT_LENGTH_MODE can be set accordingly.

HTTP Caching modes (UPnP only)

From the application's own help text:

-A 0|1|2 HTTP caching mode (0=memory, 1=memory but claim it's infinite(*), 2=on disk)

So the variable UPNP_HTTP_CACHING_MODE can be set accordingly.

Output Codec values
Output Codec values for UPnP

From the application's own help text:

-c mp3[:<rate>]|opus[:<rate>]|vorbis[:rate]|flc[:0..9]|wav|pcm audio format send to player (flac)

So possible values include but are not limited to the following list: flc, flc:5, wav, mp3, mp3:320, etc.

Output Codec values for AirPlay

From the application's own help text:

-c <alac|pcm> audio format send to player (alac)

So possible values are alac and pcm.

Log Level Values

Please note that the possible values for the variables starting with LOG_LEVEL_ are the following: error, warn, info, debug, sdebug.

Generate a configuration file

You can generate a configuration file for the upnp version using the following command:

docker run -it \
  --user 1000:1000 \
  --network host \
  --rm \
  -v ${PWD}:/config \
  --entrypoint /app/bin/spotupnp-linux \
  giof71/spotconnect \
  -i /config/spotconnect-upnp-new.xml

The option --user 1000:1000 is needed if the current directory is owned by your user (use the correct uid/gid if they are not 1000 and 1000 respectively).
This will result in a new file named spotconnect-upnp-new.xml in you current directory.
Similarly the command for the airplay version is like the following:

docker run -it \
  --user 1000:1000 \
  --network host \
  --rm \
  -v ${PWD}:/config \
  --entrypoint /app/bin/spotraop-linux \
  giof71/spotconnect \
  -i /config/spotconnect-airplay-new.xml

The resulting file will be of course named spotconnect-airplay-new.xml.
You can then modify your configuration files to your needs and use them in the your compose file(s) by putting them in the /config volume.

Run

Simple docker-compose files below.

UPnP Mode
---
version: "3"

volumes:
  config:

services:
  spotconnect-upnp:
    image: giof71/spotconnect:latest
    container_name: spotconnect-upnp
    network_mode: host
    environment:
      - SPOTCONNECT_MODE=upnp
      - PUID=1000
      - PGID=1000
    volumes:
      - config:/config
    restart: unless-stopped
AirPlay Mode
---
version: "3"

volumes:
  config:

services:
  spotconnect-airplay:
    image: giof71/spotconnect:latest
    container_name: spotconnect-airplay
    network_mode: host
    environment:
      - SPOTCONNECT_MODE=raop
      - PUID=1000
      - PGID=1000
    volumes:
      - config:/config
    restart: unless-stopped

Changelog

The changelog of the upstream project is available here, on the upstream repo.

DATEDESCRIPTION
2026-09-14Bump to version 0.20.8
2026-09-09Bump to version 0.20.7
2026-09-07Bump to version 0.20.6
2026-08-08Bump to version 0.20.5
2026-08-06Bump to version 0.20.4
2026-07-21Bump to version 0.20.3
2025-12-25Bump to version 0.20.1
2025-10-11Build for arm/v5 instead of arm/v6
2025-10-11Bump to version 0.10.1
2024-09-11Do not save credentials to xml file (-j) by default
2024-09-10Add support for http caching mode (-A)
2024-09-10Add support for http content length mode (-g)
2024-09-10Add support for output codec (-c)
2024-03-11Prefer ip over iface for the select network interface
2024-03-09Auto select network interface (see #3)
2024-03-06Bump to version 0.9.2
2024-01-26Add support for log level of type raop
2024-01-26Bump to version 0.9.1
2024-01-15Bump to version 0.9.0
2024-01-10Add support for log levels
2024-01-09Bump to version 0.8.6
2023-12-27Bump to version 0.8.5
2023-12-26Bump to version 0.8.4
2023-12-18Bump to version 0.8.3
2023-12-17Bump to version 0.8.1
2023-12-13Support AppleTv Pairing mode (see #1)
2023-12-13Bump to version 0.8.0
2023-12-07Bump to version 0.7.0
2023-12-05Bump to version 0.6.2
2023-12-02Bump to version 0.6.1
2023-11-28Bump to version 0.6.0
2023-11-23First working release

Tag summary

Content type

Image

Digest

sha256:37a0ac7b9

Size

46.5 MB

Last updated

6 days ago

docker pull giof71/spotconnect