grav/pages/05.sonarr/docs.md

1.4 KiB

title
Sonarr

Sonarr

Add Sonarr's repository to your software source

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC
echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list

Install/Update Sonarr

sudo apt update
sudo apt install nzbdrone

User Management

For security it is best to run a service with a specific user and group. You can create one using the following command: Add to the sonarr group any users you wish to be able to easily manage or access files downloaded through Deluge, for example:

sudo adduser --system --gecos "Sonarr Service" --disabled-password --group --home /var/lib/sonarr sonarr
sudo adduser tanshu sonarr

Autostart with systemd

Create the file /etc/systemd/system/sonarr.service containing the following:

sudo nano /etc/systemd/system/sonarr.service
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target 

[Service]
User=sonarr
Group=sonarr
Type=simple

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

[Install]
WantedBy=multi-user.target

Enable the service with:

sudo systemctl enable /etc/systemd/system/sonarr.service
sudo systemctl start sonarr
systemctl status sonarr

Open Browser

http://localhost:8989