2017-03-13 13:17:03 +00:00
|
|
|
---
|
|
|
|
title: ''
|
|
|
|
body_classes: ''
|
|
|
|
order_by: ''
|
|
|
|
order_manual: ''
|
|
|
|
---
|
|
|
|
|
2017-03-13 07:39:19 +00:00
|
|
|
# Sonarr
|
|
|
|
### Add Sonarr's repository to your software source
|
2017-03-16 05:19:37 +00:00
|
|
|
```sh
|
|
|
|
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
|
|
|
|
```
|
2017-03-13 07:39:19 +00:00
|
|
|
### Install/Update Sonarr
|
2017-03-16 05:19:37 +00:00
|
|
|
```sh
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install nzbdrone
|
|
|
|
```
|
2017-03-13 07:39:19 +00:00
|
|
|
### User Management
|
|
|
|
For security it is best to run a service with a specific user and group.
|
2017-03-16 05:19:37 +00:00
|
|
|
You can create one using the following command: Add to the `sonarr`
|
2017-03-13 07:39:19 +00:00
|
|
|
group any users you wish to be able to easily manage or access files
|
2017-03-16 05:19:37 +00:00
|
|
|
downloaded through Deluge, for example:
|
|
|
|
```sh
|
|
|
|
sudo adduser --system --gecos "Sonarr Service" --disabled-password --group --home /var/lib/sonarr sonarr
|
|
|
|
sudo adduser tanshu sonarr
|
|
|
|
```
|
2017-03-13 07:39:19 +00:00
|
|
|
### Autostart with systemd
|
|
|
|
Create the file `/etc/systemd/system/sonarr.service` containing the
|
2017-03-16 05:19:37 +00:00
|
|
|
following:
|
|
|
|
```sh
|
|
|
|
sudo nano /etc/systemd/system/sonarr.service
|
|
|
|
```
|
|
|
|
```
|
|
|
|
[Unit]
|
|
|
|
Description=Sonarr Daemon
|
|
|
|
After=syslog.target network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
User=sonarr
|
|
|
|
Group=sonarr
|
|
|
|
Type=simple
|
|
|
|
|
2017-03-16 05:32:28 +00:00
|
|
|
ExecStart=/usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe -nobrowser
|
|
|
|
TimeoutStopSec=20
|
2017-03-16 05:19:37 +00:00
|
|
|
KillMode=process
|
|
|
|
Restart=on-failure
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
```
|
|
|
|
Enable the service with:
|
|
|
|
```sh
|
|
|
|
sudo systemctl enable /etc/systemd/system/sonarr.service
|
|
|
|
sudo systemctl start sonarr
|
|
|
|
systemctl status sonarr
|
|
|
|
```
|
2017-03-13 07:39:19 +00:00
|
|
|
### Open Browser
|
|
|
|
`http://localhost:8989`
|