Archives For November 30, 1999

This simple tutorial shows how to install and setup Gerbera home media server in all current Ubuntu and Debian releases.

Gerbera is a free and open-source UPnP media server for Linux, BSD, and Mac OS. With it, you can stream audio and/or video files over home network, and play on any device with a media player with UPnP support, e.g., VLC.

How to Gerbera in Ubuntu / Debian via its official repository

Gerbera is available in Ubuntu repositories but always old. It’s however quite easy to install the latest version since it offers an official apt repository. And so far, it supports for Ubuntu 18.04, Ubuntu 20.04, Ubuntu 21.04, Debian Buster & Bullseye.

1.) Firstly open terminal from start menu. Then paste the command below and hit run to install the key:

curl -fsSL https://gerbera.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -

Install curl via sudo apt install curl if you don’t have it. Type user password when it asks (no asterisk feedback) and hit Enter.

2.) Next add the apt repository by running command in terminal:

sudo apt-add-repository https://gerbera.jfrog.io/artifactory/debian

3.) Adding repository should automatically update the package information. If not, run it manually via command:

sudo apt update

4.) You can finally install the latest Gerbera package via command:

sudo apt install gerbera

Set up Gerbera Media Server:

The media server is now simple to use since user and permission are well configured during installing process.

1.) Set user and password for Web UI.

You can skip this step, so anyone in home network can access the server configuration page via Web UI without authentication.

Firstly, open terminal and run command to edit the config file:

sudo gedit /etc/gerbera/config.xml

When files opens, go to UI section. Enable account login and set username and password as you prefer.

2.) Run Gerbera service:

Next, run command to start the media server service:

systemctl start gerbera

And check the server status via command:

systemctl status gerbera

If it’s running successfully, it will output the IP address and listening port for the web UI page.

NOTE: to make the service start automatically at login, run systemctl enable gerbera.

3.) Paste the address in web browser, http://192.168.0.108:49152 in my case, and hit Enter. Then login with the user and password you set in step 1.).

You can finally, click “Add some files” to steam your media files, and manage them as well as clients via next two buttons.

OK, you can now enjoy the music or movie in any device with UPnP client, for example VLC on iOS:

This tutorial is going to show you how to install and setup Universal Media Server in Ubuntu 20.04 Desktop and Server.

Universal Media Server, UMS in short, is a DLNA-compliant UPnP media server allows streaming media files to a wide range of devices including video game consoles, smart TVs, smartphones, and Blu-ray players.

1. Install required libraries:

Media transcoding is accomplished through packages from AviSynth, FFMpeg, MEncoder, and VLC, you have to first open terminal and run command to make sure these packages installed:

sudo apt install mediainfo dcraw vlc mplayer mencoder

2. Download Universal Media Server:

The latest tarballs are available to download at github project page. Select download (run uname -m to tell system type):

  • x86 package for old 32-bit machines.
  • x86_64 package for 64-bit machines.
  • arm64 / armhf for Rasperry Pi devices.

At the moment, the latest release is version 10.0.1. If you’re running Ubuntu Server, use this command to download it (replace URL in the command if a newer version is available):

wget -c https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/10.0.1/UMS-10.0.1-x86_64.tgz

3. Decompress the tarball

Run following 2 commands will navigate to user’s Downloads folder, then extract the UMS package /opt, and finally rename result folder from ‘ums-10.0.1‘ to ‘ums‘.

cd Downloads
sudo tar -zxvf UMS-10.0.1-x86_64.tgz -C /opt/ --transform s/ums-10.0.1/ums/

Skip cd Downloads if it was downloaded via wget command.

And replace “UMS-10.0.1-x86_64.tgz” if a newer version was downloaded, also do change version number in “ums-10.0.1“.

4. Run UMS as system service

If everything goes well, you should be able to run the Universal Media Server via command:

/opt/ums/UMS.sh

For Ubuntu Desktop, it brings up a setup dialog to choose language, start minimized or not, choose network, and media folder etc.

Then it offers an user interface with more configurations, log view, and more.

For Ubuntu Server without UI, edit the .config/UMS/UMS.conf file for configurations. By default, it steams all files under user home. You can add “folder = /PATH/TO/MEDIA1,/PATH/TO/MEDIA2” to set media folder. For more, read the UMS.conf file under source tarball.

After starting the server go to http://server_ip:9001 in your web browser to check out if the server is working.

To make it run as systemd service, open terminal and run command:

sudo nano /etc/systemd/system/ums.service

It will create an empty file and open with nano command line text editor. Paste (Ctrl+Shift+V) following lines and change ji to your user name. Also change memory limit from 500M to another value if you want.

[Unit]
Description=Run UMS as Ji
DefaultDependencies=no
After=network.target

[Service]
Type=simple
User=ji
Group=ji
ExecStart=/opt/ums/UMS.sh
TimeoutStartSec=0
RemainAfterExit=yes
Environment="UMS_MAX_MEMORY=500M"

[Install]
WantedBy=default.target

Save changes by pressing Ctrl+X, follow with Y, and hit Enter.

Finally run commands to reload systemd daemon, enable and start UMS service.

sudo systemctl daemon-reload
sudo systemctl enable ums.service
sudo systemctl start ums.service

And check the service status via command:

sudo systemctl status ums.service