Roon Server in a docker container.
- Downloads and installs latest Roon Server on first container start
- Subsequent in-app Roon Server upgrades persist
- Audio input from a local music library
- Audio input from Tidal or Qobuz
- Audio output to USB DAC devices connected to the Roon Server host
- Audio output to RAAT devices such as the Roon app, Roon Bridge, RoPieee, etc.
- Audio output to local audio output on the Roon Server host
- Local timezone support for accurate last.fm tagging
- Persistent cache
- Secure execution (unprivileged execution, macvlan network)
- Privileged execution mode and host network are supported
Install the following audio packages into the host that will run Roon.
apt install alsa-utils libasound2 libasound2-data libasound2-plugins
Create persistent docker volumes to retain the binary installation of Roon Server and its configuration across restarts of the service.
docker volume create roon-server-data
docker volume create roon-server-cache
Locate (or create) a folder to host your local music library. This step is optional and only needed if you have a local music library.
- This folder can also be used as a Samba or NFS share for network access to your library.
- This folder is optional. Omit if you plan to exclusively stream music.
Example:
mkdir -p ~/roon/music
There are three ways to configure the Roon Docker container, each with different security levels. The first option is the easiest and simplest and should work for most users.
This is the simplest way to run the docker container. Run using privileged execution mode and host network mode:
docker run \
--name roon-server \
--volume roon-server-data:/opt/RoonServer \
--volume roon-server-cache:/var/roon \
--volume ~/roon/music:/music:ro \
--network host \
--privileged \
elgeeko/roon-server
Run in an unprivileged container using macvlan network mode. Replace the subnet, gateway, IP address, and primary ethernet adapter to match your local network.
docker network create \
--driver macvlan \
--subnet 192.168.1.0/24 \
--gateway 192.168.1.1 \
-o parent=eth0 \
roon
docker run \
--name roon-server \
--publish-all \
--volume roon-server-data:/opt/RoonServer \
--volume roon-server-cache:/var/roon \
--volume ~/roon/music:/music:ro \
--network roon \
--ip 192.168.1.2 \
elgeeko/roon-server
This option works but with a significant limitation. Docker containers on bridged networks don't receive broadcast or multicast communication, which is used by Roon Server to discover RAAT devices such as Roon Bridge or RoPieee. Hence, Roon Server is limited to USB DACs or your Roon App on your PC.
See the Dockerfile source below for ports to open. See Docker documentation for creating and using a bridged network.
You may optionally want to add the -d
flag to output to syslog
instead of the console, and --restart-unless-stopped
flag to
restart the container if it fails.
Add the following arguments to the docker run
command:
--volume /run/udev:/run/udev:ro
- allow Roon to enumerate USB devices
--device /dev/bus/usb
- allow Roon to access USB devices (/dev/usbmon0
for Fedora)
--device /dev/snd
- allow Roon to access ALSA devices
--group-add $(getent group audio | cut -d: -f3)
- add container user to host 'audio' group
Add the following arguments to the docker run
command:
--volume /etc/localtime:/etc/localtime:ro
- map local system clock to container clock
--volume /etc/timezone:/etc/timezone:ro
- map local system timezone to container timezone
- USB DACs connected to the system for the first time do not appear in Roon. The workaround is to restart the container. Once the device has been initially connected, disconnecting and reconnecting is reflected in Roon.
- Mounting network drives via cisfs may require root access. The workaround is to
run the container with the
user=root
option in thedocker run
command. - Fedora CoreOS sets a system paramenter
ulimit
to a smaller value than Roon requires. Add the following argument to thedocker run
command:
--ulimit nofile=8192
docker build .
- elgeeko/roon-server on Docker Hub
- Ansible script to deploy the Roon Server image, as well as an optional Samba server for network sharing of a local music library: https://github.com/elgeeko1/elgeeko1-roon-server-ansible
- Roon Labs Linux install instructions: https://help.roonlabs.com/portal/en/kb/articles/linux-install