Profile Picture

Spencer B.

👋 Hello, name is Spencer. I am a CS graduate, programmer, and Linux enthusiast. Outside of technology, I enjoy learning, playing guitar, and citizen science.

feed | tips | contact

How to Set up MPD on Void Linux

Calendar icon September 16, 2020

Clock icon 2 min read

Folder icon #music #mpd #void #linux #software in tech

What is MPD?

Music Player Daemon or MPD is a music server. On Linux, several music players such as Cantata and ncmpcpp depend on it. Why split a music player into a server and a client? It enables you (and perhaps some family/friends) to access your music on all of your devices, even while away from home. MPD is supplemented greatly by using Beets in conjunction to properly organize, get album art for, and tag your music.


Void Linux

I’m making a guide for Void Linux because most MPD setup guides on the internet are for Ubuntu, Fedora, or Arch Linux. These Linux distributions and tutorials all use systemd to manage services, whereas Void uses runit, which changes things slightly.


First, install MPD:

# xbps-install -S mpd

Open /etc/mpd.conf in a text editor, and find the music_directory setting. Uncomment (remove leading #) if necessary and enter the path to your music collection. For me this looks like music_directory "~/music".

I’d also recommend setting playlist_directory to somewhere easily accessible. Set the address and port if you need to, but the default should work fine if you are using MPD on your home network or a single machine.

You can set a user for MPD to run as, but for use on a single computer I recommend leaving it commented so that you don’t have to worry about the MPD user not being able to access your music collection.


Now you just need to enable the MPD service, on Void Linux that is:

# ln -s /etc/sv/mpd /var/service

If you have any interest in song ratings, see my post “How to Enable MPD Track Ratings on Void Linux”


If something goes wrong, try running mpd in the terminal. If it complains about missing directories, create them manually. If it has issues binding to the network port, make sure nothing else is running on the port specified or that there isn’t an instance of MPD already running. Should you still have issues, the MPD manual has a troubleshooting chapter.