Skip to content

Step 1: Directory Setup Guide (DSM7.1 and below)

Please note if you are using DSM7.2 or higher you should use the Container Manager version of this guide from the menu.
This guide has reached the end of its updates as most people are now on the latest DSM update - This guide is correct as of 08/12/2023 however no further updates will be added.
UpdateDate
First version of the setup01/08/2021
Updated the general formatting
Gave the guide a once over with LanguageTool
14/03/2022
Added ‘books’15/07/2022

Please note – before starting make sure you have installed the Docker package from Package Center

When passing folders into a Docker container each mount point is treated as its own filesystem.

This means when moving files between two mount points Docker will do a Copy, then Delete operation. Meaning you are creating a full duplicate of a file while its being ‘moved’ creating unwanted disk IO and temporarily taking up double the space. (especially when seeding torrents after copying to the final folders)

In order to avoid this we need to set up a clean directory structure that allows us to just have one folder or share mounted to our containers.

If you are starting with these guides and have existing media you may need to move around your data in line with this setup, I recommend creating all the folders below using File station to avoid potential permission issues later.

Directory Structure

With this setup all of your media will sit within a single share, you can call this whatever you want but in all the guides it will be called ‘data’. If you change its name you will need to adjust any steps or compose files from my guides accordingly.

Open up the control panel then in ‘Shared Folder’ hit ‘Create’

On screen 1 fill out the name as ‘data’

Screen 2 we leave the folder unencrypted

Screen 3 – Enable data checksums as this will help catch any issues with files during data scrubbing.

Screen 4 – just click next past the summary

On the final screen we don’t need to change any user permissions yet, we will do that in the second guide.

The Sub-folders

Now we have our main ‘data’ directory we need to create a number of sub-folders to hold our media and downloaded files. You can amend this depending on whether you are using Torrents or Usenet (Newsgroups) or both.

You will initially create 3 folders within /data

  • media
  • torrents
  • usenet

Then under /data/media create

  • movies
  • music
  • tv
  • books

Then under /data/torrents create

  • completed
  • incoming
  • watch

Then under /data/usenet create

  • completed
  • intermediate
  • nzb
  • queue

Your folder tree should now look like this.

That’s all your folders’ setup, you can now move onto step 2 where we will set up a Docker user.

Step 2: Setting up a restricted Docker user


Looking for some help, join our Discord community

If you are struggling with any steps in the guides or looking to branch out into other containers join our Discord community!

Buy me a beverage!

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running things or just lets me stay hydrated. Plus 10% goes to the devs of the apps I do guides for every year.

33 Comments

  1. Kanada Kanada

    Thanks for the guide, it worked flawlessly but not before I spent 2 days fixing a silly oversight that was completely my fault. I am writing this comment in case anyone else has this issue to save them the same frustration. ** folders are case sensitive**.
    A single capital letter in the YAML file held me up and almost made me give up. It was on the data directory. Sab was OK with “Data” or “data” but Sonarr was not and I had used “data” in one and “Data” in the other with the actual file being “Data”. So it could not see the files SAB was passing back.
    I googled, went down all sorts of permission and remote map rabbit holes and none of the suggestions ever mentioned how important case sensitivity is.
    Anyways, follow the guide exactly with lowercase and you will have no issues, it is very well written.

    • Dr_Frankenstein Dr_Frankenstein

      Yes classic one, I might pop a note on the folder creation step if it’s not already there

  2. Ruben Ruben

    Hi,

    I just moved my Sabnzb from a standalone app (in a Synology VM) which used a mounted folder from another volume, to this docker solution.

    I currently get the following issue:

    The file is downloaded and seen by Sonarr / Radarr (still regular installs, under their own users), then moved, but there is no permission to delete the file, so it now exists in 2 places

    SNIPPED ERROR OUT

    I correctly set my PUID and PGID, and I made sure to chown and chmod the folder /volume3/Media/downloads (from the host, which is bound as volume to /data/downloads in Docker) and the files in there indeed have the right permission.

    Sonarr and Radarr run as sc-nzbdrone and sc-radarr. Can I fix this easily, or would it be best to move these to Docker too?

    • Dr_Frankenstein Dr_Frankenstein

      Hey just grabbed the comment out of the spam filter..

      OK couple of options…

      Editing my initial response as just seen your mappings….

    • Dr_Frankenstein Dr_Frankenstein

      New reply as my other one missed the key point..

      A general tip, keep you mount points clean don’t use one name outside the container and another inside it will cause you a world of unwanted problems and just makes things confusing..

      You have mounted /volume3/Media/downloads to /data/downloads thats confused things a bit plus on top you are mixing docker which cant see your volumes with the packages..
      Also keep in mind Linux considers /Media and /media as two different folders.. so always match up Captilisations…

      Option 1 – Obviously my prefered lol – Move everything to docker 🙂 – if you do this either move to the folder setup suggested in my initial setup guides or just make the overall adjustment that your /Media share is effectively /data

      Option 2 – Remote folder mappings.. first fix your mount path for sab to /volume1/Media/downloads:/Media/downloads

      As SAB is running in docker it will be telling Radarr and Sonarr that they can find your finished files in /Media/downloads…. notice the missing /volume3 this is due to docker only seeing the latter So in Radarr and Sonarr you would need to set a ‘Remote Path Mappings’ in the settings to tranlate /Media/downloads to /volume3/Media/downloads

      Any issues reach out via my Help Me page as will be easier via email.

  3. Jay Jay

    when you set up the subfolders does this mean you are also storing your media under ‘data’?
    I have all my videos etc stored under a top level folder ‘video’ and use jellyfin to manage all sub categories etc..
    if i follow this guide does this mean I need to move all my existing vidoes to /data/media etc?

    • Dr_Frankenstein Dr_Frankenstein

      Hey, there is nothing stopping you using individual shares for things. However, if you do then you lose the ability to hardlink seeding torrents and all files will be copied across the filesystem rather than having instant moves. If you deviate it is very important that you keep all your mounts consistent between containers so when they tell each other were to find files they can both see the same paths.

  4. Ian Ian

    Hey, thanks so much for your guides.
    Probably a basic question, but now that I have sonarr and qbittorrent setup and working, how do I transfer these files from the Data>Torrents>Completed folder to the appropriate Data>Media>Movies or TV folder? Does this have to be done manually?
    Cheers

    • Dr_Frankenstein Dr_Frankenstein

      Sonarr should do this for you – when the download completes it should see this and then initially create a hardlink from the completed to the tv folder. If its not doing this ping me an email or jump on Matrix / Discord as will be easier to go through

  5. Thanks for the guides.

    I have tried a few times to replace my existing sonnarr and nzbget with docker versions of sonarr and sabnzbd….but since all of my media (TV/Movies/Torrents) were set up in a shared folder before on my Synology drive, I am not sure how best to ‘move’ those into the docker space? Am I misunderstanding? Or maybe the Docker shared folder is outside the docker app space….sorry, very much a newbie here. Any help/insights appreciated!

    And then I have to re-setup Plex to point to the right library files. I will have to also consider moving my mainstream media torrents too I guess?

    Also, I get an error now with docker version of sonarr and it can’t find the downloaded versions of shows that were properly downloaded by docker sabnzbd….any help there? Error is: Import failed, path does not exist or is not accessible by Sonarr:

      • I appreciate the offer (and the guides, of course)!

        I went to your discord and found “Permission Fixes – Pinned Post”, added my media path to it as well (/volume1/video/tv) and ran both commands….seems to be addressed now!

        Thanks again!

        • Dr_Frankenstein Dr_Frankenstein

          Ahh OK that will be going on here in due course 🙂 only pinned it yesterday.

Leave a Reply

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

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

drfrankenstein.co.uk – writing Synology Docker Guides since 2016 – Join My Discord!