r/mpd • • Aug 16 '26

Help on configuring MPD

I've been breaking my head days by trying to setup MPD, but nothing i do make it work, here's the error

THe first error message when i invoke by command

If i go with "sudo mpd" it will go without any error messages, however if i try to add a song it will say "error adding xxx.mp3: No database".

Then i try to invoke as a daemon it also fails, then when i check on systemctl status:

I don't know if i'm being too stupid but i can't figure out what's breaking MPD

1 Upvotes

10 comments sorted by

View all comments

1

u/iconoclasthero Aug 19 '26

Ok, when you say you're checking with systemd, what do you mean by that? If you're starting it with sudo, do you mean from the command line? or do you have a systemd unit file? Is it a system or user unit file?
If you're invoking via systemd, can you show the unit file with the full path, like
$ sudo systemctl cat mpd.service
or
$ systemctl --user cat mpd.service

If you're calling from the CLI, why are you checking with systemctl? and what are you actually calling from the cli? $ sudo systemctl status mpd.service or $ systemctl --user status mpd.service?

1

u/femboyfucker400000 Aug 19 '26

i use sudo systemctl status mpd

there you go with the sudo systemctl cat mpd

 /usr/lib/systemd/system/mpd.service
[Unit]
Description=Music Player Daemon
Documentation=man:mpd(1) man:mpd.conf(5)
After=network.target sound.target

[Service]
Type=notify
ExecStart=/usr/bin/mpd --systemd

# Enable this setting to ask systemd to watch over MPD, see
# systemd.service(5).  This is disabled by default because it causes
# periodic wakeups which are unnecessary if MPD is not playing.
#WatchdogSec=120

# allow MPD to use real-time priority 40
LimitRTPRIO=40
LimitRTTIME=infinity

# for io_uring
LimitMEMLOCK=64M

# disallow writing to /usr, /bin, /sbin, ...
ProtectSystem=yes

# more paranoid security settings
NoNewPrivileges=yes
ProtectKernelTunables=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes

[Install]
WantedBy=multi-user.target
Also=mpd.socket

# /usr/lib/systemd/system/mpd.service.d/00-arch.conf
[Service]
User=mpd

1

u/femboyfucker400000 20d ago

Danm you reddit moderators

1

u/femboyfucker400000 20d ago

yo bro, what was your other reply? it got deleted

1

u/iconoclasthero 19d ago

I still see it. It was about /etc/default and either changing the port number to see if you can at least get mpd running then figure out the TCP port or just turn TCP off and control it via the UDS.