Snapcast Multiroom audio docker image w/ Snapweb files.
Based on linuxserver/docker-baseimage-alpine & snapcast. Also available at DockerHub
Should get used in conjunction with a player, that plays to a FIFO, like:
- Snapserver w/ sane defaults
- Snapclient (optional, needs mounting of host audio devices into docker)
- I prefer using the snapclient as host distribution package.
- snapweb management interface & browser audio playback
- default on http://:1780m which include a browser snapclient player
- alsa
- librespot (for functioning as spotify target)
- shairport-sync (for functioning as airplay target)
- FIFO usage to stream the audio from players to the network
- Based on linuxserver/docker-baseimage-alpine
- ... which allows use of linuxserver/docker-mods to add more pip & OS packages
- Uses s6-overlay from base image
- small footprint
I strongly advice to use docker-compose, as using a docker commandline is quite annoying with a complex setup. An example can get found in the repository. A more complex example together with mopidy can get found at mopiroom.
version: "3"
services:
snapcast:
image: docker.io/sweisgerber/snapcast:latest
hostname: snapcast
environment:
- PUID=1000
- PGID=1000 # set to audio group ID
- TZ=Europe/Berlin
- START_SNAPCLIENT=false # set to `true` for snapclient to start
# --host: name or ip of compose service or dockerhost
# --soundcard: <ID> from `snapclient -l` from inside the container
# - SNAPCLIENT_OPTS=--host snapcast --soundcard <ID>
# => Don't use quotes for SNAPCLIENT_OPTS="" !
# - HOST_AUDIO_GROUP=<AUDIO-GID> # set to GID of host audio group
restart: "unless-stopped"
ports:
- 1704:1704
- 1705:1705
- 1780:1780
# devices:
# - /dev/snd:/dev/snd # optional, only if you want to use snapclient
volumes:
- /<path>/<to>/<snapcast>/config/:/config/
- /<path>/<to>/<snapcast>/data/:/data/
# /audio should get used to place FIFOs for audio playback from mpd/mopidy/host/etc
- /<path>/<to>/audio-fifos/:/audio/
To enable snapclient:
- Forward device
/dev/snd
into the container, which should get used exclusively by snapclient. Or try a more sophisticated setup: - Configue
START_SNAPCLIENT=true
as environment variable. - Configure
SNAPCLIENT_OPTS
as environment variable as needed, or leave empty to try defaults.- probably you will need to specify soundcard
--soundcard
, find out withsnapclient --list
- probably you will need to specify soundcard
In any case, give the official documentation a read