Set up a DLNA Server in a Minute
Productivity Sauce
DLNA provides a hassle-free solution for sharing digital media between devices, and you can put this technology to good use on your local network. Install DLNA software on a server on your network, and you can easily access photos, videos, and music from any device that has a DLNA client on it. Using the minidlna application, you can turn any Linux machine into a DLNA server in a matter of minutes. Here is how to do this on Debian and Ubuntu. Since minidlna is available in the official software repositories of both distros, installing it is a matter of running the apt-get install minidlna command as root. Once the package has been installed, open the minidlna.conf configuration file in a text editor by running the nano /etc/minidlna.conf command as root. At the very least, you need to specify two things: paths to directories containing digital media and a descriptive name for the DLNA server. On my Raspberry Pi, I store photos, videos, and music in separate directories on a USB stick, so my minidlna.conf configuration file looks like this:
media_dir=P,/media/usb0/photos media_dir=V,/media/usb0/videos media_dir=A,/media/usb0/music friendly_name=Raspberry Pi DLNA server
Next, you should generate minidlna's database. To do this, stop the minidlna server with the /etc/init.d/minidlna stop command, then issue the following command (both commands should be run as root):
minidlna -R
Start then the minidlna server using the /etc/init.d/minidlna start as root, and you are done. Unfortunately, minidlna cannot update the database automatically, so you need to do this manually every time you add new media files.
To access digital media served by the DLNA server, you either need a DLNA-capable device or to install a DLNA client software. On Linux, you might want to give eezUPnP a try (see this article for more info), while the AnDLNA app can come in handy for accessing media files from an Android device.
Comments
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
comments
I'm using minidlna for a while, and found out that new media added will be served wihtout the need to restart the service.
Another tip, I found the android app BubbleUPnP it's great not only for DLNA, but for other streams.
Best regards.