Gerbera is an open source UPnP media server that allows streaming multimedia files over the network. In this tutorial, we will guide you through the installation process of Gerbera on NixOS Latest.
Before installing Gerbera, it is always a good idea to update your system to make sure you have the latest version of all packages. You can do this by running the following command:
sudo nix-channel --update nixos
sudo nix-env -u
To install Gerbera on NixOS, you can use the Nix package manager. Open a terminal and run the following command:
sudo nix-env -i gerbera
This will install Gerbera and all its dependencies on your system.
After installing Gerbera, you need to configure it to make it work properly. Gerbera configuration file is located at /etc/gerbera/config.xml
. You can edit this file using your favorite text editor.
Here is an example configuration file that you can use as a starting point:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<serverName>Gerbera</serverName>
<friendlyName>My UPnP Server</friendlyName>
<ip>192.168.1.5</ip>
<port>49152</port>
<home>/mnt/media</home>
<profile>all</profile>
<transcoding>
<enabled>no</enabled>
</transcoding>
<import>
<enabled>yes</enabled>
<path>/mnt/media</path>
<extensions>mp3,mp4,flac,ogg,m4a,m3u,asx</extensions>
</import>
</config>
Here are some explanations for each configuration option:
serverName
: This is the name of your media server that will be displayed on your UPnP devices.friendlyName
: This is the friendly name of your media server that will be displayed on your UPnP devices.ip
: This is the IP address on which Gerbera will listen for incoming connections.port
: This is the port on which Gerbera will listen for incoming connections.home
: This is the path to the folder that contains your media files.profile
: This is the profile name that will be displayed on your UPnP devices.transcoding
: This enables or disables transcoding.import
: This enables or disables automatic import of media files.After configuring Gerbera, you need to restart the service to apply the changes. You can do this by running the following command:
sudo systemctl restart gerbera
Now that you have installed and configured Gerbera, you can access it from any UPnP-enabled device on your network. Open a UPnP-compatible media player on your device, and you should see your Gerbera media server listed.
Congratulations, you have successfully installed and configured Gerbera on NixOS Latest!
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!