/docker-snapcast

Snapcast multi-room audio streaming with Airplay, Spotify and HTTPS support enabled. Based on Alpine.

Primary LanguageDockerfile

Snapcast Container Image

Source on GitHub: https://github.com/firefrei/docker-snapcast
Image on Docker Hub: https://hub.docker.com/r/firefrei/snapcast

In a Nutshell

Snapcast multi-room-audio-streaming with AirPlay, Spotify and HTTPS support enabled. Based on Alpine Linux.

Long Version

This docker image serves a Snapcast server together with AirPlay (via shairport-sync) and Spotify (via librespot). Snapcast is loaded from the edge branch of Alpines APK repositories while shairport-sync and librespot are built manually with recommended options by Snapcast.
Additionally, NGINX is installed in the image to provide a HTTPS-secured connection to the Snapweb UI (HTTP-only is directly provided by Snapcast).

Usage

Docker Compose (recommended)

See docker-compose.yaml for an example configuration.

Docker CLI

Run container with:

docker run -it \
  -p '1704-1705:1704-1705' \
  -p '1780:1780' \
  -p '3689:3689' \
  -p '5000-5005:5000-5005' \
  -p '6000-6005:6000-6005/udp' \
  -p '5353:5353' \
  -p '443:443' \
  -v '/etc/localtime:/etc/localtime:ro' \
  -v '~/config_snapcast/:/root/.config/snapserver/'
  firefrei/snapcast

Optional volume mounts for NGINX reverse proxy:

  -v '~/nginx_certs/:/app/certs/'

Configuration File Paths

  • /root/.config/snapserver/
    Path to snapcast server configuration. Place your custom snapserver.conf file here. Snapserver will also place its run-time configuration (like server.json) here.
  • /app/certs/
    NGINX is configured as a reverse proxy and will listen on port 443 to serve a HTTPS-secured connection to Snapweb. This folder must contain the TLS certificate files: snapserver.pem contains the certificate (chain) and snapserver.key the private key file.