Skip to content

MPD - Music Player Daemon - Docker Image for amd64, arm64, arm (Raspberry Pi)

License

Notifications You must be signed in to change notification settings

Tob1as/docker-mpd

Repository files navigation

MPD - Music Player Daemon (Docker Image)

Supported tags

What is MPD?

Music Player Daemon (MPD) is a free and open music player server. It plays audio files, organizes playlists and maintains a music database. In order to interact with it, a client program is needed. The MPD distribution includes mpc, a simple command line client.

wikipedia.org/wiki/Music_Player_Daemon

About these images:

How to use this image

docker run --name mpd \
-p 6600:6600 -p 8000:8000 \
--device=/dev/snd:/dev/snd \
--cap-add=sys_nice \
-v $(pwd)/music:/var/lib/mpd/music:rw \
-v $(pwd)/playlists:/var/lib/mpd/playlists:rw \
-v $(pwd)/data:/var/lib/mpd/data:rw \
-d tobi312/rpi-mpd:alpine

optional (own config):

  1. download mpd.conf and edit
  2. add to docker run command: -v $(pwd)/mpd.conf:/etc/mpd.conf

http://localhost:8000 for Stream | Host: Host/IP , Port: 6600 for MPD Client.

Clients:
List of MPD Clients you can find here: https://www.musicpd.org/clients/
Examples: mympd or ampd, see docker-compose.yml-File.

Docker-Compose

version: '2.4'
services:
  mpd:
    #image: tobi312/rpi-mpd:debian
    image: tobi312/rpi-mpd:alpine
    container_name: mpd
    restart: unless-stopped
    ports:
      - 6600:6600  # MPD Client
      - 8000:8000  # Stream
    volumes:
      - ./Music:/var/lib/mpd/music:rw
      - ./playlists:/var/lib/mpd/playlists:rw
      - ./data:/var/lib/mpd/data:rw
      #- ./mpd.conf:/etc/mpd.conf:rw
    devices:
      - "/dev/snd:/dev/snd"

Troubleshooting

"Permission denied" in logs

Solution:

mkdir {Music,playlists,data} && chmod 777 {Music,playlists,data}

This Image on