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
- Install Docker through the DSM Package Center > Utilities > Docker
- Start Docker
- Go the Registry tab and search for "Sonarr"
- 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).
- Click the "Image" tab, then select the image for the docker container and click the "Launch" button.
- 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.
- 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
- 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"
- 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
- 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.
- "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
- add indexers so that Sonarr can look for monitored series
- add at least one download client
- I prefer sabnzbd, click to add
- name the indexer
- use the DiskStation IP for host
- use the sabnzbd Local Port from the sabnzbd Docker container
- paste the sabnzbd API Key into the API Key field
- type in the Category defined in the sabnzbd Docker container
- click the Test button
- on success, chose "save and add" from the blue button drop menu
- enable completed download handling
- toggle failed download handing to "Yes" for both redownload and remove
- I prefer sabnzbd, click to add
- 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.