Bowl of popcorn with text

Using NZBGet and Radarr/Sonarr/Bazarr/Lidarr on Synology NAS

Introduction

In this guide, we will show you how to install and configure the following applications.

NZBGetNZBGet is a binary downloader, which downloads files from Usenet based on information given in nzb-files.
SonarrSonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
RadarrRadarr is a movie collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new movies and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available.
Bazarr Bazarr is a companion application to Sonarr and Radarr that manages and downloads subtitles based on your requirements.
LidarrLidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new albums from your favorite artists and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available.

Installation methods

There are several ways to install the applications.

Applications

We can use Synology 3rd party packages from for example SynoCommunity or use Docker images to install the applications.

SynoCommunity

Pros

  • Packages can be installed through Synology Package Center
  • Available for (almost) all Synology models

Cons

  • Needs work when a new DSM version is released
  • Can take awhile before new application versions are released

Docker

Pros

  • Large ecosystem of up-to-date applications
  • Will keep working when a new DSM version is released

Cons

  • Slightly higher learning curve
  • Only available for Synology NAS models with an Intel or AMD processor

Management

SynoCommunity

For SynoCommunity packages we can use the Synology Package Center just like any other Synology package.

Docker

For Docker we can use the Synology Docker GUI or use Portainer to install and manage the applications.

Synology Docker GUI

Pros

  • Part of the native Synology Docker package
  • Erm… ๐Ÿ˜€

Cons

  • Limited feature set 
  • No templating or docker-compose capabilities

Docker Compose is a tool for defining and running multi-container Docker applications, but can be used for single-container Docker applications as well. Docker Compose uses docker-compose.yaml files for defining those applications.

Portainer

Pros

  • Provides access to a wide variety of commonly used Docker features
  • Templating and docker-compose capabilities

Cons

  • Needs to be installed (but you don’t necessarily need SSH access)
  • Still cannot match the command line…

Installation method in this guide

In this guide we are going to use Docker and Portainer using Portainer App Templates or Docker Compose.

  • Once you get the hang of it, you have a choice of thousands of applications to install. Definitely worth learning Docker.
  • Portainer offers a variety of ways to install the applications. You can use for example App Templates or docker-compose.yaml files.

For the LinuxServer.io Docker images that we are going to use there are App Templates and docker-compose.yaml files and docker run scripts available.

Install Docker

If you haven’t installed Docker yet, have a look at Using Docker on Synology NAS.

Install Portainer and App Templates

If you haven’t installed Portainer yet, have a look at Portainer as alternative to Synology Docker GUI.

Install the Portainer App Templates as described in Portainer App Templates for LinuxServer.io Docker containers.

Directory structure

Preparation

Terminal

Some commands are executed from the command line. For this you need to enable SSH via Control Panel, Terminal & SNMP, Terminal, Enable SSH service and login with a terminal emulator.

If you need more information on how to enable SSH access, have a look at How to use SSH to connect to Synology NAS.

Symbolic links

Symbolic links are used to set up the directory structure. It is therefore useful to enable “Allow symbolic links within shared folders” via Control Panel, File Services, SMB / AFP / NFS, SMB, Advanced Settings.

Using symbolic links is not strictly necessary.

Directory structure for persistent data

Docker containers do not store persistent data. You can use bind mounts to store persistent data such as settings. The use of bind mounts is described here.

Possible directory structure

There are different approaches for defining your directory structure.

If you install the Synology Docker package, a Shared Folder called docker is created. This is the place where the volume directories are stored.

Although volumes are the preferred mechanism for persisting data generated by and used by Docker containers, the default approach by LinuxServer.io is to use bind mounts. When you use a bind mount, a file or directory on the host machine is mounted into a container. We will store the directories in the Shared Folder called docker.

Also, with the default volume directory structure provided by LinuxServer.io you cannot use hard links. More information here. If you want to use hard links, adjust your paths appropriately. In this guide we will use the default volume directory structure provided by LinuxServer.io.

If we look at the docker-compose.yaml file for Sonar, we see three different bind mounts:

  # Database and sonarr configs
  - ${BASEDIR:-/volume1/docker}/sonarr/config:/config
  # Location of TV library on disk
  - ${BASEDIR:-/volume1/docker}/sonarr/tv:/tv
  # Location of download managers output directory
  - ${BASEDIR:-/volume1/docker}/sonarr/downloads:/downloadsCode language: Bash (bash)

The directory structure on your Synology will look like:

/volume1/docker/sonarr/
โ”œโ”€โ”€ config
โ”œโ”€โ”€ downloads
โ””โ”€โ”€ tvCode language: Markdown (markdown)

And similar for all applications.

/volume1/docker/
โ”œโ”€โ”€ bazarr
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ movies
โ”‚ย ย  โ””โ”€โ”€ tv
โ”œโ”€โ”€ lidarr
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ downloads
โ”‚ย ย  โ””โ”€โ”€ music
โ”œโ”€โ”€ nzbget
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ””โ”€โ”€ downloads
โ”œโ”€โ”€ radarr
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ downloads
โ”‚ย ย  โ””โ”€โ”€ movies
โ””โ”€โ”€ sonarr
    โ”œโ”€โ”€ config
    โ”œโ”€โ”€ downloads
    โ””โ”€โ”€ tvCode language: Markdown (markdown)

In this way you can easily gain insight into and backup the persistent data.

Explanation:

  • One root directory /volume1/docker
  • One subdirectory per container bazarr, lidarr, nzbget, radarr and sonarr
  • Per -v option a directory like for example config and downloads for NZBGet

We can leave this directory structure as it is, and change the paths in the applications, or use symbolic links to logically link directories.

If we logically link the directories the directory structure will look like.

/volume1/docker/
โ”œโ”€โ”€ bazarr
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ movies -> /volume1/docker/radarr/movies
โ”‚ย ย  โ””โ”€โ”€ tv -> /volume1/docker/sonarr/tv
โ”œโ”€โ”€ lidarr
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ downloads -> /volume1/docker/nzbget/downloads
โ”‚ย ย  โ””โ”€โ”€ music -> /volume1/Share/Media/Music
โ”œโ”€โ”€ nzbget
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ””โ”€โ”€ downloads
โ”œโ”€โ”€ radarr
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ downloads -> /volume1/docker/nzbget/downloads
โ”‚ย ย  โ””โ”€โ”€ movies -> /volume1/Share/Media/Video/Movies
โ””โ”€โ”€ sonarr
    โ”œโ”€โ”€ config
    โ”œโ”€โ”€ downloads -> /volume1/docker/nzbget/downloads
    โ””โ”€โ”€ tv -> /volume1/Share/Media/Video/TVCode language: Markdown (markdown)

Where your media library is located in a different location and looks like.

/volume1/Share/
โ””โ”€โ”€ Media
    โ”œโ”€โ”€ Music
    โ””โ”€โ”€ Video
        โ”œโ”€โ”€ Movies
        โ””โ”€โ”€ TVCode language: Markdown (markdown)

Explanation:

  • Lidarr, Sonarr and Radarr use NZBGet and thus refer to the NZBGet download directory
  • Bazarr searches subtitles for Sonarr and Radarr and thus refers to the TV directory of Sonarr and the movies directory of Radarr

You can create the above directories and symbolic links as follows.

# Media library directories
mkdir -p /volume1/Share/Media/Video/Movies
mkdir -p /volume1/Share/Media/Video/TV
mkdir -p /volume1/Share/Media/Music

# NZBGet directories
mkdir -p /volume1/docker/nzbget/config
mkdir -p /volume1/docker/nzbget/downloads

# Sonarr directories
mkdir -p /volume1/docker/sonarr/config
ln -s /volume1/docker/nzbget/downloads /volume1/docker/sonarr/downloads
ln -s /volume1/Share/Media/Video/TV /volume1/docker/sonarr/tv

# Radarr directories
mkdir -p /volume1/docker/radarr/config
ln -s /volume1/docker/nzbget/downloads /volume1/docker/radarr/downloads
ln -s /volume1/Share/Media/Video/Movies /volume1/docker/radarr/movies

# Bazarr directories
mkdir -p /volume1/docker/bazarr/config
ln -s /volume1/docker/radarr/movies /volume1/docker/bazarr/movies
ln -s /volume1/docker/sonarr/tv /volume1/docker/bazarr/tv

# Lidarr directories
mkdir -p /volume1/docker/lidarr/config
ln -s /volume1/docker/nzbget/downloads /volume1/docker/lidarr/downloads
ln -s /volume1/Share/Media/Music /volume1/docker/lidarr/musicCode language: Bash (bash)

This is an example directory structure. The directory structure chosen by you may be different.

Install applications

Using Portainer

If you haven’t installed Portainer or the App Templates go back to Install Portainer and App Templates.

Start Portainer and go to App Templates in the sidebar menu on the left.

Search and deploy the following containers:

  • NZBGet
  • Sonarr
  • Radarr
  • Bazarr
  • Lidarr

More information about deploying containers using App Templates can be found in Portainer App Templates for LinuxServer.io Docker containers.

You can also deploy a docker-compose.yaml file as a Stack via Portainer, more about this in the next section where we cover Docker Compose and docker-compose.yaml files.

Using Docker Compose

From command line

The following docker-compose.yaml files can be used to deploy the containers.

ApplicationLocation
NZBGethttps://github.com/technorabilia/docker-bits/tree/main/lsio/nzbget
Sonarrhttps://github.com/technorabilia/docker-bits/tree/main/lsio/sonarr
Radarrhttps://github.com/technorabilia/docker-bits/tree/main/lsio/radarr
Bazarrhttps://github.com/technorabilia/docker-bits/tree/main/lsio/bazarr
Lidarrhttps://github.com/technorabilia/docker-bits/tree/main/lsio/lidarr

You can manually copy the files or clone the complete repository.

git clone https://github.com/technorabilia/docker-bits.gitCode language: Bash (bash)

Or get individual files using curl like for example the docker-compose.yaml file for NZBGet.

curl https://raw.githubusercontent.com/technorabilia/docker-bits/main/lsio/nzbget/docker-compose.yaml -o docker-compose.yamlCode language: Bash (bash)

The docker-compose.yaml files can be stored for example in the /volume1/docker directory (like /volume1/docker/nzbget/docker-compose.yaml for NZBGet).

More information about using the repository and scripts can be found in Docker scripts for LinuxServer.io Docker containers.

Once you have a docker-compose.yaml file you can use Docker Compose to create the containers and more. An overview of the Docker Compose CLI can be found here.

The following example is for NZBGet.

root@DiskStation:/volume1/docker/nzbget# docker-compose up -d
Creating network "nzbget_default" with the default driver
Creating nzbget ... done
root@DiskStation:/volume1/docker/nzbget# docker-compose stop
Stopping nzbget ... done
root@DiskStation:/volume1/docker/nzbget# docker-compose start
Starting nzbget ... done
root@DiskStation:/volume1/docker/nzbget# docker-compose down
Stopping nzbget ... done
Removing nzbget ... done
Removing network nzbget_default
root@DiskStation:/volume1/docker/nzbget#Code language: Bash (bash)

Instead of having an individual docker-compose.yaml for each application, you can also have a single docker-compose.yaml file for all applications.

You can manually add the individual docker-compose.yaml files together, or use the following script to create one docker-compose.yaml file for all applications.

COMPOSE_FILE=docker-compose.yaml

echo --- > $COMPOSE_FILE
echo version: \"2.1\" >> $COMPOSE_FILE
echo services: >> $COMPOSE_FILE
echo >> $COMPOSE_FILE

for app in nzbget sonarr radarr bazarr lidarr
do
  echo $app
  curl -s https://raw.githubusercontent.com/technorabilia/docker-bits/main/lsio/$app/docker-compose.yaml | \
    sed -n "/^\(---\|version:\|services:\)/! p" >> $COMPOSE_FILE
  echo >> $COMPOSE_FILE
doneCode language: Bash (bash)

In this way the comments (help text) are preserved. If you don’t care about comments you can also use docker-compose config to merge docker-compose.yaml files.

Once you have one docker-compose.yaml file for all applications, you can use Docker Compose to create all the containers (and more) at once. An overview of the Docker Compose CLI can be found here.

The following example is for all applications.

root@DiskStation:~# docker-compose up -d
Creating network "root_default" with the default driver
Creating sonarr ... done
Creating radarr ... done
Creating lidarr ... done
Creating bazarr ... done
Creating nzbget ... done
root@DiskStation:~# docker-compose pull
Pulling nzbget ... done
Pulling sonarr ... done
Pulling radarr ... done
Pulling bazarr ... done
Pulling lidarr ... done
root@DiskStation:~# docker-compose down
Stopping nzbget ... done
Stopping radarr ... done
Stopping lidarr ... done
Stopping bazarr ... done
Stopping sonarr ... done
Removing nzbget ... done
Removing radarr ... done
Removing lidarr ... done
Removing bazarr ... done
Removing sonarr ... done
Removing network root_default
root@DiskStation:~#Code language: Bash (bash)

From Portainer

As soon as you have a docker-compose.yaml file, you can also deploy it as a Stack via Portainer.

Start Portainer and go to Stack in the sidebar menu on the left.

Choose Add Stack and give it a name like “Media Delivery”.

Copy/paste the docker-compose.yaml file you have created using the Web editor or Upload it from your computer.

Choose Deploy the Stack.

Access applications

After the applications are started, they can be accessed using the following URL.

ApplicationURL
NZBGethttp://synology-nas-ip-address:6789
Sonarrhttp://synology-nas-ip-address:8989
Radarrhttp://synology-nas-ip-address:7878
Bazarrhttp://synology-nas-ip-address:6767
Lidarrhttp://synology-nas-ip-address:8686

Optionally, you can use reverse proxies and access the applications via, for example.

ApplicationURL
NZBGethttp://nzbget.your-domain.com
Sonarrhttp://sonarr.your-domain.com
Radarrhttp://radarr.your-domain.com
Bazarrhttp://bazarr.your-domain.com
Lidarrhttp://lidarr.your-domain.com

Configure applications

NZBGet

When you start NZBGet for the first time, you must enter the following default username and password.

Username: nzbget
Password: tegbzn6789

Adjust the following settings.

Settings, Paths

If you want to use the Email.py extension, you can change the path as follows without having to copy anything.

ScriptDir=/app/nzbget/share/nzbget/scripts

Settings, News Server

Server1.Name=********
Server1.Host=news.********.com
Server1.Port=563
Server1.Username=********
Server1.Password=********

Settings, Extention Scripts

Fill this in if you would like to be kept informed of downloads via Email.

Extensions = EMail.py

Settings, Email

EMail.py:SendMail=Always
EMail.py:From="NZBGet" <********@gmail.com>
EMail.py:To=********@gmail.com
EMail.py:Server=smtp.gmail.com
EMail.py:Port=587
EMail.py:Encryption=yes
EMail.py:Username=********
EMail.py:Password=********
EMail.py:Statistics=yes
EMail.py:FileList=yes
EMail.py:BrokenLog=yes
EMail.py:NzbLog=OnFailure

Sonarr

Adjust the following settings.

Settings, Media Management

Episode Naming

Rename Episodes: Yes

Choose your naming scheme.

Root Folders

Add a root folder by choosing “Add Root Folder”.

Path: /tv

Settings, Indexers

Add an indexer by choosing the Plus sign.

Name: ********
Enable RSS: Yes
Enable Search: Yes
URL: http://********
API Key: ********
Categories: HD
Anime Categories:

Settings, Download Client

Add a download client by choosing the Plus sign and select NZBGet.

Name: NZBGet
Enable: Yes
Host: nzbget.your-domain.com
Port: 80
Use SSL: No
Username:
Password:
Category: Series
Recent Priority: Normal
Older Priority: Normal
Add Paused: No

Radarr

Adjust the following settings.

Settings, Media Management

Movie Naming

Rename Movies: Yes

Choose your naming scheme.

Root Folders

Add a root folder by choosing “Add Root Folder”.

Path: /movies

Settings, Indexers

Add an indexer by choosing the Plus sign.

Name: ********
Enable RSS: Yes
Enable Search: Yes
URL: http://********
API Key: ********

Settings, Download Client

Add a download client by choosing the Plus sign and select NZBGet.

Name: NZBGet
Enable: Yes
Host: nzbget.your-domain.com
Port: 80
Username:
Password:
Category: Movies
Recent Priority: Normal
Older Priority: Normal
Use SSL: No
Add Paused: No

Bazarr

Settings, Languages

Select the subtitle languages of your choice.

Single Language: No
Languages Filter: Dutch English

Settings, Providers

Choose at least one subtitle provider, for example OpenSubtitles (for OpenSubtitles you need to create an account; this is free of charge but with restrictions).

Settings, Sonarr

Use Sonarr: On

Hostname or IP Address: sonarr.your-domain.com
Port Number: 80
URL Base:
SSL Enabled: No
API Key: ********

The API Key can be found in Sonarr via Settings, General, Security, API Key.

Settings, Radarr

Use Radarr: On

Hostname or IP Address: radarr.your-domain.com
Port Number: 80
URL Base:
SSL Enabled: No
API Key: ********

The API Key can be found in Radarr via Settings, General, Security, API Key.

Lidarr

Adjust the following settings.

Settings, Media Management

Track Naming

Rename Tracks: Yes

Choose your naming scheme.

Root Folders

Add a root folder by choosing “Add Root Folder”.

Path: /music

Settings, Indexers

Add an indexer by choosing the Plus sign.

Name: ********
Enable RSS: Yes
Enable Search: Yes
URL: http://********
API Key: ********

Settings, Download Client

Add a download client by choosing the Plus sign and select NZBGet.

Name: NZBGet
Enable: Yes
Host: nzbget.your-domain.com
Port: 80
Use SSL: No
Username:
Password:
Category: Music
Recent Priority: Normal
Older Priority: Normal
Add Paused: No