1. Home
  2. Linux
  3. Set up a dlna server on linux

How To Set Up A DLNA Server On Linux

Linux offers a ton of different ways to deliver media over the network. For those with fancy server hardware, there is Plex and Emby. It’s also possible to share media files over NFS shares or a Samba server. However, if you’re running older hardware but want to deliver media to several devices on your network there is a better way: Mediatomb. It’s a DLNA server that uses the universal plug-n-play technology that so many devices support, to deliver media over a network. The Mediatomb server software is very easy to get going, and install on pretty much any Linux distribution. Here’s how to use Mediatomb to set up a DLNA server on Linux.

SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.

Install Mediatomb

Ubuntu

sudo apt install mediatomb

Debian

sudo apt-get install mediatomb

Arch Linux

To install Media Tomb on Arch Linux, first go to the AUR and download the snapshot to build the package. When the archive is in your Downloads folder, open up a terminal, and extract it.

cd ~/Downloads
tar xvzf mediatomb.tar.gz

With the source files for Mediatomb taken out of mediatomb.tar.gz, the next step is to use the CD command to go into the extracted folder.

cd mediatomb

Use the makepkg command to generate a package. Keep in mind, the package may fail to build if you do not have all of the dependencies installed on your system. To make sure you’ve got all the dependencies, pay attention to what the Pacman package manager tells you isn’t on the system. Do keep in mind that you may need to download these dependencies from the AUR.

When all of the dependencies are satisfied on Arch, the Mediatomb package is ready to compile.

makepkg

Let the package manager go through and build the software. When it’s complete, it’ll spit out a tar.xz package. Install it to the system with the Arch Linux package manager.

sudo pacman -U mediatomb.tar.xz

Fedora

sudo dnf install mediatomb

OpenSUSE

An easy way to quickly get the Mediatomb DLNA software on the system is to install it via the OpenSUSE build service. This DLNA server package is supported for OpenSUSE Leap 42.3, Leap 42.2, and OpenSUSE Tumbleweed.

To get the software installed, go to the download page, click on your version of SUSE, followed by the “1-click install” button. It’ll bring up the YaST software installation tool, and get Mediatomb installed on your system!

Other Linuxes

Mediatomb is very well-known software. As a result, it’s on a lot of different Linux distributions. However, because of how many different Linux operating systems exist they can’t possibly support everything. If your favorite OS doesn’t have an installable binary, you may need to download the source code, and build the server software yourself. To do this, visit the developer website, grab the source code and follow the instructions!

Setting Up Mediatomb

The server software is installed, but before using it you must enable a few things. Open up a terminal, and gain root access by using: sudo -s. In the terminal, edit the Mediatomb configuration file.

nano /etc/mediatomb/config.xml

Inside nano, look for ui enabled=”no” and change it to ui enabled=”yes”. Then press Ctrl + O to save it.

After editing the configuration file to enable the web interface, it’s time to start the server.

systemctl enable mediatomb
systemctl start mediatomb

The next step is to add media to your server. Do this by opening a new tab in your web browser, and navigating to: https://localhost:50500. Keep in mind, localhost only locally. To access the server across the network, the best course of action is to find it’s IP address. To do that, run this command:

ip addr show | grep "inet 192.168"

Using the ip addr show command in combination with grep will filter out all of the unnecessary information, and just show the local IP for the PC. Copy 192.168.1.XXX, and enter it into the URL of the web browser. For example:

192.168.1.132:50500

From here, click “File system”, then “PC Directory”, and find your media files on the PC to add. Click the + sign to add the media files. Repeat this process as needed to add all media to your Mediatomb.

Using Mediatomb

Since Mediatomb is a DLNA powered media server, accessing files on other devices from it is very easy. On Linux (it also works on all operating systems that support VLC), the best way to browse these files is with the VLC media player. Download and install it, and then follow the instructions to access media from your Mediatomb.

Inside of VLC, click the playlist button to take VLC into playlist mode. Once in playlist mode, look for the “Local Network” section. Under this section there are a few options. Click on “Universal Plug’n’Play”. Doing this will bring up your Mediatomb server in the playlist browser as a folder. Click on the folder and browse through to access your media. Start playback by double-clicking on the individual media file.

Note: want to access your Mediatomb server on other platforms and devices? Look through your device’s manual for “DLNA support”. Devices that support it include several video game consoles, set top boxes, and etc.

1 Comment