MPD (Music Player Daemon)

MPD (Music Player Daemon) is a player that leverages a client/server architecture, which allows the user to control it remotely using the various clients available for it.
It is a great choice for those users that are looking for a minimalist yet powerful tool to listen to and control their audio files.

{i} A separate client is needed to control MPD. A few of them are listed below.

Contents

  1. Information
  2. Usage
    1. Headless setup
    2. Desktop setup
    3. Configuration
    4. Smoke test
    5. Tweaks
  3. Clients
    1. Console clients
    2. Graphical clients

Information

Versions

https://badges.debian.net/badges/debian/stable/mpd/version.svg https://badges.debian.net/badges/debian/testing/mpd/version.svg https://badges.debian.net/badges/debian/unstable/mpd/version.svg
https://repology.org/badge/version-for-repo/ubuntu_24_04/mpd.svg https://repology.org/badge/version-for-repo/ubuntu_24_10/mpd.svg https://repology.org/badge/version-for-repo/ubuntu_25_04/mpd.svg

Links

Usage

Debian package specific setup

For official and latest details about MPD Debian integration please also consult file:///usr/share/doc/mpd/README.Debian

Headless setup

MPD in Debian was installed by default as a system service starting on boot. This has changed in trixie and the service is not longer started by default.

However running MPD as a system service works well on headless boxes and configuration is done in /etc/mpd.conf. Ensure MPD service is enabled and started:

# As root, enable/start system service
systemctl enable --now mpd

MPD will look for music in /var/lib/mpd/music, make sure content within this directory are readable for mpd user (the user running MPD system wide).

MPD will listen on localhost:6600 for client to connect, adapt bind_to_address config option to connect MPD from remote hosts.

Desktop setup

In order to use MPD within a graphical desktop session you need to start MPD from the user session and disable system service:

# As root, disable system service
systemctl disable --now mpd
# As user logged in the desktop session
systemctl --user enable mpd

Configuration is done in $XDG_CONFIG_HOME/mpd/mpd.conf (usually $XDG_CONFIG_HOME is ~/.config).

Drop at least an empty file in $XDG_CONFIG_HOME/mpd/mpd.conf to override system wide setting in /etc/mpd.conf.

Then start MPD:

systemctl --user start mpd

Music directory defaults to the XDG directory, run "xdg-user-dir MUSIC" command to print its value on your system. Change the default value with music_directory option if needed.

In case the right audio output is not correctly auto detected, see below to configure audio_output option.

Configuration

Configuration example from upstream is available in /usr/share/doc/mpd/mpdconf.example.gz.

HTML documentation is available in file:///usr/share/doc/mpd/html/user.html

Audio output

MPD tries to auto detect audio output device, but you can force a specific configuration adding an audio_output section in mpd.conf.

pulseaudio

audio_output {
 type "pulse"
 name "My Pulse Output"
}

alsa

audio_output {
 type "alsa"
 name "My ALSA device"
}

pipewire

audio_output {
 type "pipewire"
 name "PipeWire Sound Server"
}

Smoke test

Install mpc console client (apt install mpc) on the same host and run stats command :

# This should print some stats about the server and the music library
mpc stats
# Add files and play
mpc add / && mpc play

Tweaks

Huge Playlists

If you encounter client problems like not being able to sort the playlist due to it's size you need to change mpd's resource-limitations

# ref: file:///usr/share/doc/mpd/html/user.html#resource-limitations
# var override default
max_playlist_length "30480" #16384
max_output_buffer_size "22384" #8192
max_command_list_size "8192" #2048

Clients

Console clients

  • mpc: non interactive console client

  • ncmpc: ncurses client

  • ncmpcpp: ncurses client

  • pms: Practical Music Search

Graphical clients

  • ario: GTK+ client for the Music Player Daemon

  • cantata: Qt client for the music player daemon

  • gbemol: Graphical frontend for the Music Player Daemon

  • gmpc: GNOME Music Player Client

  • ymuse: GTK client for Music Player Daemon written in Go (program)


CategorySound CategorySoftware

AltStyle によって変換されたページ (->オリジナル) /