Salim Jay.

Security Consultant

Penetration Tester

Linux Administrator

DevOps

Salim Jay.

Security Consultant

Penetration Tester

Linux Administrator

DevOps

Blog Post

Sonarr – Dive in

September 30, 2022 Design
Sonarr – Dive in

Package maintainers: Team Sonarr Introduction

Sonarr is supported natively on Windows. Sonarr can be installed as Windows Service or System Tray Application.

A Windows Service runs even when the user is not logged in, but special care must be taken since Windows Services cannot access network drives (X: mapped drives or \servershare UNC paths) without special configuration steps.
Additionally the Windows Service runs under the ‘Local Service’ account, by default this account does not have permissions to access your user’s home directory unless permissions have been assigned manually. This is particularly relevant when using download clients that are configured to download to your home directory.
It’s therefore advisable to install Sonarr as a System Tray Application if the user can remain logged in. The option to do so is provided during the installer.

Sonarr is supported on Windows 8.1 and Server 2012 or later. Pre-release or earlier versions of Windows are not supported.

Updating Sonarr v2 to v3

Sonarr v3 will automatically convert the existing Sonarr v2 installation. Sonarr v2 stored it’s database in C:ProgramDataNzbDrone, which will be automatically converted to C:ProgramDataSonarr. It’s advisable to make a backup of the v2 data first.

Sonarr v2 ran under the System account, which has far too many privileges. Sonarr v3 runs under the Local Service account by default, and will not have access to user’s home directories. This may lead to unexpected behavior when you’re using a download client thats configured to download to your home directory. If this applies to you, please install Sonarr to run as system tray application instead.

1Install Sonarr

Download the Windows Installer with the following link and execute it.

Download Windows Installer 2View Sonarr

Browse to http://localhost:8989 to start using Sonarr.

Alternatives for advanced users

Manual Install

It is possible to install Sonarr manually using the .zip download. However in that case you must manually deal with dependencies, installation and permissions.

Package maintainers: Team Sonarr Introduction

The installation process described here utilizes Debian’s apt package manager. The package will configure the required systemd unit to auto-start Sonarr. It’ll deploy the binaries in /usr/lib/sonarr/bin and the configuation data will be stored in /var/lib/sonarr.

Updating Sonarr v2 to v3

The Sonarr v3 package will attempt to automatically migrate an existing Sonarr v2 installation, but it will only do so for installations utilizing systemd. It’s advisable to make a backup of the v2 data first.
Sonarr v2 used the user’s home directory ~/.config/NzbDrone to store the application data.

1Optional: Mono and MediaInfo dependencies Debian includes functioning versions of Mono and MediaInfo in it’s default repositories. However newer updates are available in the vendors individual repositories. For Sonarr to function optimally it may be necessary to configure those repositories.

  • Add the Mono repository. You do not need to install mono itself, it’ll be done automatically later.
  • Add the MediaInfo repository.

2Add the Sonarr repository

Note: the packages should work on newer Debian versions too but we only provide packages for the ones listed below.

Debian 8 “jessie” (i386, amd64, armhf) sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 echo “deb https://apt.sonarr.tv/debian jessie main” | sudo tee /etc/apt/sources.list.d/sonarr.list sudo apt update Debian 9 “stretch” (i386, amd64, armhf) sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 echo “deb https://apt.sonarr.tv/debian stretch main” | sudo tee /etc/apt/sources.list.d/sonarr.list sudo apt update Debian 10 “buster” (i386, amd64, armhf, arm64) sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 echo “deb https://apt.sonarr.tv/debian buster main” | sudo tee /etc/apt/sources.list.d/sonarr.list sudo apt update 3Install Sonarr During the installation, you will be asked which user and group Sonarr must run as. It’s important to choose these correctly to avoid permission issues with your media files. We suggest you keep at least the group name identical between your download client(s) and Sonarr.
If you need to correct these after installation, please run dpkg-reconfigure sonarr. See debconf for more information. sudo apt install sonarr 4View Sonarr

Browse to http://localhost:8989 to start using Sonarr.

(Replace ‘localhost’ with your server IP if you’re connecting remotely)

Alternatives for advanced users

Manual Install

It is possible to install Sonarr manually using the .tar.gz download. However in that case you must manually deal with dependencies, installation and permissions.

Debian package channels

The Debian packages provided are used to configure the systemd unit, adding users and permissions. However the built-in updater is used for subsequent application updates. The package itself is only updated if changes are made to the required dependencies or install/configuration scripts.

For advanced users the alternative *-main and *-develop apt repo distributions are available. In these channels the built-in updater is disabled and apt must be used to install updates.

Docker container

You can follow the Docker guide to install Sonarr as a Docker container instead.

Package maintainers: Team Sonarr Introduction

The installation process described here utilizes Ubuntu’s apt package manager. The package will configure the required systemd unit to auto-start Sonarr. It’ll deploy the binaries in /usr/lib/sonarr/bin and the configuation data will be stored in /var/lib/sonarr.

Updating Sonarr v2 to v3

The Sonarr v3 package will attempt to automatically migrate an existing Sonarr v2 installation, but it will only do so for installations utilizing systemd. It’s advisable to make a backup of the v2 data first.
Sonarr v2 used the user’s home directory ~/.config/NzbDrone to store the application data.

1Optional: Mono and MediaInfo dependencies Ubuntu includes functioning versions of Mono and MediaInfo in it’s default repositories. However newer updates are available in the vendors individual repositories. For Sonarr to function optimally it may be necessary to configure those repositories.

  • Add the Mono repository. You do not need to install mono itself, it’ll be done automatically later.
  • Add the MediaInfo repository.

2Add the Sonarr repository

Note: the packages should work on newer Ubuntu versions too but we only provide packages for the ones listed below.

Ubuntu 16.04 “xenial” (i386, amd64, armhf) sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 echo “deb https://apt.sonarr.tv/ubuntu xenial main” | sudo tee /etc/apt/sources.list.d/sonarr.list sudo apt update Ubuntu 18.04 “bionic” (i386, amd64, armhf) sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 echo “deb https://apt.sonarr.tv/ubuntu bionic main” | sudo tee /etc/apt/sources.list.d/sonarr.list sudo apt update Ubuntu 20.04 “focal” (i386, amd64, armhf, arm64) sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 2009837CBFFD68F45BC180471F4F90DE2A9B4BF8 echo “deb https://apt.sonarr.tv/ubuntu focal main” | sudo tee /etc/apt/sources.list.d/sonarr.list sudo apt update 3Install Sonarr During the installation, you will be asked which user and group Sonarr must run as. It’s important to choose these correctly to avoid permission issues with your media files. We suggest you keep at least the group name identical between your download client(s) and Sonarr.
If you need to correct these after installation, please run dpkg-reconfigure sonarr. See debconf for more information. sudo apt install sonarr 4View Sonarr

Browse to http://localhost:8989 to start using Sonarr.

(Replace ‘localhost’ with your server IP if you’re connecting remotely)

Alternatives for advanced users

Manual Install

It is possible to install Sonarr manually using the .tar.gz download. However in that case you must manually deal with dependencies, installation and permissions.

Ubuntu package channels

The Ubuntu packages provided are used to configure the systemd unit, adding users and permissions. However the built-in updater is used for subsequent application updates. The package itself is only updated if changes are made to the required dependencies or install/configuration scripts.

For advanced users the alternative *-main and *-develop apt repo distributions are available. In these channels the built-in updater is disabled and apt must be used to install updates.

Docker container

You can follow the Docker guide to install Sonarr as a Docker container instead.

Package maintainers: degeberg, fryfrog Introduction

The Arch Linux User Repository offers a sonarr package that can be installed manually or using your favorite AUR helper.

Updating Sonarr v2 to v3

The existing sonarr AUR packages already used /var/lib/sonarr to store the Sonarr database. Sonarr v3 will convert that directory automatically on startup. It’s advisable to make a backup of the v2 data first.

The Sonarr v3 beta package sonarr-phantom has now been superceded by sonarr.

1Install Sonarr

An aur helper can install sonarr and its dependencies easily, or follow the AUR Installing Packages wiki for manual installation.

For example, to use yay to install the sonarr package:

yay -S sonarr 2Start Sonarr sudo systemctl daemon-reload sudo systemctl enable –now sonarr 3View Sonarr

Browse to http://localhost:8989 to start using Sonarr.

(Replace ‘localhost’ with your server IP if you’re connecting remotely)

Alternatives for advanced users

Manual Install

It is possible to install Sonarr manually from upstream using the .tar.gz download. However in that case you must manually deal with dependencies, installation and permissions.

Docker container

You can follow the Docker guide to install Sonarr as a Docker container instead.

Package maintainers: xartin, candrews Introduction

Gentoo Linux includes sonarr so it can be installed using Gentoo portage.

1Install Sonarr emerge www-apps/sonarr 2Start Sonarr systemctl daemon-reload systemctl enable –now sonarr 3View Sonarr

Browse to http://localhost:8989 to start using Sonarr.

(Replace ‘localhost’ with your server IP if you’re connecting remotely)

Alternatives for advanced users

Manual Install

It is possible to install Sonarr manually from upstream using the .tar.gz download. However in that case you must manually deal with dependencies, installation and permissions.

Docker container

You can follow the Docker guide to install Sonarr as a Docker container instead.

Package maintainers: mvanbaak Introduction

Sonarr can be installed using the FreeBSD Sonarr Port.

1Install Sonarr

Install the port with:

pkg install sonarr 2Start Sonarr

Start the service:

sysrc sonarr_enable=YES service sonarr start 3View Sonarr

Browse to http://localhost:8989 to start using Sonarr.

(Replace ‘localhost’ with your server IP if you’re connecting remotely)

Alternatives for advanced users

Manual Install

It is possible to install Sonarr manually from upstream using the .tar.gz download. However in that case you must manually deal with dependencies, installation and permissions.

Docker container

You can follow the Docker guide to install Sonarr as a Docker container instead.

Please contact us if you wish to port Sonarr v3 for any other distribution that the ones already listed.
Sonarr v2 is supported by various third-parties on other platforms and we prefer to coordinate the port of v3.

A generic download is available for linux, but dependencies, installation and permissions will need to be done manually.

Download Linux .tar.gz Package maintainers: Team Sonarr Introduction

The easiest way to install Sonarr on macOS is to use the App archive with the steps described below.

Updating Sonarr v2 to v3

The Sonarr v3 package will attempt to automatically migrate an existing Sonarr v2 database. Sonarr v2 used the user’s home directory ~/.config/NzbDrone to store the application data, this will be migrated to ~/.config/Sonarr.
It’s advisable to make a backup of the v2 data before installing v3.

1Download App package Download macOS App 2Install App

Open the archive and drag the Sonarr icon to your Application folder.

In macOS 10.12+ Gatekeeper App Translocation will prevent Sonarr from updating if it’s being run directly from the download location. Therefore it MUST be moved to the Application folder.

3Start Sonarr

Open Sonarr.app in your Application folder.

During startup it may ask you to install the Mono Runtime if an appropriate version is not already installed.

4View Sonarr

Browse to http://localhost:8989 to start using Sonarr.

Alternatives for advanced users

Manual Install

It is possible to install Sonarr manually using the .tar.gz download. However in that case you must manually deal with dependencies, installation and permissions.

Docker container

You can follow the Docker guide to install Sonarr as a Docker container instead.

The Sonarr v2 and v3 Qnap port is being maintained by the qnap forum community.
Please contact us if you wish to include the appropriate install instructions on this page.

Please contact us if you wish to port Sonarr v3 for any other nas that the ones already listed.

A generic download is available for linux, but dependencies, installation and permissions will need to be done manually.

Download Linux .tar.gz Package maintainers: linuxserver, hotio Introduction

The Sonarr team does not offer an official Docker image. However, a number of third parties have created and maintain their own.
These instructions provide generic guidance that should apply to any Sonarr Docker image.

Updating Sonarr v2 to v3

Most docker containers use /config volume to mount the data directory and supply that path to Sonarr as parameter. Sonarr v3 will convert the given directory on startup if a Sonarr v2 database is found. Of course, it is always advisable to make a backup first.

1Avoid common pitfalls

Volumes and Paths

There are two common problems with Docker volumes: Paths that differ between the Sonarr and download client container and paths that prevent fast moves and hard links.
The first is a problem because the download client will report a download’s path as /torrents/My.Show.S01E01/, but in the Sonarr container that might be at /downloads/My.Show.S01E01/. The second is a performance issue and causes problems for seeding torrents. Both problems can be solved with well planned, consistent paths.

Most Docker images suggest paths like /tv and /downloads. This causes slow moves and doesn’t allow hard links because they are considered two different file systems inside the container. Some also recommend paths for the download client container that are different from the Sonarr container, like /torrents.
The best solution is to use a single, common volume inside the containers, such as /data. Your Series would be in /data/tv, torrents in /data/downloads/torrents and/or usenet downloads in /data/downloads/usenet.

If this advice is not followed, you may have to configure a Remote Path Mapping in the Sonarr web UI (Settings › Download Clients).

Ownership and Permissions

Permissions and ownership of files is one of the most common problems for Sonarr users, both inside and outside Docker. Most images have environment variables that can be used to override the default user, group and umask, you should decide this before setting up all of your containers. The recommendation is to use a common group for all related containers so that each container can use the shared group permissions to read and write files on the mounted volumes.
Keep in mind that Sonarr will need read and write to the download folders as well as the final folders.

For a more detailed explanation of these issues, see The Best Docker Setup and Docker Guide wiki article.

2Install Sonarr

To install and use these Docker images, you’ll need to keep the above in mind while following their documentation. There are many ways to manage Docker images and containers too, so installation and maintenance of them will depend on the route you choose.

  • ghcr.io/hotio/sonarr:release

    hotio doesn’t specify any default volumes, besides /config. Images are automatically updated multiple times per hour if upstream changes are found. Read the instructions on how to install the image.

  • ghcr.io/linuxserver/sonarr:latest

    linuxserver.io is one of the most prolific and popular Docker image maintainers. They also maintain images for most of the popular download clients as well. LinuxServer specifies a couple of optional default volumes such as /tv and /downloads. The default volumes are not optimal nor recommended. Our recommendation is to use a single volume for the data, as mentioned above.

Please contact us if you wish to port Sonarr v3 for any other platform that the ones already listed.

Source

Taggs:
Write a comment