Sonarr docker Synology permission issues

Sonarr version (exact version): 2.0.0.5338
Mono version (if Sonarr is not running on Windows): 5.20.1.34
OS: Synology
Debug logs: https://pastebin.com/FC0YnE3i
Description of issue: Downloaded files not moved to destination folder

Hi,

I’m new to this so will ask stupid questions :slight_smile:

I’ve Deluge VPN docker running on my Synology for quite a while now, works perfectly. Yesterday decided to install Sonarr to check it out (together with Jackett). All went smooth, managed to download a show on the first go!

Problem started after file was downloaded, Sonarr can’t move it to shows folder. Googled and went trough >50 similar threads, but still not sure what is wrong in my case.

I’ve two shared folders on my NAS: Downloads and TV Shows.
Volume mapping in dockers:
Deluge: Downloads -> /data
Sonarr: Downloads/completed -> /downloads and TV Shows -> /tv

Deluge has /data/downloads set in Preferences to move completed torrents there. I’m using PGID and PUID 0 for now as for some reason Deluge doesn’t work if I set it to my user (100 and 1026).

Few notes:

  • Sonarr can’t see any of my shared folders when setting up series, e.g. Downloads, TV Shows etc. only mapped one like /downloads, /tv - is this how it should be?
  • tried using Remote path mapping, no success, tried various combinations, but nothing worked:
    Remote: /Downloads local: /downlods
    Remote: /Downloads/completed local: /downlods
    Remote: /data/downloads local: /downlods
  • last download I did disappeared from Activity straight after file was added to download client, before it stayed here with an error about path issues?

I understand that permissions are screwed on my NAS, just don’t know how to fix it.
Any help is greatly appreciated!

Managed to fix the problem, all I had to do is set /data -> /downloads/ in Remote Path mapping.

For people visiting this topic later on:
In my very humble opinion, it’s the easiest to ignore the examples given by the most common docker containers for sonarr and your downloader of choice.
The most common is to have /downloads and /tv mounts in docker. This sucks in terms of performance. Docker will attempt to move data from one to the other as if they were separate disks, which is slow as (fill in blank yourself) because it will trigger the file system to copy/remove rather than just move.
You’ll also have fun juggling the various names of the mounts across dockers and configurations of the applications. Do I fill /tv here or /downloads? Or was it /completed ? Etc.

It may require a little change in your folder structure as well, but here goes:

Folder structure:

data
   > downloads
      > nzbget
      > transmission
      > ...
   > media
      > tv
      > movies
      > ...

The most important one here is data. Make sure everything else is living underneath this folder. Everything. You can rearrange these folders as you see fit. Maybe you’re ok with the downloads, tv and movies folders all living on the same level, without the media folder. It doesn’t matter, but everything should go underneath the data folder.
From a synology point of view, data would be your shared folder which is visible on the network. You don’t have to call it data, whatever works for you and is short and to the point. Behind the screens this will typically be /volume1/data if you ssh into your syno. From the docker GUI on DSM you should be able to browse to it as well, to set up volumes for your docker containers.

For every container that needs to talk to each other, run them all with the same PGID/PUID (with read/write access to data), and give them all a single mount: /data -> /volume1/data

From the applications’ side, point them to the correct folders in the /data volume, and you’re done!
E.g. Transmission will report a file is downloaded in /data/downloads/transmission/completed/foldername/file.mkv and sonarr will inherently “know” this location without remote path mapping shenanigans because it’s looking at it’s own /data mount, which is the same.
Sonarr will then take a split second to move/rename the file from that location to /data/media/tv/showname/file.mkv because it’s a file move operation inside the same volume.

This has saved me so many headaches when I moved from native syno packages to docker, hope it helps someone.

1 Like

In my case they are both under the “media” share, one under media/TV and one under media/Torrents. Though in docker I’m not mounting the entire media directory, I’m mounting these 2 sub folders folders of media to 2 local folders on my docker host (docker/network/tv, docker/network/downloads/Torrents) . Do I have to mount the entire media folder to ubuntu to speed things up? Do I have to give the entire media folder as volume to the sonarr container? Both?

Btw, I’m having remote path mapping issues as well on the thread I posted a few days ago. Any help there would be greatly appreciated :slight_smile:

Thanks a lot Thirrian! Your post makes a lot of sense, will try to change my folder structure accordingly.

Reorganised my folders exactly as per above, but still need to have remote path /data -> /downloads set?

Current sonar volume settings:

data/media/tv -> /tv
data/downloads -> /downloads
docker/sonarr -> /config

Do I need to replace current volume with data -> /data as per Thirrian’s post? So how then Sonarr knows that tv shows are in data/media/tv?

yep, the container sees them as two completely different volumes. you want just one /data = /data

just remember you have to do this to your download client(s) as well or you’ll still need a remote path

you also need to reconfigure those paths in the clients as well, and change the root folders in sonarr (use the bulk change functionality to change the root folder for all of them)

ie, for your download clients the completed path would most likely have been /downloads/completed, you now need to set it to /data/downloads/clientname/completed

once all the paths start with /data its all one volume and sonarr will be able to move files, not just copy them

Thank you! Sorry for dumb questions, for some reason I find this mounting stuff really confusing :slight_smile:

So if I only leave /data = /data for Sonarr docker, how does it know that after Deluge completes downloading Sonarr needs to look at /data/downloads/delugeVPN/completed? Also, what about docker/sonarr/config, I should still have it?

I did change in Deluge download path from /data/downloads/completed to /data/downloads/delugeVPN/completed

you need to do it for deluge as well (which you may have already done)

because you configured deluge to put completed downloads in /data/downloads/delugeVPN/completed.

when sonarr asks deluge where the files are for the completed job it can see that path (without a remote path mapping) because the /data volume is mapped to the same host path for both containers

did you change sonarr to use /data/media/tv as the root folder for your series? just that it looked like you were originally using the downloads folder to store your actual tv shows in (although i could have read that wrong)

Thank you rhom, I think I’ve sorted it out! I didn’t realise that Sonarr ‘talked’ to Deluge, I thought I need to specify exact path so it knows where to grab files from.

Yes, I’ve changed sonarr to use /data/media/tv, all is working now without remote path mapping, cheers! :smiley:

Sorry to piggy back off this convo but few questions if you don’t mind me asking.

My setup:
Synology NAS
PMS (Regular Synology Package)
Transmission + VPN (docker container)
Sonarr (Synocommunity package) - Couldn’t get the docker image to work for whatever reason.
Jackett (SynoCommunity package)

So right now, I have a shared folder called “data”. This folder is visible to both Transmission & Sonarr. I also have a folder called Plex where all my media is housed. It currently has two sub folders (Movies & TV Shows)

**data**
     > downloads
            >Completed
            >Incompleted
            >transmission-home
            >watch
     > media
           > TV Shows
           > Movies
**Plex**
    >  TV Shows
    >  Movies

Should I be pointing my transmission to the Plex folder instead of the data folder? I’d rather no have to move around my whole plex directory.

So few questions:

  1. When I add a new series it asks for a path. Should this path be pointed to my Plex --> TV Shows? I currently have it set up to data --> Media --> TV Shows and I’m only looking for latest so it’s not trying to go and grab all missing files.

  2. If I go into Sonarr settings and Download client there is a remote path mappings. Where should this be pointed?

wheres the media actually located?

and you dont have to move things around, why not just add the data\media folders to the plex libraries? you can have multiple folders in a library.

you need to just pick one and stick with it. personally id just stick with the \data\media ones as that seems to be more logical

plex just displays the media, it doesnt care where it lives, so dont setup your root folder structure around plex, but do keep in mind that plex does like its sub-folder structures in certain ways

if data is a shared folder on the nas (say on volume1), and you mounted it in the transmission container as /data then youll probably need a remote mapping from /data to /volume1/data to make it work

if sonarr was in a container as well then you wouldnt need one if you used the same /data = /data volume mount you have in transmission

did you setup a connector so that sonarr tells plex when the data changes, that way you dont have to scan as often?

btw, a new thread would probably have been better

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.