Quick Start: Rygel Setup on Ubuntu 16.04

Rygel is a UPnP AV MediaServer that allows you to easily share audio, video and pictures to other devices.

It is currently a Gnome project, its wiki page can be found here... with much useful information

 

Root privileges required:

sudo -H bash

Install prerequisites:

useradd --system --uid 998 --user-group --shell /bin/false --home-dir /var/lib/rygel rygel

mkdir -p /var/lib/rygel/sbin
mkdir -p /var/lib/rygel/lib/systemd/system
cd /var/lib/rygel/sbin
wget https://gitlab.gnome.org/GNOME/rygel/blob/master/examples/service/wrap-dbus
chmod -w+x wrap-dbus

apt-get install rygel tumbler

mkdir -p /var/lib/rygel/.conf
cp /etc/rygel.conf /var/lib/rygel/.conf

Create systemd configuration ...

[Unit]
Description=Rygel DLNA server
After=syslog.target

[Service]
User=rygel
Group=rygel
#ExecStart=/usr/bin/rygel
#ExecStart=/usr/bin/wrap-dbus /usr/bin/rygel
ExecStart=/var/lib/rygel/sbin/wrap-dbus /usr/bin/rygel

[Install]
WantedBy=multi-user.target
" > /var/lib/rygel/lib/systemd/system/rygel.service

chown -R rygel.rygel /var/lib/rygel
cd /lib/systemd/system
ln -s ../../../var/lib/rygel/lib/systemd/system/rygel.service .

... edit the rygel.conf files as required ...

... and install the startup configuration:

systemctl daemon-reload
systemctl enable rygel
systemctl start rygel