DIY – How to Create Your Own Dedicated Music Server in Easy Steps

A vast majority of people need a regular fix of music in today’s busy lifestyle. Music relaxes our senses, soothes, takes our stress and pain away. Be it classical, hip-hop or any music genre in between, people enjoy them because it also increases their productivity in most of the cases. Though you might have dedicated MP3 devices ready to play the music of your choice, in this article we will show you how you can create your own music playing server. Not only can you play and queue music using your own music playing server, but can also control music volume remotely. Sounds cool?

Server Side Configuration

1) To get started, for hardware we would suggest you to search at your home, in your store-room or e-junkyard for any old PC/Laptop which is capable of booting and working audio hardware and networking device. We all have unused/old PC/Laptop lying around us with no use. You can use that spare machine for creating a feature rich media playing server which can play local files or even Internet streams. In our case we used Raspberry PI with Arch Linux loaded for the same. We will call this hardware as server here after. 2) Just install any Linux distribution of your choice on your server machine. After you finish installing your Linux distribution, we recommend you to update it to the latest packages. After installing and upgrading, you need to install mpd daemon (Media Player Daemon) on your server. In Debian based distros, you can pass following command to install mpd with the root credentials:

apt-get install mpd

On Fedora/Redhat use this command at root level:

yum install mpd

On Arch Linux use the following command under root level:

pacman -Syu mpd

3) After successful installation of Media Player Daemon, we will need to do some basic configuration editing on server to run media player daemon. Open mpd configuration file (mpd.conf) with the text editor of your choice. MPD config file can be found at the below location:

You can replace playlist_directory and music_directory variable with the path of your music directory. Next step will be to change ownership of mpd runtime files directory to “mpd”. You can do that by passing below command:

chown -R mpd /var/lib/mpd

4) Now your mpd setup is ready to groove 🙂 To start mpd service pass the following command with root login

mpd &

Tip: In case you want your MPD server to start automatically after every boot add the following crontab entry:

@reboot /usr/bin/mpd

In some Linux distros, mpd binary path may be different. You can locate mpd binary path using whereis command. Now server site setup is complete and we can move to the client side apps.

Linux: If we term Aria as the best MPD client on Linux, it wouldn’t be wrong to say so. Aria has a very nice user interface with many options inbuilt. You can download Aria using your package manager in Linux.

MPD apps are also available for both Windows Phone OS and iOS. You can try them and report us in the comments below.

Pro Tip : You can use mpd server to stream shoutcast streams. Please note that only mp3 codec is supported by mpd hence only mp3 streaming service will work. To play any stream from the shoutcast download playlist, open the playlist file in any text editor and copy the URL of stream with port number. After that paste the URL using any of the above mentioned clients.

P.S. This post was composed while playing shoutcast stream at the TechyLab headquarters!