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. Ben Ben

    FYI, when I used these settings on the latest sonarr version, the sonarr interface was unreachable. When I checked the logs, sonarr was listening on 7878. So for those having this issue, change the container port during setup to 7878 and the local port to something else (like 8989) to avoid clashing with any radarr installation setup on the same machine (which also listens on 7878).

    • Dr_Frankenstein Dr_Frankenstein

      Hey Ben, Sonarr should be listening to port 8989 by default that’s how the guide shows it as well.

    • Dr_Frankenstein Dr_Frankenstein

      Hey let me read up and come back, the advice isn’t bad it’s just likely not optimal depending on your setup.

    • Dr_Frankenstein Dr_Frankenstein

      OK the PATHS in the Servarr guides make sense, (I am learning as I go as well) I need to have a look at how best to explain in these guides, without causing too much confusion.

      Also it’s a little unfair saying the PATHS i am giving out are bad this should be directed towards the Linux|Server team as feedback, I am using their suggested paths.

      I would like to understand what you mean around the ‘poor docker advice’ element what I am advising incorrectly?

      Thanks I welcome all feedback!

      • bakerboy448 bakerboy448

        your paths and the paths LSIO has in their compose file (Which is recommended over docker run) (no the paths are not recommended by LSIO) cause double space for seeds and slow i/o intensive copy + deletes rather than hardlinks and atomic moves

        it also creates frequent and easy permissions issues
        https://trash-guides.info/Misc/how-to-set-up-hardlinks-and-atomic-moves/

        • Dr_Frankenstein Dr_Frankenstein

          Thanks, I think I get this completely… if all the containers have a common folder structure such as NZBGet and Transmission have the /downloads share on the NAS mounted to /media/downloads and then the respective tv shows/movies/music folders for Radarr etc mounted like so…

          volume1/downloads:/media/downloads
          volume1/movies:/media/movies
          volume1/tv:/media/tv

          As far as all the docker containers are concerned they are all using a common /media volume thus removing the actual file moves…. so simple if this is the case…

  2. Thanks for the guide, very useful. I am successfully running the Sonarr docker container and almost everything works except Sonarr (docker version) cannot communicate with SABNzbd (non-docker version). For Host I am using the LAN IP of my Synology NAS and the port that SAB is using, but I get the timed out error message. Any ideas? Thanks again.

  3. Tyler_ Tyler_

    Any chance you bring back the configuration guides?
    your posts are super helpful. thanks a lot!

  4. Trimpo Trimpo

    Hi,

    I have everything installed and I can see the container working,
    but I can’t reach sonarr on the designated port.

    Do you need to set up something else in synology to get this to work?

    Grtz

    • Trimpo Trimpo

      Ok, maybe using the local ports and not the container ports would help πŸ˜€

      So nevermind, fixed it myself!

      • Dr_Frankenstein Dr_Frankenstein

        Glad you fixed it

Leave a Reply

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