Setup MPD on Ubuntu *Music player Daemon*

So what is MPD?

Well, MPD Stands for Music Player Daemon. This is a Daemon  for Linux, Windows or Mac which allows you to play music. Sounds pretty basic right? Wrong! It has full database support, supports anything FFMPEG can play, (mp3, ogg, wma, flac, etc) runs quietly in the background, and supports administration over IP from multiple clients at the same time! It’s quite simple to get setup  and with the same ease and features of say iTunes or Windows Media Player (play lists, shuffle, full search functions) All in all its an amazing powerful little tool.

Lets install it

installing and Configuring (ubuntu based system)

apt-get install mpd

It is going to download 10MB of archives, so you just got to give it a sec to let it complete…(Just be thankful you are not on my university internet…. Yea, a full 4KB/s!)

After that finishes, it will start the daemon with it’s default settings, so we need to edit the config file.

nano /etc/mpd.conf

First off, change the “music_directory” to your actual music directory.

Next, go to “bind_to_address” and enter in “″. For some reason or another, MPD does not like localhost even though it is the default. Probably an Ubuntu thing…

Continue scrolling down until you get to audio_output. If you plan on using default alsa then it’s all good, it should already be configured. Now, if you want to stream your music over a network and not use alsa, comment out the alsa part by putting # in front of each line of configuration for it, there are a few! Next, pick the protocol that you wish to use and un-comment it. For example, I wanted to use the HTTP streaming server, so mine looks like this:

audio_output {
 type            "httpd"
 name            "My HTTP Stream"
 encoder         "vorbis"                # optional, vorbis or lame
 port            "8080"
 #      quality         "5.0"                   # do not define if bitrate is defined
 bitrate         "128"                   # do not define if quality is defined
 format          "44100:16:1"

Under encoder, select vorbis to use ogg vorbis format, or lame for MP3. Unfortunately, due to patent issues, you are going to have to download and compile MPD  directly from their site for it to work.  The last step is to restart the daemon.

sudo service mpd restart

And that’s it! If you don’t get any error messages, then it should be working!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s