Roon On NAS
Restrict directory access on Synology
If you run your own Synology NAS, you may want to run roon directly on your server for audio streaming. Roon on Nas provides a package to conveniently install on your Synology server. The issue with this option is that the Synology service runs without any restriction on what it can see.
I noticed this issue when configuring my client. While adding the location of my music, the roon client was able to browse the entire NAS. Though the roon app will only add music to its library, this was not something I wanted available to any roon client that was on my network.
The Solution
Using docker we can create a container to run the roon server and give the container access only to our music directory via a mount. Essentially making this a jailed environment. A roon client will still have the ability to browse the whole system the server is running on, but now the system is the container whose files don’t mean much to us.
Steef de Bruijn was kind enough to provide a dockerfile for running the latest roon server. Here’s my setup process:
- Open the Docker app your NAS.
- Click the Registy tab and enter
roonserver
in the search field. - Find the
steefdebruijn/docker-roonserver
, click it, then click Download. Choose thelatest
tag. - Click the Image tab, find
steefdebruijn/docker-roonserver:latest
and click Launch.- Container name: Whatever you want to call the server.
- Click Advanced Settings.
- Click the Volume tab and add the following folders.
- Folder:
/path/to/data
(eg:/roon/data
), Mount Path:/data
. - Folder:
/path/to/backup
(eg:/roon/backup
), Mount Path:/backup
. - Folder:
/path/to/app
(eg:/roon/app
), Mount Path:/app
. - Folder:
/path/to/music
(eg:/roon/music
), Mount Path:/music
.
- Folder:
- Click the Network tab and check Use the same network as Docker host.
- Click the Environment tab and Add your time zone.
- Eg: variable:
TZ
and value:America/Los Angeles
.
- Eg: variable:
- Click Apply.
- Click Next.
- Click Done.
You should be able to see your new container running momentarily under the Container tab.
The last thing to do is fire up your roon client on a device and the music directory.
- Open roon client on your device.
- Click the pullout menu.
- Click Settings.
- Click Storage.
- Click Add folder.
- Select the mount path you specified on your docker container for music (eg:
/music
).
- Select the mount path you specified on your docker container for music (eg:
You should notice that you are browsing only the contents of your container and not all the shares on your Synology.
Wala!