Auto start Linux - Setting up Full Steps

Earlier I tried setting up Sonarr to auto start on a linux ubnutu server v.16.10. It didnt work.

I did some research and fixed it.

The following are the steps that I took in getting it to correctly run issue free:
Open terminal if in ubuntu with a desktop (Ctr+Alt+T) or just log in if on a headless server:

Create and edit sonarr.service file:

sudo nano /lib/systemd/system/sonarr.service This will create a service file in the correct folder and then you are able to edit it

Once able to edit, add the following to the file (Copy from here and [Shift+Insert] in terminal):

[Unit]
Description=Sonarr Daemon
After=syslog.target network.target

[Service]
User=sonarr
Group=media

Type=simple
ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

Then add a user and group:

sudo adduser sonarr;
sudo addgroup media;

Add sonarr user to media group:

sudo usermod -aG sonarr;

Chang file permissions and ownership on the sonarr.service file:

sudo chmod 777 -R sonarr.service;
sudo chown -R sonarr:media sonarr.service;

Chang folder permissions and ownership on NzbDrone folder in /opt/:

sudo chmod 777 -R NzbDrone/;
sudo chown -R sonarr:media NzbDrone/;

After, Run the following to enable/start and then check the status of ther Daemon:

sudo systemctl enable sonarr.service;
sudo systemctl start sonarr.service;
sudo systemctl status sonarr.service;

and output of Sonarr Daemon status is:

sonarr.service - Sonarr Daemon
Loaded: loaded (/lib/systemd/system/sonarr.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2016-11-09 11:31:52 EST; 6s ago
Main PID: 18144 (mono)
Tasks: 3 (limit: 4915)
CGroup: /system.slice/sonarr.service
└─18144 /usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser

after that, enjoy! :smile:

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