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.
Hi,
Thank You very much for that tutorial its great, minidlna is great…
Can I use Your tutorial on my blog ( translated to polish ) ?
Of course, whould you be able to link back to my article for any anyone who want’s the guide in English?
Great! Thank U…
Sure i will link back…
Pingback: Własny server DLNA oparty na UBUNTU 11.10 | LOCO SAMA PRAWDA
Great tutorial but Im having one problem. My bluray see’s the minidlna server labeled “mint 12″ and connects to it fine but says theres no playable files. I streamed the same file to the bluray using windows so I know it isnt the file. Any ideas?
Nevermind minidlna was just slow to find the file I wanted. Thank you again. As the last person said Id like to address this on my site and Ill link back here if thats ok with you.
Hello Luke. Glad you found the article useful, of course you can use this, link back will be great too, let me know if you have any more issues.
Would like to have a possibility to scan (underlaying) recursive firectories.
Have set up my server no a hy level of sub divisions. And the config file forces me to write out all possibillities.
Wolud like to explain in the config file /music (and all underlying dirs woyld bescanned)
Now I have to code: /music/dir1
/music/dir2
/music/dir3
/music/dir2/bands4
/music/dir2/bands4/songs3/
/music/dir2/bands4/songs3/liveplay
Etc.
Would really help to overcome this problem
That’s odd, MiniDLNA should scan recursive folders by default, can you paste your full minidlna.conf file here http://pastebin.com
Tried installing this on Linux Mint 11 but just get Unable to locate package minidlna
Hello Lee, I’ve not tried installing MiniDLNA on Mint, have you tried adding the PPA?
Hi Ben,
Great set-up description.
Have you tried to get the update running as a cron job? I’m trying just that but need to somehow get the sudo command to work without me being there to type in the password.
My to crontab entries are:
0 */6 * * * * sudo minidlna -R
0 3 * * * * sudo /etc/init.d/mnidlna restart
But these won’t run with the sudo privilages. I have read that there is a way using the sudoers file but have not yet used that and don’t know how. Have you or anyone else here had a go at that yet or can you advise how we can automate the update function?
Hello
MiniDLNA relies on inotify to monitor your folder for new media, so anything new should show up automatically
I’ve never had to run minidlna -R manually
Sorry I couldn’t help with cron