Walkthrough : Roon in a Docker container on Synology DSM 7

Hi.

Have you checked to see if the container is actually running? To do this, run the Docker app on your Synology, switch to the Container tab and check if your container is Running or Stopped.

If it’s Stopped, it’s likely because your Synology restarted due to a power outage or an update. I should have included a step in the walkthrough to enable “Auto Restart”. If your container is in the Stopped state, you might as well enable Auto Restart now. To do this:

  • Make sure your Roon container is in the Stopped state
  • Select the Roon container and click “Edit”
  • In “General Settings”, click “Enable auto restart”
  • Click “Apply”
  • Start your container

I hope this is your issue!

1 Like

It definitely was my issue. Followed your very helpful instructions and everything is back as it should be.

Don’t think it was an improper shutdown. I suspect the USB drive with core was knocked out of it’s socket (improper ejection) and reconnected. Of course I’m presuming that would cause docker to shut down.

Cheers and thank you very much for all your help.

blairy

Glad I guessed right and you’re up and running again! You’re very welcome!

Question on resources… I’m running as per @Steef_de_Bruijn and the very detailed instructions on DSM7 on a DS918+ very happily. It’s quick enough and painless enough that I’ve decided to keep things this way instead of dusting off my old NUC.

However, when I’m doing any transcoding the amount of processing power available seems to be less than I’d like to give it- my Synology usually isn’t breaking a sweat for anything else and I’d love to let the docker container use some of the available resources. So, for instance right now I’m using Roon to pass a 96/24 stream to my Sonos which requires it to convert to a 48/24. Per the details, it’s running at “39.1x Processing Speed”. If I add another stream doing something similar it goes down to “2.4x” or a low enough number with very little headroom.

However, if I look at Synology’s active insight app, I’m consuming maybe 1-3% of CPU.

Is there a simple way to tell the Roon docker that it can grab more processor speed if and when it wants it? Maybe 2-3x as much (assuming that won’t push me over 10% CPU utilization on the Synology)?

Thanks,
John

1 Like

I would love to see if there is an answer for that. Thank you for putting it so elegantly John.

I could easily be wrong here but the behavior you’re describing doesn’t look to me as if Docker is doing resource throttling. It’s not clear why it would in this case. You might be seeing either a hardware limitation or this might be a consequence of how Roon behaves when transcoding and streaming unique streams to multiple endpoints.

By default, Docker on Synology will manage CPU and memory on its own. If you stop the container and edit settings, you’ll find this on the General Settings page:

image

You can try manually setting CPU priority to Med or High and you can also try adjust the container’s memory limit (which is an upper bound). If you do this, please let us know what happens.

I recommend you keep in mind that your system seems to be working well as is. That’s success. Transcoding speed during playback would only be a problem if it were so slow that you had dropouts or if Roon decided to degrade its transcoding strategy due to resource issues. None of that is happening, which means that, at present, this is just an aesthetic issue. The old adage “if it ain’t broke, don’t fix it” might apply :slight_smile:

1 Like

Well, you’re basically right. I can no longer play three or four different transcoded zones simultaneously without dropouts, which I could do with plenty of headroom on my NUC-based ROCK. But I’ll be honest and admit that that was never really an honest use case, it was just “taking it for a spin and seeing what it could do”. Two simultaneous zones happens all the time at my house, three is theoretically possible but vanishingly unlikely. So I’ll take your “aesthetic” comment as well-founded, even if I had a moment of “don’t call me aesthetically motivated!” reaction. Don’t solve for corner cases that don’t actually come up.

I may try to change the container settings as you suggest just for giggles, but if I screw up my otherwise perfectly working system, that’s on me. Though I may come back here for help.

Interesting!

Playing with this is super low risk. If you do play with it, please let us know what happens!

Will report back on trying to get more resources.

One other question… does anyone know how to get to the admin page on my Docker ROCK? Is it still possible to navigate to the place where I would install a new RoonOS or restart the ROCK?

Thanks,
John

Thank you so much @gTunes and @Steef_de_Bruijn for this amazing solution. :ok_hand: :ok_hand: :ok_hand: :+1: :+1: :+1: :pray: :pray: :pray:

I just installed it with no issues on my Synology DS916+, will give it a more thorough try during the next days, but all seems good so far! (Time to test my very new Esoteric N05xD streamer-dac with Roon!! :smiling_face_with_three_hearts: )

1 Like

For folks that have already followed this walkthrough, or might in the future, I wanted to make sure that you see this addendum which describes how to make sure your container restarts when your NAS power cycles.

Please see:

Cheers.

2 Likes

As much as I have benefited enormously from the project and this thread, I should say I’ve gone back to ROCK on a dedicated NUC, as many have told me, the 918+ was under powered for the application, and the new search highlighted it in a way I finally noticed. Thanks to everyone!

1 Like

@gTunes and @Steef_de_Bruijn - Huge Thanks to you both!! This Docker Container and Greg’s excellent guide allowed me to install Roon Core on my new Synology NAS today, after the Synology package failed. This was pain free and now I am trying the 14 day trial to see what Roon is all about!! :slight_smile:

3 Likes

Thanks for this guide, I’ve got it successfully running on a DS1821+ with 20GB RAM under DSM7, its running great. The only issue is that Roon is not detecting changed/added files automatically despite it being set to do so, and they’re not appearing as skipped files. Forcing a rescan finds them immediately . I have seen lots of similar posts and was curious if its the same issue with Linux not reporting changes, or something Docker specific.
Not a huge issue but would be nice to see if there’s any possible fixes or others have the same issue while running as a container.

I am brand new to Roon and also have a Synology DS3612xs NAS running DSM6 (not upgradable to DSM7). I am considering how/where to install Roon Core and have some questions I’m hoping others who have experience with, can discuss.

I am looking at Roon as a way to consolidate my existing files with a hi-res streaming service. Some of my local files are not available for streaming and I don’t want to lose access to them. if there are multiple copies of a song available, does Roon automatically pick which resolution file to use based on your output destination?, or let you pick manually, etc…?

My music library files are mostly FLAC and ALAC, plus some old MP3. They are stored on my Synology as well as my Windows PC as a redundant copy. There are about 20,000 tracks, 3400 albums, and 2400 artists. For playback I was using Apple iTunes (not Apple Music) or Plex Music, plus I have subscriptions for Spotify, Deezer, and now Tidal. Aside from various speakers/systems in the house, my dedicated listening room has a Rotel RC-1572MKII pre/control amp which is Roon-Tested, plus a Cambridge Audio CXN which supports Spotify and Tidal. I’m a little fuzzy on what is possible but hoping that if Roon can incorporate my local files plus Tidal content (and perhaps Spotify as well), I could move the CXN to a different room.

SSD
I have a couple of spare SSD drives (250 and 500 GB) so can put those in the Synology internal bay or add as an external USB. External is easier - does it matter?

Synology or standalone Windows PC
If not using Synology, and installing on another computer entirely, I can simply add an SSD to that box. I have a few spare Windows 7/10 boxes around that I can choose from. Was hoping to not have another system running if I don’t have to though.

DSM6 package on Synology
Seems pretty straight forward install.
Would add an SSD either internal or external for the DB.

Docker on Synology:
I have Docker running on my DiskStation for home automation so adding Roon would be simple.
If Roon is in a container, am I still constrained to DSM6 version or does that bypass incompatibilities and let me use the latest Roon version?

Any other advise, gratefully received :slight_smile:

Hi Jason,

I have the exact same issue, but it happens with a native DSM 7 ROON package install, so its not docker specific.

I actually came here to see if Docker would fix the problem, its super annoying. It never auto scans or picks up new music when added without going to the location and manually scanning it.

Permissions are fine, since it can do it when clicking scan manually… Hopefully someone (the package creator id say) can fix this bug.

My local library isn’t large by Roon user standards - 9,607 tracks, almost entirely FLAC. I’m running Roon in a container on a NAS on OS 7.01. I don’t modify my library frequently but, when I do, changes are detected immediately.

I do modify the inotify limit on my Synology. I do this because I run Syncthing and Syncthing hits the inotify limit if I don’t increase it. It is very possible that this also impacts Roon’s ability to see changes. It actually seems likely to me that you’d need to do this if you have a large number of folders in your Roon music tree.

If someone else wants to try this, here’s what I do.

In Task Scheduler on the NAS, create a “Triggered” task that runs at boot.

In the wizard, set the following options on the General and Task Settings panes:

The script text should be this (modify the params if you like):

sh -c ‘(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&’

Save it. This script will run manually when your NAS starts. You can run it explicitly by right clicking on it in the task scheduler list. It only needs to run once per boot.

I set this up a long time ago. My recollection is that the sleep 90 was required at boot to allow the boot process to get to a state at which this change would work. It does mean that when you run it manually, you should wait at least 90 seconds before experimenting.

If you have an extremely large library, you may need an even larger limit at the expense of additional system memory. Here’s a page that may be helpful : inotify watcher limit problems - Coder v1 Docs

Please report back on whether or not this helps! You can easily back out of this change by deleting the task and rebooting your NAS. The change it makes is temporary and nothing is persisted.

1 Like

Hi, Randy. Welcome to Roon and the forum!

Roon allows you to see and choose between versions. Your best bet is to install Roon, point it at your local library and either Tidal or Qobuz, and play with the interface. My experience is that, by default, it biases towards higher resolution recordings but you can always explicitly choose a specific version of an album or track.

I’m a little fuzzy on what is possible but hoping that if Roon can incorporate my local files plus Tidal content (and perhaps Spotify as well), I could move the CXN to a different room.

Roon doesn’t support Spotify. I believe your asking whether or not you can take your single system, which is a Cambridge Audio CXN + Rotel integrated amp and split that into two independent systems. I don’t know much about either of those components. A Roon system needs a compatible network player of one form or another. Both of your devices may be able to play that role. I’m certain the CXN can, I’m not sure about the Rotel. But you also need a complete system, including amplification, and your CXN doesn’t have an amp. So even if the Rotel can be a standalone Roon endpoint, the CXN can’t. I believe Cambridge Audio enourages the pairing of a CXN with a CXA such as the CXA81.

The only reason internal vs. external would matter is if the i/o speed differs between the two as a function of device capability, port/cable choice, enclosure, or some other factor. This will be specific to your setup and may or may not be an issue. I actually have two Roon setups in different homes and in one I just use the RAID array - I don’t perceive an issue with that setup, maybe someone else would. On the other, I use two drive bays for SSDs and that’s where I put my Roon database. In both cases, my music lives on spinning media and don’t believe anyone has made the claim that the actual music collection needs to live on SSD. Indexing and streaming work just fine with media living on spinning discs.

I believe that both the package and container approaches will work just fine for you on DSM6. There were package compatibility issues with DSM7 (Synology made many changes) but I believe they have been addressed. That’s academic for you, though, since you’re on DSM6. I prefer the container version because, like you, I’m comfortable with containers on Synology and I like the sandboxing. You might find that the package version uses less resources.

Best of luck with this!

Thanks Greg,

I’ll take a look at this and keep it in mind if I see it continuing to occur.

Since I originally posted, automatic detection of newly added files has started working and I’m not sure why :slight_smile:

I hadn’t changed anything on the NAS, but Portainer is telling me a new version was installed by Watchtower on April 12. So perhaps it was an issue with the previously distributed container?

This is great as it fixed the issue of my DS1815+ not discovering (all) new files before :smile:

1 Like