Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ ver 0.25 (not yet released)
* require Meson 1.2

ver 0.24.7 (not yet released)
* decoder
- ffmpeg: allow seeking only if both AVFormatContext and InputStream allow it
* fix GCC 16 compiler warning
* fix spurious linker failures

ver 0.24.6 (2025/10/20)
Expand Down
189 changes: 124 additions & 65 deletions doc/mpd.conf.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,34 @@ Global Settings
System Settings
^^^^^^^^^^^^^^^

user <username>
.. confval:: user
:type: NAME

This specifies the user that MPD will run as, if set. MPD should never run
as root, and you may use this option to make MPD change its user id after
initialization. Do not use this option if you start MPD as an unprivileged
user.

group <groupname>
.. confval:: group
:type: NAME

Change to this group. This discards all default groups and uses
only this group. Do not use this setting.

pid_file <file>
.. confval:: pid_file
:type: PATH

This specifies the file to save mpd's process ID in.

log_file <file>
.. confval:: log_file
:type: PATH

This specifies where the log file should be located. The special value "syslog" makes MPD use the local syslog daemon.

log_level <level>
.. confval:: log_level
:type: LEVEL
:default: ``notice``

Suppress all messages below the given threshold. The following
log levels are available:

Expand All @@ -107,126 +118,174 @@ log_level <level>
- :samp:`verbose`: debug messages (for developers and for
troubleshooting)

The default is :samp:`notice`.


Client Settings
^^^^^^^^^^^^^^^

port <port>
This specifies the port that mpd listens on. The default is 6600.
.. confval:: port
:type: number
:default: :samp:`6600`

This specifies the port that mpd listens on.


File Settings
^^^^^^^^^^^^^

db_file <file>
.. confval:: db_file
:type: PATH

This specifies where the db file will be stored.

sticker_file <file>
.. confval:: sticker_file
:type: PATH

The location of the sticker database. This is a database which manages
dynamic information attached to songs.

music_directory <directory>
.. confval:: music_directory
:type: PATH

This specifies the directory where music is located. If you do not configure
this, you can only play streams.

playlist_directory <directory>
.. confval:: playlist_directory
:type: PATH

This specifies the directory where saved playlists are stored. If
you do not configure this, you cannot save playlists.

state_file <file>
.. confval:: state_file
:type: PATH

This specifies if a state file is used and where it is located. The state of
mpd will be saved to this file when mpd is terminated by a TERM signal or by
the :program:`kill` command. When mpd is restarted, it will read the state file and
restore the state of mpd (including the playlist).

follow_outside_symlinks <yes or no>
Control if MPD will follow symbolic links pointing outside the music dir. You
must recreate the database after changing this option. The default is "yes".
.. confval:: follow_outside_symlinks
:type: ``yes`` or ``no``
:default: ``yes``

Control if MPD will follow symbolic links pointing outside the music dir. You
must recreate the database after changing this option.

.. confval:: follow_inside_symlinks
:type: ``yes`` or ``no``
:default: ``yes``

follow_inside_symlinks <yes or no>
Control if MPD will follow symbolic links pointing inside the music dir,
potentially adding duplicates to the database. You must recreate the
database after changing this option. The default is "yes".
Control if MPD will follow symbolic links pointing inside the music dir,
potentially adding duplicates to the database. You must recreate the
database after changing this option.

auto_update <yes or no>
This specifies the whether to support automatic update of music database
when files are changed in music_directory. The default is to disable
autoupdate of database.
(Only implemented on Linux.)
.. confval:: auto_update
:type: ``yes`` or ``no``
:default: ``no``

auto_update_depth <N>
Limit the depth of the directories being watched, 0 means only watch the
music directory itself. There is no limit by default.
This specifies the whether to support automatic update of music database
when files are changed in music_directory.
(Only implemented on Linux.)

save_absolute_paths_in_playlists <yes or no>
This specifies whether relative or absolute paths for song filenames are used
when saving playlists. The default is "no".
.. confval:: auto_update_depth
:type: number
:default: unlimited

filesystem_charset <charset>
This specifies the character set used for the filesystem. A list of supported
character sets can be obtained by running "iconv -l". The default is
determined from the locale when the db was originally created.
Limit the depth of the directories being watched, 0 means only watch the
music directory itself.

.. confval:: save_absolute_paths_in_playlists
:type: ``yes`` or ``no``
:default: ``no``

This specifies whether relative or absolute paths for song filenames are used
when saving playlists.

.. confval:: filesystem_charset
:type: CHARSET

This specifies the character set used for the filesystem. A list of supported
character sets can be obtained by running "iconv -l". The default is
determined from the locale when the db was originally created.


Player Settings
^^^^^^^^^^^^^^^

restore_paused <yes or no>
.. confval:: restore_paused
:type: ``yes`` or ``no``
:default: ``no``

Put MPD into pause mode instead of starting playback after startup.


Other Settings
^^^^^^^^^^^^^^

zeroconf_enabled <yes or no>
If yes, and MPD has been compiled with support for Avahi or Bonjour, service
information will be published with Zeroconf. The default is yes.
.. confval:: zeroconf_enabled
:type: ``yes`` or ``no``
:default: ``yes``

If yes, and MPD has been compiled with support for Avahi or Bonjour, service
information will be published with Zeroconf.

.. confval:: zeroconf_name
:type: NAME
:default: :samp:`Music Player @ %h`

zeroconf_name <name>
If Zeroconf is enabled, this is the service name to publish. This name should
be unique to your local network, but name collisions will be properly dealt
with. The default is "Music Player @ %h", where %h will be replaced with the
hostname of the machine running MPD.
If Zeroconf is enabled, this is the service name to publish. This
name should be unique to your local network, but name collisions
will be properly dealt with. ``%h`` will be replaced with the
hostname of the machine running MPD.

audio_output
See DESCRIPTION and the various ``AUDIO OUTPUT OPTIONS`` sections for the
format of this block. Multiple audio_output sections may be specified. If
no audio_output section is specified, then MPD will scan for a usable audio
output.
.. confval:: audio_output

See DESCRIPTION and the various ``AUDIO OUTPUT OPTIONS`` sections for the
format of this block. Multiple audio_output sections may be specified. If
no audio_output section is specified, then MPD will scan for a usable audio
output.

Required Audio Output Settings
------------------------------

type <type>
This specifies the audio output type. See the list of supported outputs in
``mpd --version`` for possible values.
.. confval:: type
:type: NAME

This specifies the audio output type. See the list of supported outputs in
``mpd --version`` for possible values.

.. confval:: name
:type: NAME

name <name>
This specifies a unique name for the audio output.
This specifies a unique name for the audio output.

Optional Audio Output Settings
------------------------------

format <sample_rate:bits:channels>
.. confval:: format
:type: ``sample_rate:bits:channels``

This specifies the sample rate, bits per sample, and number of channels of
audio that is sent to the audio output device. See documentation for the
``audio_output_format`` option for more details. The default is to use
whatever audio format is passed to the audio output. Any of the three
attributes may be an asterisk to specify that this attribute should not be
enforced

replay_gain_handler <software, mixer or none>
Specifies how replay gain is applied. The default is "software", which uses
an internal software volume control. "mixer" uses the configured (hardware)
mixer control. "none" disables replay gain on this audio output.
.. confval:: replay_gain_handler
:type: ``software``, ``mixer`` or ``none``
:default: ``software``

Specifies how replay gain is applied. ``software`` uses an internal
software volume control. ``mixer`` uses the configured (hardware)
mixer control. ``none`` disables replay gain on this audio output.

.. confval:: mixer_type
:type: ``hardware``, ``software`` or ``none``
:default: ``hardware`` (if supported) or ``none``

mixer_type <hardware, software or none>
Specifies which mixer should be used for this audio output: the hardware
mixer (available for ALSA, OSS and PulseAudio), the software mixer or no
mixer ("none"). By default, the hardware mixer is used for devices which
support it, and none for the others.
Specifies which mixer should be used for this audio output: the hardware
mixer (available for ALSA, OSS and PulseAudio), the software mixer or no
mixer (``none``).

Files
-----
Expand Down
11 changes: 10 additions & 1 deletion doc/mpdconf.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
# Read the user manual for documentation: https://mpd.readthedocs.io/en/stable/user.html#configuration


# Files and directories #######################################################
Expand Down Expand Up @@ -166,6 +166,15 @@
# If this setting is set, MPD will require password authorization. The password
# setting can be specified multiple times for different password profiles.
#
# Possible permisisons:
#
# NAME DESCRIPTION
# read Allows reading of the database, displaying the current playlist, and current status of MPD.
# add Allows adding songs and loading playlists.
# player Allows any player and queue manipulation (start/pause/stop playback etc.).
# control Allows all other player and playlist manipulations.
# admin Allows manipulating outputs, stickers and partitions, mounting/unmounting storage and shutting down MPD.
#
#password "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in.
Expand Down
33 changes: 25 additions & 8 deletions doc/user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,16 @@ information about the :program:`MPD` configuration file.
Configuring the music directory
-------------------------------

When you play local files, you should organize them within a directory called the "music directory". This is configured in :program:`MPD` with the music_directory setting.
When you play local files, you should organize them within a directory
called the "music directory". This is configured in :program:`MPD`
with the :confval:`music_directory` setting.

By default, :program:`MPD` follows symbolic links in the music directory. This behavior can be switched off: :code:`follow_outside_symlinks` controls whether :program:`MPD` follows links pointing to files outside of the music directory, and :code:`follow_inside_symlinks` lets you disable symlinks to files inside the music directory.
By default, :program:`MPD` follows symbolic links in the music
directory. This behavior can be switched off:
:confval:`follow_outside_symlinks` controls whether :program:`MPD`
follows links pointing to files outside of the music directory, and
:confval:`follow_inside_symlinks` lets you disable symlinks to files
inside the music directory.

Instead of using local files, you can use storage plugins to access
files on a remote file server. For example, to use music from the
Expand Down Expand Up @@ -788,7 +795,7 @@ address::
bind_to_address "@mpd"

If no port is specified, the default port is 6600. This default can
be changed with the port setting::
be changed with the :confval:`port` setting::

port "6601"

Expand Down Expand Up @@ -984,7 +991,14 @@ One approach for optimization is running :program:`MPD` on the file server, whic
host "fileserver.local"
}

The :code:`music_directory` setting tells :program:`MPD` to read files from the given NFS server. It does this by connecting to the server from userspace. This does not actually mount the file server into the kernel's virtual file system, and thus requires no kernel cooperation and no special privileges. It does not even require a kernel with NFS support, only the nfs storage plugin (using the libnfs userspace library). The same can be done with SMB/CIFS using the smbclient storage plugin (using libsmbclient).
The :confval:`music_directory` setting tells :program:`MPD` to read
files from the given NFS server. It does this by connecting to the
server from userspace. This does not actually mount the file server
into the kernel's virtual file system, and thus requires no kernel
cooperation and no special privileges. It does not even require a
kernel with NFS support, only the nfs storage plugin (using the libnfs
userspace library). The same can be done with SMB/CIFS using the
smbclient storage plugin (using libsmbclient).

The database setting tells :program:`MPD` to pass all database queries on to the :program:`MPD` instance running on the file server (using the proxy plugin).

Expand Down Expand Up @@ -1056,7 +1070,7 @@ simply type::
This will start :program:`MPD` as a daemon process (which means it
detaches from your terminal and continues to run in background). To
stop it, send ``SIGTERM`` to the process; if you have configured a
``pid_file``, you can use the ``--kill`` option::
:confval:`pid_file`, you can use the ``--kill`` option::

mpd --kill

Expand Down Expand Up @@ -1192,7 +1206,10 @@ Mounting is only possible with the simple database plugin and a :code:`cache_dir
# cache_directory "~/.mpd/cache"
}

This requires migrating from the old :code:`db_file` setting to a database section. The cache directory must exist, and :program:`MPD` will put one file per mount there, which will be reused when the same storage is used again later.
This requires migrating from the old :confval:`db_file` setting to a
database section. The cache directory must exist, and :program:`MPD`
will put one file per mount there, which will be reused when the same
storage is used again later.

Metadata
--------
Expand Down Expand Up @@ -1225,7 +1242,7 @@ Stored Playlists
Stored playlists are some kind of secondary playlists which can be
created, saved, edited and deleted by the client. They are addressed
by their names. Its contents can be loaded into the queue, to be
played back. The :code:`playlist_directory` setting specifies where
played back. The :confval:`playlist_directory` setting specifies where
those playlists are stored.

Advanced usage
Expand Down Expand Up @@ -1395,7 +1412,7 @@ Database
I can't see my music in the MPD database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Check your :code:`music_directory` setting.
* Check your :confval:`music_directory` setting.
* Does the MPD user have read permission on all music files, and read+execute permission on all music directories (and all of their parent directories)?
* Did you update the database? (mpc update)
* Did you enable all relevant decoder plugins at compile time? :command:`mpd --version` will tell you.
Expand Down
Loading
Loading