Skip to content

Sonarr in Docker on a Synology NAS

UpdateDate
Added Docker Compose details
Added new folder mappings to ensure atomic moves and Hard-linking
03/05/2021

Downloading the Sonarr Image

The first step is to download Sonarr from within Docker. Open Docker and click on the registry tab, in the search box type ‘Sonarr’ the version we are using in this guide is from Linux|Server as they are always kept up to date. You can either right click on the Sonarr image and click download, or just click on it once and press the download button.

Before the container begins downloading you will be given a choice of what version to use, at the time of updating this guide if you select ‘latest’ you will receive V2 with the older interface. If you select ‘preview’ you will get v3 which brings the interface in line with Radarr. After clicking OK the container will begin to download in the ‘Image’ tab you can track its progress until the download completes.

Setting up a Docker User for Sonarr and Obtaining the PGID and PUID

In previous versions of this guide we used your default admin account for each container this is not very secure so please now follow the separate setup guide and then head back here.

Setting up the container

Once the download has finished, select it from the list and click on ‘Launch’, this won’t actually start things yet you effectively launch the setup process.

newsonarr01

As you can see in the screenshot above you will initially need to give your container a name, in this case I just left it as the default, but you can call it whatever you want then click on ‘Advanced Settings’

‘Port Settings’

We need to assign the container some local ports for it to be reached on.

Whatever you do, don’t leave the local Port to auto, this will mean the container will be assigned a new port number every time it starts, meaning you have to keep looking it up each time you want to access the Sonarr interface

In our case we need to setup two ports for Sonarr, one for its Non SSL port and one for the SSL port (the SSL port is not on by default, you will need to turn this on once Sonarr is up).

As per the screenshot below just use the same port numbers for both local and container.

Volumes / Mounts

We can now move onto the volume tab in which we will be specifying the directories where Sonarr will be able find our existing TV shows, the location where your movies are downloaded to and a folder to store its configuration files.

As you can see in the screenshot you will need to browse to each of the directories and add a corresponding mount point inside the Docker container.

I generally keep all of my configuration settings in my Docker directory so they can easily be backed up. The other folders you will need to amend based on your own folder locations.

You will notice there is a consistent mount path for each of the folders that you choose to mount to the container, this is important as Docker will see all of your individual folders as one consistent filesystem rather than separate volumes. This will mean you should see much faster file moves (aka Atomic Moves) and also if you are using torrents it means you can enable hard-links

Environment Variables (PGID,  PUID and Timezone)

Next we are going to setup a couple of environment variables, in the variable column enter PGID, PUID and TZ. In the first two enter the value you obtained earlier, you can find a list of timezones here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Adding the environment variables

Now you can click OK which takes you back to the first screen from earlier, click next to see a summary of your setup.

newsonarr06

Click apply and your Sonarr container will now start up, give it a minute or so for its first launch.

Now you just need to navigate to your NAS IP and the Non SSL port we setup earlier, once you are in Sonarr you can enable SSL to access via the alternative SSL port we also setup.

Now if you are looking for some help setting up Sonarr itself head over to our configuration guide

Docker Compose

You can use the below code saved as sonarr.yml to do the entire process above in one quick command via SSH. Ensuring you change the variables to your own media paths.

version: "3.2"
services:
  Sonarr:
    image: linuxserver/sonarr:latest
    container_name: sonarr
    environment:
      - PGID=YOURPGID
      - PUID=YOURPUID
      - TZ=Europe/London
    volumes:
      - /volume1/docker/sonarrv3:/config
      - /volume1/downloads:/media/downloads
      - /volume1/tv:/media/tv
      - /volume1/tv kids:/media/tvkids
      - /volume1/tv anime:/media/tv anime
    ports:
      - 8989:8989/tcp
    restart: unless-stopped
sudo docker-compose -f /volume1/docker/sonarr.yml up -d --remove-orphans

Throw me some bits

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running the site, it could even buy me a beer πŸ™‚

  • Bitcoin
  • Ethereum
  • Tether
  • Xrp
  • Polkadot
  • Binance coin
  • Litecoin
  • Bitcoin cash
  • Dogecoin
  • Tron
  • Monero
  • Omisego
Scan to Donate Bitcoin to bc1qfznx5kxad9k9z5t9y79mkm9ukfexan9a6wrzl0

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Tether to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Tether to this address

Scan the QR code or copy the address below into your wallet to send some Tether

Scan to Donate Xrp to rKGpNHetksTn4dgwgpiTkg8JM4uJ3J6pam

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Polkadot to 153iRH61nXQZUXMveZxCmYyzjf1cWYVnxpHpfifoNchQuXbY

Donate Polkadot to this address

Scan the QR code or copy the address below into your wallet to send some Polkadot

Scan to Donate Binance coin to bnb14ye5rju74u5ythneaum2rjvp8eqep6wq8flghx

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Litecoin to LfNfer3aSqLx4p8KfbbkT96ArXLXLDPxoD

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Bitcoin cash to qrc7scd2drzsd7kywpsjfklvkmm26fqc2vd7uyvdx9

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Dogecoin to DCwbNzfYHx22MDSyEVLWgfjxziYHtcgwAM

Donate Dogecoin to this address

Scan the QR code or copy the address below into your wallet to send some Dogecoin

Scan to Donate Tron to TL1Q3vY9mHnDMedHRyU8ERUAY8SzJ4FXiV

Donate Tron to this address

Scan the QR code or copy the address below into your wallet to send some Tron

Scan to Donate Monero to 45qwFr42XiA8egC5z2HdSQ2FzzP9VR1MvD5Sicg4EhGvdvTutx9GsF6DeU8DHAsTZy2ShBERjCB5rdy8iQ9CFnFu9Z6Adgw

Donate Monero to this address

Scan the QR code or copy the address below into your wallet to send some Monero

Scan to Donate Omisego to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Omisego to this address

Scan the QR code or copy the address below into your wallet to send some Omisego

Published inDockerSynology

137 Comments

  1. Michi491 Michi491

    Great Tutorial.
    Have you ever tried using your NAS as a DLNA media player ?. Because if you do so, you’ll encounter a problem with synology not indexing your new downloaded files. Are you aware of it ?

  2. jangles123 jangles123

    Hi, thank you very much for your content. It is very helpful.
    I’m currently trying to setup SAB on my Synology NAS and when I go into SAB settings to define the folders for complete and incomplete, I cannot find or navigate to /volume1 where I have an existing downloads folder setup. Any help would be appreciated.

  3. Hi everyone, thanks for this guide Dr_Frankenstein! I’m facing a setting issue, and don’t really know how to solve it.

    On my local HDD, I have these paths:

    /volume1/nas/downloads (DownloadStation downloads folder)
    /volume1/nas/series (My series folder)

    In my docker config, I mounted folders as:

    /docker/sonarr > /config
    /volume1/nas/downloads > /downloads
    /volume1/nas/series > /tv

    When I sh the container, I see and browse both “downloads” and “tv” folders. My sonarr series path is “/tv” and they’re all properly listed and monitored.

    I set DownloadStation to download my torrents, but here comes the issue, torrent is properly sent to DownloadStation, when when it’s trying to move to the serie folder, sonarr gives me an error:

    “No files found are eligible for import in /volume1/nas/downloads/The.Last.Dance…”

    I understood Sonarr is trying to read a local folder, not a mounted one in his container. How to make work with his path “/downloads” instead of “/volume1/nas/downloads”?

    I have 2 settings that could be the thing:

    The remapping path in Download clients: https://i.imgur.com/CqZmSuN.png
    And the download path of my DownloadStation configuration: https://i.imgur.com/lIK0741.png

    But it says “download” is not a valid shared folder. Can you help me to find the way for Sonarr and DownloadStation communicate properly ?

    • Dr_Frankenstein Dr_Frankenstein

      Hey, can you pop a picture up of the mounts you used in Docker as I suspect you are using the incorrect file path as Sonarr won’t see the /volume1/…

          • thanks for your video πŸ™‚ I reached this too, and working fine. Problems come later when DownloadStation finishes the download. Sonarr is unable to move / process the file, but I suspect a PUID/PGID issue. You’re using 1026/101 that is not my user’s one, maybe this should be added in your guide? (most of basic users will simply fill your numbers, without understanding that they should match with a user on their NAS).

          • Dr_Frankenstein Dr_Frankenstein

            Good point, I will amend the guide and screenshot its on my to do list. As they need to both have the same permissions otherwise you will get the access denied error

    • Michi491 Michi491

      The solution is to set your Remote Path Mapping :
      Host : you Nas ip on the LAN
      Remote Path : volume1/Download
      Local Path : /downloads.

  4. Qew Qew

    Thanks Frankenstein, These guides help a lot. I have a question. In all your guides i don’t see the pre-set variables in the environment. As an example for rutorrent i see : Path – /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin, PS1 – $(whoami)@$(hostname):$(pwd)\$
    HOME – /root
    TERM – xterm

    Do i have to remove those or keep them untouched?

    • Dr_Frankenstein Dr_Frankenstein

      Hey, just leave them in place, when I did my screen shots the Synology interface hid a lot of the default variables. One of the updates exposed them. I have a quiet weekend ahead so finally spending some time at updating images in the guides.

      • Qew Qew

        Thanks!

  5. Donald Webster Donald Webster

    Because you’re passing in *two* volumes, hard links *can’t* work (even if they could) which means all torrens are copied and long term seeders will waste space. And *all* moves will be io intensive copy + delete even if they could have been atomic.

Leave a Reply

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