Having Sonarr run as unprivileged user on Ubuntu

I’ve been happily using Sonarr for about six months now. I run it using the upstart method on Ubuntu 14.04 LTS.

Everything works fine, although I’m not pleased with the fact that it runs as my admin username. I know a lot of other daemons run as their own unprivileged user. I’m wondering if ya’ll think the following would result in a working system:

sudo adduser --system --no-create-home nzbdrone
sudo chown nzbdrone:nogroup -R /opt/NzbDrone

And then change /etc/init/nzbdrone.conf to have “setuid nzbdrone”.

Do you think this would work? What drawbacks might there be? I currently have it connected to Transmission if that matters.

Side question: In my /etc/init/nzbdrone.conf, I have “respawn” commented out, as that was the thing to do six months ago unless you disabled updates within the UI. It looks like the current instructions are to enable respawn. Thoughts?

Lots of people use a different user and what you suggest should work, but you will also need to move Sonarr’s AppData folder to its new location (you can get the location from System: Status).

Drawbacks would be permissions on files might not be what you want/need.

Enable respawn now, we have made changes to the update behaviour to support it.

Looks like my appdata folder is /home/adminuser/.config/NzbDrone; do you know if there’s a way to change the appdata folder? Thank you.

The app data folder is dynamic, you need to move it to the new location for the new user which should be: /home/sonarruser/.config/NzbDrone

So it automatically looks at ~/.config/NzbDrone for whatever user it’s running as. Did I get that right? Thanks for the help!

Yup, thats correct.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.