Sonarr in a Docker Container on a Synology DiskStation - synology-user-git/Synology-DiskStation-and-Docker GitHub Wiki

Guide to set up Sonarr Docker container on a Synology NAS

Introduction

This wiki will detail the installation and setup of a Sonarr Docker container on a compatible model Synology DiskStation.

Locating, downloading, setting up and launching the Docker container

  1. Install Docker through the DSM Package Center > Utilities > Docker
  2. Start Docker
  3. Go the Registry tab and search for "Sonarr" registry-search
  4. Select the Docker container, then press the "Download" button to download. Downloading the container image will depend on the internet connection speed (400MB to 1000MB in size).
  5. Click the "Image" tab, then select the image for the docker container and click the "Launch" button.
  6. Under "General Settings" type in the container name to be used and check the box for "Enable auto-restart". This will restart the container after a reboot on the DiskStation.
  7. Under "Volume" add the folders on the DiskStation host to be accessible to the Docker container.
    • choose the folder(s) on the DiskStation host, and type the "Mount path" that will be visible inside the Docker container.
    • for my set up, I chose three separate locations on the host: * a location to contain the config files for the Sonarr container * a location for all downloads, which will be shared with any other containers (sabnzbd, etc) * a location for all completed episodes to be moved to by Sonarr, this could reside within the "Download" folder if desired
  8. Under "Port Settings", configure the Local and Container ports
    • within the Sonarr container the default port is already assigned, 8989
    • I recommend assigning a Local Port at this stage rather than leaving it as "Auto"
  9. Under "Environment" we want to add a few variables:
    • variable = TZ, Value = local-time-zone
    • variable = PUID, Value = 1000
      • the Value above will be based on the user account that has read/write permissions for the mounted Volumes noted above.
      • to get this user ID value, SSH in to the DiskStation and type the command id, which will output both the group ID and the user ID
    • variable = PGID, Value = 100
  10. Launch image and wait for the container to complete the initial start up (~3 minutew), or go into the details of the Sonarr Docker container and check the "Log" tab to determine when the instance of Sonarr (NzbDrone API) is running.

Configuring Sonarr Settings

Using a browser, connect to the Sonarr container (http://DiskStation:8989) with the assigned Local Port and go into settings to assign an Indexer and Download Client.

  1. "Media Management" tab allows for the renaming of downloaded episodes and specifying the "Season Folder Format" which defaults to no leading "0" in the season folder names
  2. add indexers so that Sonarr can look for monitored series
  3. add at least one download client
    1. I prefer sabnzbd, click to add
      1. name the indexer
      2. use the DiskStation IP for host
      3. use the sabnzbd Local Port from the sabnzbd Docker container
      4. paste the sabnzbd API Key into the API Key field
      5. type in the Category defined in the sabnzbd Docker container
      6. click the Test button
      7. on success, chose "save and add" from the blue button drop menu
    2. enable completed download handling
    3. toggle failed download handing to "Yes" for both redownload and remove
  4. add a Series and let the sabnzbd and Sonarr docker containers start the show library

##Troubleshooting An issue I encountered was permissions within the Sonarr container. No matter the UID/GID used allowed for the import into a mounted volume in the Synology DiskStation. In test configurations, complete download handling worked as expected, but when using with my show library, imports failed. I discovered the directory containing TV shows was owned by another user. For this setup, changing the directory owner to the Docker container UID resolved the import error.