Installing MiniDLNA on Ubuntu Server

When setting up my Ubuntu server I wanted it to be able to stream my media via UPnP/DLNA, I looked at a few solutions including MediaTomb and uShare, however I decided to go with MiniDLNA based on the fact that it was lightweight (my server isn’t the most powerful) and that I have a Western Digital TV Live which plays pretty much any file format meaning I didn’t need the server to transcode my media, MiniDLNA will quite happily however stream media to my other devices, like MP3′s and AVI’s (XviD/AC3) to my Xbox 360.

Installing MiniDLNA is available in the default repositories if you are running Ubuntu 11.10 and it can be installed by running the command

sudo apt-get install minidlna

If you are using a version of Ubuntu older than 11.10, you will need to add the stedy-minidlna PPA (view this post if the command below does not work)

sudo add-apt-repository ppa:stedy6/stedy-minidna

Then you can install MiniDLNA

sudo apt-get update && sudo apt-get install minidlna

Once installed, all that is left is to edit the configuration file

sudo nano /etc/minidlna.conf

Add the following to your conf file, remembering to update the paths to your media

media_dir=A,/media/storage/Share/Music
media_dir=P,/media/storage/Share/Pictures
media_dir=V,/media/storage/Share/Videos

And finally, and this is totally optional, if you wish to rename your server, remove the # from the friendly_name line, and enter your chosen name, like below

friendly_name=SERVER

MiniDLNA is now configured to share your media, to force a database rescan run

sudo minidlna -R

You can also restart the service using the command

sudo service minidlna restart

For anyone interested, I have also published an Arch Linux version of this guide here.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>