Gerbera – A UPnP Media Server That Lets You Stream Media on Home Network

Gerbera is a feature-rich and powerful UPnP (Universal Plug and Play) media server with a pleasant and intuitive web user interface, which allows users to stream digital media (videos, images, audio etc..) through a home network and consume it on different types of UPnP compatible devices from mobile phone to tablets and many more.

Gerbera Features:

  • Allows you to browse and playback media via UpnP.
  • Supports metadata extraction from mp3, ogg, flac, jpeg, etc. files.
  • Highly flexible configuration, allowing you to control the behavior of various features of the server.
  • Supports user defined server layout based on extracted metadata.
  • Support for ContentDirectoryService container updates.
  • Offers exif thumbnail support.
  • Supports automatic directory rescans (timed, inotify).
  • Offers a nice Web UI with a tree view of the database and the file system, allowing to add/remove/edit/browse media.
  • Support for external URLs (create links to internet content and serve them via UPnP to your renderer).
  • Supports flexible media format transcoding via plugins / scripts and many more including a number of experimental features.

How to Install Gerbera – UPnP Media Server in Linux

On Ubuntu distribution, there is a PPA created and maintained by Stephen Czetty, from which you can install Gerbera using following commands.

$ sudo add-apt-repository ppa:stephenczetty/gerbera
$ sudo apt update
$ sudo apt install gerbera 

On Debian distribution, Gerbera is available in the testing and unstable repositories, which you can enable by adding the lines below in your /etc/apt/sources.list file.

# Testing repository - main, contrib and non-free branches
deb http://http.us.debian.org/debian testing main non-free contrib
deb-src http://http.us.debian.org/debian testing main non-free contrib

# Testing security updates repository
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free

# Unstable repo main, contrib and non-free branches, no security updates here
deb http://http.us.debian.org/debian unstable main non-free contrib
deb-src http://http.us.debian.org/debian unstable main non-free contrib

Then update your system package sources cache and install gerbera with the following commands.

# apt update
# apt install gerbera       

For other Linux distributions like Gentoo, Arch Linux, openSUSE, CentOS, etc. follow Gerbera installation guide.

Once you have installed gerbera, start, enable and view the service status using the following commands.

$ sudo systemctl start gerbera.service 
$ sudo systemctl enable gerbera.service
$ sudo systemctl status gerbera.service

Note: If gerbera fails to start on your system, you need to do one of the following.

Check if the log file (/var/log/gerbera) has been created, otherwise create it as shown.

$ sudo touch /var/log/gerbera
$ sudo chown -Rv root:gerbera /var/log/gerbera
$ sudo chmod -Rv 0660 /var/log/gerbera

Secondly, define a network interface that your are currently using as the value of MT_INTERFACE environment variable, the default is “eth0” but if you are using wireless, then set this to something like “wlp1s0”. In Debian/Ubuntu, you can set these settings in /etc/default/gerbera file.

Getting Started with Gerbera Media Server Web UI

Gerbera service listens on port 49152, which you can use to access the web UI via a web browser as shown.

http://domain.com:49152
OR
http://ip-address:49152
Gerbera UI Error
Gerbera UI Error

If you get the error shown in the above screenshot, you need to enable the web UI from the gerbera configuration file.

$ sudo vim /etc/gerbera/config.xml

Change the value enabled=”no” to enabled=”yes” as shown in the following screenshot.

Enable Gerbera UI
Enable Gerbera UI

After making above changes, close the file and restart the gerbera service.

$ sudo systemctl restart gerbera.service

Now go back to your browser and try to open the UI once more in a new tab, this time around it should load. You will see two tabs:

  • Database – shows the files that can be accessed by publicly.
Gerbera Web UI Database
Gerbera Web UI Database
  • Filesystem – this is where you can browse files from your system and select them for streaming. To add a file, simply click on the plus (+) sign.
Gerbera File System
Gerbera File System

After adding files for streaming from the filesystem, the database interface should look like this.

Gerbera Database File System
Gerbera Database File System

Stream Media Files Using Gerbera on Your Home Network

At this point you can start streaming media files over your network from the gerbera server. To test it, we will use a mobile phone as a client. Start by installing a compatible upnp application (like BubbleUpnp) on your phone.

Once installed BubbleUpnp app, open it and on the menu, go to Library and click on Local and Cloud to view available servers, and the gerbera server we created should show in there. Click on it to access added directories and files in them.

Gerbera Media Server
Gerbera Media Server
Gerbera Filesystem View
Gerbera Filesystem View

Finally click on a file that you would like to stream.

Stream Files via Gerbera Server
Stream Files via Gerbera Server

For more information visit, Gerbera Github Repository: https://github.com/gerbera/gerbera.

Gerbera is a feature-rich and powerful Upnp media server, used to stream your digital media through your home network with a nice web user interface. Share your thoughts about it or ask a question via the feedback form.

Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

7 thoughts on “Gerbera – A UPnP Media Server That Lets You Stream Media on Home Network”

  1. So far, I have not found in any description how to set the automatic transcoding to some universal codec for TV (h264 would be handled by my CPU in real-time). Android TV can play only a few videos, except those saved from TV broadcasts (h264,265).

    I recode from miniDLNA by playing it on an Android mobile in VLC and mirroring it on the TV, I was expecting just that transcoding from Gerbera. Compared to miniDLNA, it is unfortunately quite incomplete, after installation, the rights to the directories are incorrectly set, the configurator is not created, and you don’t have to repair other sw after installation, but the announced recoding would be worth it.

    Unfortunately, it can’t actually do that, it would have to be refactored somehow for ffmpeg to do that, and I haven’t been able to. Probably not for anyone else either, I couldn’t find a single tutorial about it (in English, I wouldn’t expect it in Czech).

    Everyone is trying to get around the problems with accessing and starting the daemon, they probably didn’t have the strength to recode. I uninstalled Plex, it was crawling on my internet, which I don’t care about, so I’ll probably stick with the simple and functional miniDLNA. Too bad, the transcoding would be great.

    Reply
  2. The title should say “that lets you stream”.

    “let’s” is the shortening of “let us”, as in “let’s go”.
    “lets” is the third person of the verb “to let”.

    I think if you fix that horrible grammar error the article will look more professional

    Reply
  3. I was going to say, this product looks like MediaTomb only to go to their github site to see it is based on MediaTomb. MediaTomb was a decent product before Plex came along.

    Reply
  4. I like it more sharing via samba (nautilus and or thunar share plugin) and using Kodi as client than this web oriented multimedia server or Plex. I think it is more simple.

    Reply
    • @Miguel

      Okay, many thanks for sharing your thoughts with us. We may possibly prepare an article in the future concerning this.

      Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.