Build A Complete Linux Media Server – Install Sonarr Series Download Manager

This entry is part 5 of 6 in the series Complete Linux Media Server

Install Sonarr Downloader

This article describes how to install Sonarr on Debian and integrate it with the previously configured transmission and nzbget programs.

Sonarr is the new name for NZBdrone – an application which not only automates TV show downloads but also maintains them after this is done. For example, depending on settings you configure, Sonarr will download an episode of a series in SD format as soon as it is posted and then upgrade it as progressively better quality releases become available.

Install Mono

Mono is an open source impementation of Microsoft’s .NET runtime and required in order run Sonarr. Debian needs a couple of extra steps to install this:

  1. Add the mono repositories to the Debian sources list:
    • sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
      echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
      echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
  2. Update the package lists and install:
    • sudo apt-get upgrade && sudo apt-get install mono-devel

 Install Sonarr

First, add the Sonarr software repository to the debian software source list. This will allow us to easily install (and upgrade in the future) using apt-get:

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

The next step is to install Sonarr itself:

sudo apt-get update
sudo apt-get install nzbdrone

Configure Sonarr to Run As a Service Under nobody:nogroup

  1. Change permissions on the Sonarr folder:
    • sudo chown -R nobody:nogroup /opt/NzbDrone/
  2. Create the file sonarr.service in /etc/systemd/system/ and paste in the following:
    • [Unit]
      Description=Sonarr Daemon
      After=network.target
      
      [Service]
      User=nobody
      Group=nogroup
      Restart=always
      RestartSec=5
      Type=simple
      ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/home/nobody/.config/NzbDrone
      TimeoutStopSec=20
      KillMode=process
      Restart=on-failure
      
      [Install]
      WantedBy=multi-user.target
  3. Update systemctl, enable the service and start sonarr:
    • sudo systemctl daemon-reload 
      sudo systemctl enable sonarr 
      sudo systemctl start sonarr
  4. This point is just a reminder that if you haven’t given nobody a home as detailed on the server install page then you’ll need to do it now and then restart sonarr. This is necessary to enable sonarr to auto-update which it can only do if the config files are kept separately away from its install directory.

Connect to Sonarr Web GUI

Open your browser and browse to http://your_server_ip:8989/

You should now see the following and this tells us that everything is working well:

Now we can proceed to our Sonarr configuration – click here to continue!

Series Navigation<< Build A Complete Linux Media Server – Install Nzbget

2 Replies to “Build A Complete Linux Media Server – Install Sonarr Series Download Manager”

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version
%%footer%%