You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Wouter Habets 35694836c9
Merge branch '421p-master'
1 year ago
.dockerignore Remove snapcast, improve storage 2 years ago
Dockerfile Remove Mopidy-Youtube 1 year ago
Makefile build for raspberry pi 1 year ago Remove Mopidy-Youtube 1 year ago Remove Mopidy-Youtube 1 year ago
localscan Remove snapcast, improve storage 2 years ago
mopidy.conf Revert musicbox settings 2 years ago Remove Mopidy-Youtube 1 year ago

Mopidy Docker image

Image for running Mopidy in Docker. Uses Pulseaudio for audio output.


Frontend extensions

Backend extensions

  • Spotify
  • Spotify tunigo
  • Soundcloud
  • Scrobbler
  • Tunein
  • Local SQLite

How to use

docker run \
    --name mopidy \
    -e PULSE_SERVER=tcp: \     # Pulseaudio server. Point to external IP of Pulse server
    -v $PWD/media:/media:ro \              # Media files
    -v $PWD/data:/var/lib/mopidy \         # Mopidy data and cache
    -v $PWD/mopidy.conf:/mopidy.conf \     # Override config (for accounts)
    -p 6600:6600 \                         # Port for MPD
    -p 6680:6680 \                         # Port for the webinterface
    -p 6681:6681 \                         # (Optional) Port for Iris pusher service


To get sound, run a Pulseaudio server with tcp enabled. Point the PULSE_SERVER environment variable in the container to the external IP of the machine running the Pulseaudio server.


To keep the Mopidy data persistent, /var/lib/mopidy should be mounted as a volume. The Mopidy user must have write access to this directory. Set this with chown -R 105 /path/to/data.


To add Spotify, Last.FM etc. accounts, use the /mopidy.conf file. Example:

enabled = true
username =
password =

enabled = true
username =
password =

enabled = true
auth_token =

This same file can be used to override parts of the default configuration. For example: by default, the file browser in Mopidy is disabled to enable it:

enable = true

The complete default config can be found in the file mopidy.conf

Local media

To play local media files, mount /media. All meta data will be stored using Mopidy-Local-SQLite. To scan for new media files, run docker exec -it mopidy localscan.

Adding extensions

To add extensions, I advice to override this image by creating your own Dockerfile. In the example below, the material webclient is added. To add packages, we switch to the root user, run pip to add everything we need and switch back to the mopidy user.

FROM whhoesj/mopidy:latest
USER root
RUN pip install 
USER mopidy