Skip to content

Setting up Sonarr in Docker on a Synology NAS

In this guide I will take you through the steps to download and setup Sonarr.

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.

The image will begin to download in the ‘image’ tab you can track its progress until the download completes.

PGID and PUID

In the previous versions of these guides I used a long winded approach to getting your ID information, I have since found a much easier approach.

You will need to SSH into your Diskstation using ‘Putty’ or an equivalent program.

Open up Putty, the only thing you need to enter is the IP address of your NAS and select the SSH radio button.

putty

Click on open, you will get a prompt asking if you trust the key, if this is the first time you have used SSH, just press OK or accept.

Enter the login information for you Synology user account, you will not be able to see the password as you type it, I use a very long one so I just paste it in from my password manager. (right click acts as paste in putty)

Once logged in type ‘id’ without the quotes and this will show your UID(aka PUID) which in my case is 1026 and the GID(aka PGID) which is 101 for an administrator

putty02

Setting Up Sonarr

Once the image 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

I am not making any changes to the resource limitations on my 1815+ as I have 6GB of RAM, just go straight into ‘Advanced Settings’.

‘Port Settings’

We need to assign the container some local ports for it to be reached on. this is essentially port forwarding as you don’t access containers via their usual port numbers.

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), so to keep things simple I am going to use the next two available port numbers after setting up Sabnzbd in the first guide.

Click the plus icon to add another port then enter:

Local Port = 32800
Container Port = 8989 (Sonarr’s Non SSL Port)

Local Port = 32801
Container Port = 9898 (Sonarr’s SSL Port)

Leave the ‘Automatically assign ports’ unchecked,

newsonarr04

 

‘Volume’

Click on volumes, we are now going to set up the shares we want to mount. Sonarr needs access to our Downloads, TV and Docker directories.

In your Diskstation Under the ‘Docker’ share create a folder called ‘Sonarr’ this is important as your configuration files will be stored here. We do the same thing for all the other guides.

And then also add your downloads and TV folder. It should look like the screenshot below.

newsonarr03

 

Environment Variables (PGID,  PUID and Timezone)

Next we are going to setup a couple of environment variables this is the user details we took note of earlier so the Docker image has the right access to the shares we just added. As well as this a new requirement is that we add the correct Timezone to the container you can do this as shown in the screen shot below, you can find a list of timezone here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Adding the enviroment 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

Published inDockerSynology

70 Comments

  1. Clem Clem

    This is the first clearly understandable guide to setting up Docker containers that I’ve found! Thanks for the information.

  2. Defeatedbythecat Defeatedbythecat

    No matter what I do, sonarr says it can’t find video files in the download folder. I’ve check and they’re there.

    • Dr_Frankenstein Dr_Frankenstein

      Have you tried moving an individual episode directly into the folder to test? Sometimes Sonarr doesn’t seem to check subfolders if they are not named as expected.

  3. ww_crimson ww_crimson

    This guide was really helpful. I didn’t see the environment variables mentioned anywhere else. I was also having the same problem as a commenter up above who said their Sonarr container couldn’t see the shares, even when the correct volume was mounted. I had to point to a specific folder as you suggested (as opposed to expecting Sonarr to see subfolders).

    I have one issue I can’t figure out, however. I have a Sonarr configuration backup that I’ve saved from when I was running Sonarr on a separate Synology. I can’t figure out how to restore the configuration settings from this backup (nzbdrone.db file).

    Any suggestions?

    • Dr_Frankenstein Dr_Frankenstein

      You are going to need to access the files within the Docker instance. I have not done this yet but I can’t imagine it would be to difficult. I will come back with a solution.

      • ww_crimson ww_crimson

        Appreciate you looking into it. This blog has been extremely helpful. When you were offline for a week or two I was worried it wouldn’t come back up. I haven’t been able to figure it out yet.. appreciate any help you can offer.

        • Dr_Frankenstein Dr_Frankenstein

          No problem not always quick to look into these things as working a lot but it’s the weekend so bound to have some time

    • Dr_Frankenstein Dr_Frankenstein

      OK time for a facepalm moment, if you followed my guide all the Sonarr config files including the database will be in your Docker/Sonarr folder directly on your NAS, I clearly forgot about this when replying 🙂

      • ww_crimson ww_crimson

        Ok.. so.. I started manually managing my settings, and I now see the nzbdrone.db file in /docker/sonarr .. I didn’t see it there before. I think that’s what threw me off. I’ll backup my current (manually created) configuration and try importing my old settings.. then report back.

        • Dr_Frankenstein Dr_Frankenstein

          OK cool, let me know how you get on

  4. ww_crimson ww_crimson

    Thanks bud! I owe ya one.

  5. Shkeebee Shkeebee

    Hi there,

    Thankyou for the guide, greatly appreciated! I am having an issue where nzbget does not seem to create all of the folders required. NZBGet created the following folders in the “downloads” folder:

    nzb
    que
    tmp

    The “complete” folder was not automatically created – do I need to manually create this directory ?

    Thankyou for your assistance.

    • Dr_Frankenstein Dr_Frankenstein

      Hi I am going to sat yes you have to as I can’t remember if I already had a completed folder due to moving over from SAB. Once you create it just make sure you check that NZBget is set to put files in it from the settings.

      • Shkeebee Shkeebee

        Thank you for the swift response. In the end once a NZB was added to NZBGet it automatically created the intermediate and completed directories.

        Interestingly enough, I had to configure the shares for sonarr to point to the top level directory of the downloads folder. If i set it to /downloads/TV/complete sonarr would whinge about not having permission to the shares and as a result the completed downloads were never moved across to their correct path.

        Thanks again for the guide, wouldn’t have gotten far without your assistance!

    • ny23 ny23

      can you post what the top level directory should look like?

      • Dr_Frankenstein Dr_Frankenstein

        Yes I am on holiday at the moment so will sort that when I get back

  6. Gabriel Gabriel

    These guides are so great! I’ve been having issues with Sonarr running directly on DSM from SynoCommunity and this Docker image seems to be much more stable.

    However, I can’t for the life of me get neither Sonar nor CouchPotato to connect to Transmission when they’re running in Docker. They both connect just fine when they’re running ‘normally’. I’ve put in the right IP and credentials, so there seems to be an issue with Docker.

    Any ideas?

    • Dr_Frankenstein Dr_Frankenstein

      I will get back to you as I am not at home to test at the moment using the extremely slow hotel WiFi

      • Gabriel Lundmark Gabriel Lundmark

        Seems to be a port forwarding issue. Sometimes it works and sometimes it doesn’t. I’m not sure what causes it, but I managed to fix it (for now at least) by replacing my internal IP (10.0.1.2) with my public host name (gabriellundmark.com). It shouldn’t matter I think because I can access Transmissions web Ui with that internal IP, but for some reason Sonarr and CouchPotato can’t. Weird.

        Also thinking of installing Transmission in Docker instead. It’s currently running in SynoCommunitys package. Would love a guide on that 🙂 great job

        • Dr_Frankenstein Dr_Frankenstein

          Let’s see what happens when I am back at the weekend.

  7. Darren Darren

    Dr. Franken. Thank you so much for this guide. It took a matter of minutes to get this reconfigured from a PC to my NAS. Of course, adding the 200+ series’ took quite some time to complete on the NAS. Amazon should pay you because I just ordered 16GB of RAM to toss in my DS1815+ so I can run more Docker apps.

    Fantastic work!

  8. Eric Eric

    Thanks Dr. Frankenstein, great work.

    I’ve got sonarr and sab running in Docker, with plex running as a package on my synology.
    There’s a feature in sonarr that will alert plex to new content. How do I get things inside Docker to communicate with regular programs like plex.

    Thanks

    • Gabriel Lundmark Gabriel Lundmark

      Eric, use the external IP or address and port number. So instead of typing localhost:32400, 127.0.0.1:32400 or 192.168.1.3:32400 for Plex, set up port forwarding in your router and use http://www.example.com:32400

  9. Nicolas Nicolas

    Hi,

    Thanks for the guide. I have setup NZBGet and Sonarr to run in Docker on my Synology DS1515+ according to your guides. However I have troubles getting Sonarr to connect to NZBGet. Under Sonarr Settings/download clients/add NzbGet what should be the parameters? it seems that localhost doesn’t work and I’m not sure if port should be the default 6789 or 32801 which I’ve used to configure NZBGet in Docker. Any help would be appreciated!

    • shkeebee shkeebee

      Rather than localhost – try using the local ip address of your Synology box.

      • Gabriel Lundmark Gabriel Lundmark

        Also you need to provide the port set up in Docker, not the real port. Or you can use bridge network. This is what I’ve done and it means you don’t have to change any ports—whatever the app uses in Docker, it uses externally too.

  10. Nicolas Nicolas

    Thanks, but in fact I found the answer here: https://forums.sonarr.tv/t/unable-to-connect-to-nzbget-with-sonarr-in-docket-container-on-synology/10974
    As said we need to “Edit Sonarr container “links” and add nzbget as a linked container. Use the alias that you set for the linked container to resolve nzbget, this will allow Sonarr to talk to the nzbget container.”
    I think this should be added to the guides here. They were helpfull, but it seems to me that this behavior of Docker should be explained for noobs like me!
    Thanks for your answers anyway.

    • Gabriel Lundmark Gabriel Lundmark

      Nicolas, that isn’t necessary as long as port forwarding is set up properly in your router.

      • Gabriel Gabriel

        Or if you do as I described above and use bridged network.

        This is the absolute easiest way of doing it, because it doesn’t require port forwarding, it doesn’t require linking between containers and it doesn’t require remembering arbitrary port numbers that aren’t the same as what’s stated in the apps.

        I run all containers with bridged network and localhost works fine on SABnzbd, CouchPotato, Headphones and Sonarr. This is my preferred method.

      • Nicolas Nicolas

        Thanks for the feedback and I’ll look into bridged network but port forwarding is a bit complicated on my side as I have two routers working together due to some poor technical service from my ISP (If I could I would have gone with only one).
        I must say otherwise that setting up the links in Docker was also surprisingly easy!

    • Dr_Frankenstein Dr_Frankenstein

      Strange I just used the IP address of the NAS plus the Docker port

  11. Ali Raza Ali Raza

    Hi
    Thanks for the detailed guide. I could not get it to work. The docker works fine and it is running but when I use the local address and the port i get a “site cannot be reached”
    I have followed the instruction to the dot and the same. Please help.

    • Dr_Frankenstein Dr_Frankenstein

      Hi are you trying to connect to the non SSL port to start with as the SSL one needs to be enabled within Sonarr when you set it up. What port number are you using for the local port?

      Also has Sonarr created its setup files within the volume you mapped to config, just to be sure it has started up correctly.

      • Ali Raza Ali Raza

        I followed your guide and used the same ports as per the guide. The files were created in the folder for sonarr. I also tried with sabnzbd guide and the same. I think there is a problem other than the guide. When I setup the user it setup a regular user who then I added to the administrators group my GUID is 100 and not 101. Could that be a problem…other than that everything is the same.
        I setup a volume X and my folders /X/Downloads/ etc

        • Dr_Frankenstein Dr_Frankenstein

          It sounds like your permissions are OK as the files are being created in the folder you set mapped to /config, it may be worth just using the same port number (8989) in both the local and container port, the only reason there is to change them is if it conflicts with another service, or if you are port forwarding out to the internet they are on ports not associated with these applications.

  12. jaithn jaithn

    hey guys,
    thanks for the guide. everything worked just fine, but I cannot add new series. I get the error: “Folder is not writable by user _apt”. Strange is that _apt isn’t my user. My user is called sonarr has the PUID 104 and GUID 65538. Sonarr is the owner of my media folder.

    Did I mess something up?

    Thanks for your help,
    jaithn

    • Dr_Frankenstein Dr_Frankenstein

      I would just keep things simple and use the admin PUID and GUID that way you can be sure the rights will just work. And when I say admin I mean any admin level user.

      • trevor trevor

        Just a heads up. In the image when adding the environment variables you have PUID and GUID, when it should be PUID and PGID.

        • Dr_Frankenstein Dr_Frankenstein

          Thanks fixed

  13. Jim Jim

    Would you be willing to do a step by step for Radarr? I’m assuming its the same as Sonarr but I’m having issues for some reason. I did this exactly but seems to be an issue with the ports maybe? Your guides have been extremely helpful for me by the way. Thanks so much

    • Dr_Frankenstein Dr_Frankenstein

      Yes, I just started using it myself, the setup is almost identical to Sonarr, you just need to specify a different folder for /config on your DS and your movie(s) folder can just be mounted to whatever folder internally you want.

      I am a bit behind with guides I will see what I can do 🙂

      • Jim Jim

        I think I have everything right. But can’t get it to open. What are the port settings you are using? It just won’t open for me. I tried not as 7878 then tried a different local one.

          • Jim Jim

            You are the best. Started over and tried again with your screenshot and it’s up and running. Not sure what I did wrong the first time. You’re the best and I owe you a beer and a shot. Thanks again man. Good chance I’ll bother you again haha. By the way love the kids movies folder. I Have the same. Haha. Have 3 kids under 4 and they all are plex masters.

          • Dr_Frankenstein Dr_Frankenstein

            No problem, it’s most likely I will do a full guide at some point. And yes I set my son up his own plex account to keep his movies separate from the adult ones.

  14. James James

    I am getting at boot up:
    EPIC FAIL: System.IO.FileNotFoundException: Could not find file “/etc/localtime”

    I believe this is the same issue as Ali Raza. Any suggestions?

      • James James

        Fixed it. Added environment variable TZ = America/Indianapolis

      • Dr_Frankenstein Dr_Frankenstein

        I just didnt set that up you only need to do the ID variables, the localtime just means it will know what time it is. but as you noted you can use TZ =

        • Mitchell Mitchell

          I was having the same issue, and had to set TZ to get it to run. Not sure if there was an update to the docker image that created this issue recently.

          • Dr_Frankenstein Dr_Frankenstein

            I will get the guides updated for both Sonarr and Radarr as it looks like this has changed for both.

        • Dr_Frankenstein Dr_Frankenstein

          Thanks, both Sonarr and Radarr guides have been updated with the information

      • Dr_Frankenstein Dr_Frankenstein

        Both guides have been updated with this, it looks like its a new requirement

  15. Louis Louis

    Hey mate,
    Thanks for the guides. Have really helped me.
    I have Sonarr and SAB now set up. Sonarr is sending the download to SAB fine, however the TV Show is just sitting in my completed ‘Downloaded’ folder and not being renamed and moved by Sonarr.
    Is there something really obvious I am missing?
    Cheers

  16. Mike Mike

    In the NZBGet guide you Tick the ‘Enable Auto Restart’ this will ensure the container starts up automatically if you reboot. Shouldn’t we do the same for this Sonarr?

    • Dr_Frankenstein Dr_Frankenstein

      Yes, this will be the same for any container you want this to happen on..

  17. Mike Mike

    Shoot, I had another question…..
    I have a tv and a kids_tv folder to split up my child appropriate shows. I’ll probably have to google it, but any thoughts on how to implement this in the docker setup? With Sickbeard, I was able to send shows to different folders upon adding a series.

    • Dr_Frankenstein Dr_Frankenstein

      I have the exact same setup, with also a third folder for Anime… you simply add them as additional shares with a corresponding name… as per the screenshot attached (my setup)

      Personal Setup

      Forgot to say, once you add these additional folders in Sonarr it will let you choose which directory to use for new shows.

  18. scott scott

    folder not writeable by user abc

    I see this as a common problem online, yet i cant get a solid answer on how to fix it. I know practically nothing about docker, much less linux…please help?

    DS416play…SAB is up and running fine, sonarr appears to be up and running fine, I just cannot add shows/create a save path for shows because of this issue.

    • Dr_Frankenstein Dr_Frankenstein

      The only thing I can really suggest is checking you have the correct PUID and PGID setup as these will ensure the containers have the correct access to your shares.

    • Havoc79 Havoc79

      I think I found your Synology Forum post. Let’s troubleshoot there. If not, create a post and we can troubleshoot further.

  19. Eric Eric

    Hello,

    I’ve got Sonarr and SABnzbd set up and running well in Docker on a Synology. They are both on the same “bridge” network inside of Docker.

    Whenever I reboot the Synology SOMETIMES Sonarr will get 172.17.0.2 and SAB will get 172.17.0.3, and SOMETIMES it will be vice versa. When this happens I have to manually tell Sonarr which IP to find SAB on. (172.17.0.2 or 172.17.0.3)

    How should I approach this problem?

    Thanks for any suggestions.

  20. scott scott

    Does your synology have a static IP?

    • Eric Eric

      Yes it has a static external IP to the network.

      The problem is that the IPs on the docker bridge network keep flip flopping and I don’t know how to assign a static IP to a container.

  21. scott scott

    Did you check the box in BOTH containers that says to “use the same network as the docker host” on the Network tab during container setup? It’s in the advanced settings tab on the general page of the container setup

  22. Eric Eric

    No, I wanted to leave SAB and sonarr “contained” (lol, see what I did there?) within the docker bridge network.

    Is there a way to assign them static IPs within that?

    If not, can I change them to “use the same network as the docker host” without deleting them and going through setup again?
    I had configured SAB to “use the same network as the docker host” previously and had difficulty changing the default port. Any insights there?

    Thanks.

  23. scott scott

    This is a site by the same author and another co-writer I have gotten to know through a ton of emails back and forth as I was having a lot of issues setting up docker, as I was totally knew to it. These guides have been re-written to be more thorough and detailed, and I swear, if you follow them to a T, everything will work properly.

    https://nasguides.wordpress.com

    The guide calls for checking the aforementioned box, and I never has issues on restart, nor do I ever have to reboot my NAS aside from DSM updates…once or twice while trying to get NZBunity to work, I had to reboot the NAS to make new dyndns issues work properly, but other than that using these guides works like a champ.

    Also, I was in the same boat as you with using SAB…I fussed and cried about getting it to work properly, so the author persuaded me to switch over to nzbget (because it was the one he really knew how to use well and it was the one in the guide so it was easier to troubleshoot settings), and it is DEFINITELY faster and uses a LOT less system resources, not to mention it unpacks and assembles media quickly as well. Also, which NAS do you have? I am asking cause I have a DS416play, and it came with 1GB if I recall and I bumped it up to 8GB which helped SOOO much.

  24. Dustin Dustin

    Under the container> details > terminal, I mistakenly hit Create and now there are 4 “bash” titles. When I click delete they keep coming back. Any idea how to get rid of these?

Leave a Reply

Your email address will not be published. Required fields are marked *