Skip to content

Configuration

The odio installer generates ~/.config/mpd-discplayer/config.yaml automatically. The configuration shown below documents all available options — you only need to edit the file if you want to customize the defaults.

For standalone installations, the config file can also be created manually at ~/.config/mpd-discplayer/config.yaml.

gnuHelloEmail: "your-email@example.com"
gnuDbUrl: "https://gnudb.gnudb.org"
MPDConnection:
Type: "unix"
Address: "/run/user/1000/mpd/socket"
ReconnectWait: 30
MPDLibraryFolder: "/var/lib/mpd/music"
MPDCueSubfolder: ".disc-cuer"
MPDUSBSubfolder: ".udisks"
MountConfig: "mpd"
DiscSpeed: 12
SoundsLocation: "/usr/local/share/mpd-discplayer"
AudioBackend: "pulse"
PulseServer: ""
Schedule: {}
MPDConnection:
Type: "unix" # "unix" (recommended) or "tcp"
Address: "/run/user/1000/mpd/socket" # socket path or host:port
ReconnectWait: 30 # seconds between reconnection attempts

Using a Unix socket is recommended — it enables automatic discovery of MPD’s music_directory, used to store CUE files and USB symlinks.

For TCP connections, set Address to 127.0.0.1:6600 (default).

go-mpd-discplayer delegates CUE file generation to go-disc-cuer, which queries GnuDB and MusicBrainz for track metadata and cover art.

gnuHelloEmail: "your-email@example.com" # required for GnuDB lookups
gnuDbUrl: "https://gnudb.gnudb.org" # default
DiscSpeed: 12 # playback speed (default: 12x)

The drive runs at full speed during disc initialization (metadata read), then slows down for quiet playback.

MPDCueSubfolder: ".disc-cuer" # subfolder in MPD music directory

CUE files are cached in <MPDLibraryFolder>/<MPDCueSubfolder>/.

See disc-cuer for standalone usage and configuration.

MountConfig: "mpd" # "mpd" (native MPD mounting) or "symlink"
MPDLibraryFolder: "/var/lib/mpd/music" # auto-discovered with unix socket
MPDUSBSubfolder: ".udisks" # only used with "symlink" mode
  • mpd — uses MPD’s native udisks2 mounting. Requires the neighbors plugin in MPD config.
  • symlink — creates symlinks in MPD’s music directory. Works with any MPD setup.

On headless systems, udisks2 may deny mount requests. The odio installer deploys this rule automatically at /etc/polkit-1/rules.d/80-mpd-udisks.rules:

polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount" ||
action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat") &&
subject.user == "<username>") {
return polkit.Result.YES;
}
});

On desktop systems with a graphical session, this rule is not needed.

mpd-discplayer requires specific MPD plugins to be enabled. Add the following to your MPD config:

# Audio CD support
input {
plugin "cdio_paranoia"
}
# CUE sheet support
playlist_plugin {
name "cue"
enabled "true"
as_directory "true"
}

The as_directory "true" option is critical — it makes MPD expose the CUE sheet as a virtual directory instead of a flat playlist. This is what allows the mpDris2 fork to find the cover.jpg fetched by go-disc-cuer alongside the virtual tracks, and forward it over MPRIS to the embedded UI and the odio application. See MPD — Playback controls for more details.

For USB support with MountConfig: "mpd", also add:

# USB mounting via udisks2
neighbors {
plugin "udisks"
}
# Required with neighbors plugin
database {
plugin "simple"
path "~/.local/share/mpd/db"
cache_directory "~/.local/share/mpd/cache"
}

Automate playback of any MPD-compatible URI on a cron schedule:

Schedule:
# Reggae radio on weekdays at 6:30 AM
"30 6 * * 1-5": "//hd.lagrosseradio.info/lagrosseradio-reggae-192.mp3"
# Audio CD on Saturdays at 9:00 AM
"0 9 * * 6": "cdda://"
# USB device on Sundays at 9:00 PM
"0 21 * * 0": "{usb_label}"

Invalid cron expressions are discarded and logged on startup. A notification is triggered before starting scheduled playback.

AudioBackend: "pulse" # "pulse" (default), "alsa", or "none"
PulseServer: "" # PulseAudio server string (empty = local socket)
SoundsLocation: "/usr/local/share/mpd-discplayer"

Notifications expect in.pcm, out.pcm, and error.pcm files in SoundsLocation. If missing, notifications are disabled.

All options can be set via environment variables prefixed with MPD_DISCPLAYER_:

VariableConfig keyDefault
MPD_DISCPLAYER_GNUHELLOEMAILgnuHelloEmail(empty, disables GnuDB)
MPD_DISCPLAYER_GNUDBURLgnuDbUrlhttps://gnudb.gnudb.org
MPD_DISCPLAYER_MPDCONNECTION_TYPEMPDConnection.Typetcp
MPD_DISCPLAYER_MPDCONNECTION_ADDRESSMPDConnection.Address127.0.0.1:6600
MPD_DISCPLAYER_MPDCONNECTION_RECONNECTWAITMPDConnection.ReconnectWait30
MPD_DISCPLAYER_MPDLIBRARYFOLDERMPDLibraryFolder/var/lib/mpd/music
MPD_DISCPLAYER_DISCSPEEDDiscSpeed12
MPD_DISCPLAYER_MOUNTCONFIGMountConfigmpd
MPD_DISCPLAYER_MPDCUESUBFOLDERMPDCueSubfolder.disc-cuer
MPD_DISCPLAYER_MPDUSBSUBFOLDERMPDUSBSubfolder.udisks
MPD_DISCPLAYER_AUDIOBACKENDAudioBackendpulse
MPD_DISCPLAYER_PULSESERVERPulseServer(empty)
MPD_DISCPLAYER_SOUNDSLOCATIONSoundsLocation/usr/local/share/mpd-discplayer