Gerbera is a free, open-source and powerful UPnP media server that allows users to stream their media files to various devices over a network. In this tutorial, we will guide you through the installation process of Gerbera on Elementary OS Latest.
Before installing Gerbera, make sure that you have the following prerequisites:
Firstly, update the package manager and install the following required packages on your system.
sudo apt update
sudo apt install git cmake libavformat-dev libjpeg-dev libsqlite3-dev libcurl4-openssl-dev libmagick++-dev libexif-dev libswscale-dev libavutil-dev
In this step, we will download Gerbera source code and install it on Elementary OS Latest. To get the latest version of Gerbera, we will clone the repository using git.
git clone https://github.com/gerbera/gerbera.git
Once the repository is cloned successfully, navigate to the gerbera directory.
cd gerbera
Next, create a build directory for Gerbera.
mkdir build
cd build
Now, run the following command to build and install Gerbera.
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_MAGIC=OFF
make -j $(nproc)
sudo make install
After installation, you need to configure Gerbera. First, create a configuration file for Gerbera.
sudo nano /usr/local/etc/gerbera/config.xml
Paste the following content into the file and save it.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE config PUBLIC "-//Gerbera//DTD Gerbera configuration V1.0//EN" "https://gerbera.io/dtd/gerbera-config-1.0.dtd">
<config>
<metadata>
<import_folder>/path/to/media/files</import_folder>
<import_mode>inotify</import_mode>
<import_throttle>120</import_throttle>
<export_force_sort>yes</export_force_sort>
</metadata>
<server>
<port>49152</port>
<root_object>1</root_object>
</server>
<web>
<title>Gerbera</title>
<stylesheet>/usr/local/share/gerbera/web/style.css</stylesheet>
</web>
</config>
Replace /path/to/media/files
with the actual path of your media files.
Now, start the Gerbera service using the following command.
sudo systemctl start gerbera
To enable Gerbera to start automatically after a system boot, run the following command.
sudo systemctl enable gerbera
Gerbera web GUI is available on port 49152. Open your web browser and enter the following URL.
http://localhost:49152/
You should now see the Gerbera web interface.
In this tutorial, we have shown you how to install Gerbera on Elementary OS Latest. You can now easily stream all of your media files to any device on your home network using Gerbera.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!