Gerbera is a free, open-source UPnP media server software that allows users to stream digital media content such as music, videos, and photos to their UPnP-compatible devices. If you are running MXLinux Latest and want to install Gerbera on your system, this tutorial will guide you through the installation process.
Before you start, ensure that you have the following prerequisites:
Before installing Gerbera, update and upgrade your system packages to ensure that you have the latest dependencies installed. To do this, run the following commands in your terminal:
sudo apt update
sudo apt upgrade -y
Gerbera requires several dependencies to be installed on your system before installation. To install these dependencies, run the following command in your terminal:
sudo apt install cmake libcurl4-gnutls-dev libsqlite3-dev libexif-dev libavformat-dev libavcodec-dev libmagickwand-dev ffmpeg
Once you have installed the necessary dependencies, download the latest version of Gerbera from the official website. To download the latest version, run the following command in your terminal:
wget https://github.com/gerbera/gerbera/releases/download/v1.9.1/gerbera-1.9.1.tar.gz
Next, extract the downloaded file and navigate to the Gerbera installation directory using the following commands:
tar xvzf gerbera-1.9.1.tar.gz
cd gerbera-1.9.1
Before installing Gerbera, create a build directory and change to it using the following command:
mkdir build
cd build
Next, use the cmake
command to configure and generate the installation files for Gerbera:
cmake ..
Finally, compile and install Gerbera using the following command:
make -j$(nproc)
sudo make install
After successfully installing Gerbera, create a configuration file using the following command:
sudo nano /etc/gerbera/config.xml
And paste the below content in the file and change the MEDIA_DIR and FRIENDLY_NAME accordingly.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<metadata>
<provider>filesystem</provider>
<importance>
<filename>30</filename>
<directory>20</directory>
<metadata>10</metadata>
</importance>
</metadata>
<import_folder include="true" active="true">
<title>Media</title>
<path>/home/USERNAME/Videos</path> <!-- Change according to Media directory path -->
<virtual_mode>filesystem</virtual_mode>
</import_folder>
<import_folder include="true" active="true">
<title>Media</title>
<path>/home/USERNAME/Music</path> <!-- Change according to Media directory path -->
<virtual_mode>filesystem</virtual_mode>
</import_folder>
<autoscaninterval>30</autoscaninterval>
<checkupdatedelay>30</checkupdatedelay>
<ui enabled="no"/>
<logging>
<logbackend>console</logbackend>
<loglevel>info</loglevel>
<logfile>/var/log/gerbera.log</logfile>
</logging>
<database>
<type>sqlite3</type>
<database>/var/lib/gerbera/gerbera.db</database>
</database>
<serverName>FRIENDLY_NAME</serverName> <!-- Change according to Friendly Name you need -->
</config>
Save and close the file by typing Ctrl+X
, Y
, and then Enter
.
Finally, launch Gerbera by running the following command in your terminal:
sudo systemctl restart gerbera
And visit http://localhost:49152/ with any UPnP-compatible devices to stream your media files.
Congratulations! You have successfully installed Gerbera on MXLinux Latest. Now you can enjoy streaming your media files to UPnP-compatible devices.
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!