Docker images for Roon [Please Note: Using Dockers and VMs isn't supported by Roon]

Hi all,

I just pushed an updated image to docker hub. Just a few (but important) changes

  • base image updated to debian-10.9-slim
  • add check on startup whether /app and /data are mounted on the same host volume or share.

The past has shown that pointing these two container volumes to the same host folder can give all sorts of problems on core self-update.

Now the container refuses to start if this situation is detected.

Happy listening!

Steef

3 Likes

Tanks a lot for your yaml !! But there is several issues in it : 1) this is ports: “9100-9200:9100-9200/tcp” not udp. 2) this yaml may need a version: “3.2” and services: header for the syntax to be fully understood. I managed to start a roon server this way, which is recognized, I can connect on it, but the server does not see my Roon ready device ! Any insight on this issue ? NB : My streamer is detected when I install Roon server on my Windows PC.

For information : my streamer is detected in “host” network_mode. I keep this way. Too much ports to expose anyway.

Hi – I’m new to Roon but not running containers.

I’ve setup the server container added some music, adjusted player settings, all seemed well until I restarted the server container. None of my settings or scanned music persisted and I lost control to Roon. Obviously a permissions issue.

Question is should the server container be running as root?

I’ve tried giving the container a PGID and PUID to match the user on my ubuntu server however the same problem occurs – no settings are saved, library disappears. Providing a PGID & PUID usually helps these kinds of issues but I can’t seem to overcome this one.

Volumes are mapped as below:

Host/volume Path in container
/mnt/storage/roon/music /music
/mnt/storage/music /storage
/mnt/storage/roon/app /app
/mnt/storage/roon/backup /backup
/mnt/storage/roon/data /data

Could any one explain how the container is setup? Looking forward to migrating – it looks great so far.

Thanks

Hi @Thomas_Plumstead and welcome to the Roon forums. Do you mind pasting in the docker run command you used to get the container going please? It’s a while since I used the image but not much has changed. It could be permissions but they’re pretty straightforward OOB. It might be something wierd with DB persistence.

Hi @killdozer thanks for taking the time to reply.

Here is my run command

docker run -d \
  --net=host \
  -e TZ="Europe/London" \
  -v /mnt/storage/roon/app/:/app \
  -v /mnt/storage/roon/data/:/data \
  -v /mnt/storage/roon/music/:/music \
  -v /mnt/storage/roon/backup/:/backup \
  -v /mnt/storage/:/storage \
  steefdebruijn/docker-roonserver:latest

Actually earlier I noticed something. When exiting the container I’m getting an error docker exit code 137. which is a OOM error.

Could that be the reason no settings are persisting rather than a permissions error? The container seems sound in it’s config which is why I’m puzzled.

Hi,

Nasty problem, never occurred to me, but I have always run the container as root (I know…)

The /app and /data and folders are completely managed by the running container.

The /music is, as far as I know, only read by the Roon Core (after you told the Core to look at that location for music) but I could be wrong here.

The /backup is managed by the Roon Core Backup process (after you set that location for backups in Core preferences).

The /app folder is the place where the container startup script downloads and unpacks the Roon server software to. After that this folder is managed by the Roon Core Self-Updater.

The /data folder is populated and managed by the Roon Core which is started by the container startup script.

You suggest that OOM error could be the root cause of data loss (instead of permission error). But is any data written at all to /app and/or /data after container crash/exit?

I never had OOM errors but I did notice increasing ram usage on long running Roon container. Is your host short on memory?

It is not clear to me why you mount the extra /storage folder in the container.

My server crashed last week with 5 faulty drives out of 8 (just one too many for normal recovery) with no time at the moment to investigate and recover so my resources to assist are somewhat limited but I hope the above gives a nudge in the right direction.

Steef

1 Like

Morning @Steef_de_Bruijn thank you for the explanation, it all seems fairly straight forward which is what I initially thought.

I suspect it could be my host – it only had 8GB of ram shared with some other containers and a home assistant VM. The /mnt/storage volume is a large merger fs drive which holds all my media.

I’ve over come the problem by installing Roon directly on the server and all seems to be working well. Ideally I would be using docker to keep things tidy – I will test further to find out what’s happening.

Thanks again, Tom

There is a second cause to the 137 exit code that might be more probable if you instructed the container to stop. If a container is stopped then a signal is sent to the main process within that container, if this signal is not handled then after a ten second delay the process is killed, resulting in the 137 exit code.

For those interested, you can read more about the topic here.

Will this docker survive the upcoming Roon update?

Yes

Current image has all needed dependencies and the beta runs fine on it as we speak

2 Likes

Hello Mr. De Bruijn,

Just a quick word of appreciation for the work you did and are doing.
Our Roonserver is running on a fairly recent QNAP 453Dm, using Containerstation and Docker.
Thinking your image could have a problem with the new Roonserver, I installed the QNAP-app.

I can only say the difference on the Roon Client is immediately noticeable. The images and info shows up much faster using your docker image than using the QNAP.native app, so I was very happy to move back to Docker.

Kind Regards,

George

Thanks for the kind words and enjoy your music.

I did the update and now I cannot connect to Roon core. All Roon clients (iphone & desktop) cannot pass initial screen with Roon icon searching for core. Restarting docker app did not help.

Weird.

I just updated my core and it went fine.
iPhone connected automatically after core restart.
Maybe try to disconnect/reconnect iPhone app after initial timeout?
Do the logs at /data/RoonServer/Logs/RoonServer_log.txt indicate any issues?

Steef

I removed old docker RoonServer app and I installed new instance of Roon core with different folders for server & data. This did not fix the problem. Trying to connect to RoonCore from desktop. I selected new Core and entered credentials. This is where we hit brick wall. Roon icon is showing that is working on something.

I found some entries in log file that may be helpful

11/05 19:18:14 Warn: [multicastreceiver] couldn’t bind to iface 192.168.1.130: System.Net.Sockets.SocketException (98): Address already in use
11/05 19:18:14 Critical: while dispatching events: System.InvalidOperationException: You must call the Bind method before performing this operation.
11/05 19:20:14 Trace: [push] restarting connection (Unable to read data from the transport connection: Software caused connection abort.)

This is very strange. It looks like RoonCore is installed properly. I’ve got email from RoonLabs about signing to new RoonCore, but for some reason connection is being either refused or blocked.

Hmm maybe Roon uses other ports after this update which happen to interfere with other software running on your host. I think I read about a similar problem in another thread in this forum.

The logs you posted did not reveal which port(s) however. Maybe other parts of the logs do?

I assume you use host network on the container? Which other containers are running?

Maybe try to temporarily shut down other containers and see if you can identify the conflicting container. Dunno if stopping is enough to let docker release used ports, maybe you have to remove other containers to let Roon container reuse them.

I had same problem as Peter L. I put this post below at unraid forum for roon:

Nov. 5, I got the usual nag to update roon. I knew if I said “no” to the update, it would nag constantly into the infinite future. So I gave in, I updated roon from my ipad running Roon Remote, and now nothing works. The 3 devices that run roon do NOT work. the Unraid server with roon container - No web interface but I guess it is workin. And I cannot figure out how to undo the update, and Roon website i was not able to find info, not even how to contact a HUMAN.

Steef,
I looked at my port allocations, and roon showed “???”. Showed question marks.

I think @PeterL runs on unraid too if I remember correctly? Maybe a pattern…

Are you (both) running from the newest docker image (published some 5 months ago)?

If so, is your core actually running? I ask because this latest image does not start Roon if /app and /data point to the same host folder.

Otherwise, does your logs contain any info pointing to a problem (maybe the same network bind error that is mentioned above)?

Looks like port 1900 is already taken by emby: Search results for 'emby' - Roon Labs Community

Maybe you can configure docker to not use the host network and allow Roon and/or emby to run on its own IP-Address exposed to outside world?