Last updated on 28 February 2024
Please note this guide was written for DSM7/7.1 and will not be updated for 7.2
Update | Date |
---|---|
Fixed a regression with the port numbers both screenshots and wording. | 15/09/2023 |
What is Deluge?
Deluge is a lightweight torrent downloader, it has a number of built-in plugins to help organise your downloads and a full web interface.
Let’s Begin
In this guide I will take you through the steps to get Deluge up and running in Docker if you want to also run a VPN see my alternative guides on the left-hand menu.
In order for you to successfully use this guide please complete the three preceding guides
- Step 1: Directory Setup Guide
- Step 2: Setting up a restricted Docker user
- Step 3: Setting up a Docker Bridge Network
Downloading the Container
Open up Docker within DSM and navigate to the ‘Registry’ section and search for ‘deluge’ in the search box and download the ‘linuxserver/deluge’ image.
The pop-up box will ask which version you want to download, make sure you choose ‘Latest’ from the list of available versions.
You can check the status of the download over on the ‘Image’ tab.
Setting up the Container
In Docker click on the ‘Image’ tab, in the list of your containers select the ‘Linuxserver Deluge’ image and click on ‘Launch’
You will be greeted with the Network screen, we will be using the ‘synobridge’ network we created earlier select it from the list and click Next.
General Settings
Next you will be greeted with the General Settings screen, this is where you can start specifying some of your preferences.
You can change the name of the container to anything you like, and you may want to enable Auto Restart as this will ensure Deluge starts automatically if you reboot your NAS.
You will also notice a Configure capabilities button — don’t change anything in here!
Next up we are going to click on the ‘Advanced Settings’ button, this will take you to a new window with a number of tabs which we are going to work through.
Environment
Next we are going to set up some environment variables that docker will use to allow the container access to our files.
Fill in the following details as per the table/screenshot, you will need to do them one at a time.
Variable | Value |
---|---|
PUID | The UID you obtained in the user setup guide |
PGID | The GID you obtained in the user setup guide |
TZ | Your timezone wikipedia.org/wiki/List_of_tz_database_time_zones |
Links/Execution Commands
You do not need to set up anything on these tabs.
Press ‘Save’ to go back to the initial setup screen, then press ‘Next’
Port Settings
We are not going to amend the default ports Deluge requires which are the following:
Port | What it’s for… |
---|---|
58846 (TCP) | Remote connection from a PC Client |
58946 (TCP & UDP) | Ports to forward on your Router to ensure you are connectable |
8112 (TCP) | WebUI |
Copy the ports shown on the Right hand ‘Container Port’ section to the left hand ‘Local Port’ section.
Once amended press ‘Next’
You can now click Next
Volume Settings
We will now be specifying the directories where Deluge will store its configuration files and where to download files to.
Click on Add Folder, click on the docker share and create a new sub-folder called ‘deluge’ select this folder and click ‘select’
Now add ‘/config’ to the ‘Mount path’ box
Click Add Folder again and this time select the ‘/data/torrents’ share and click Select.
You will now enter ‘/data/torrents’ into the ‘Mount path’ box
Your path settings should now look like the table/screenshot below.
File/Folder | Mount path |
---|---|
docker/deluge | /config |
data/torrents | /data/torrents |
Click Next to move to the final screen.
Click Next to move to the final screen.
Summary
You have now completed the setup of the container.
You will be shown an overall summary of the settings we have specified, this is a good time to double-check everything is correct. Finally, click on Done and the container should start to boot.
Finally, click on Done and the container should start to boot.
Setting up Deluge
As we have used /data/torrents as the mount point for our downloads we need to make sure Deluge uses this same file path.
We are going to do this by just changing the directory settings within Deluge.
Open a new browser tab and go to your NAS IP address on port 8112 (e.g. 192.168.0.46:8112)
Deluge by default has the password of deluge
to access the web UI, you can change or remove this later in the settings.
Next you will connect to the Deluge back end, just select the host and click connect, it will remember this going forward.
Download Paths
Now you are in the UI click on Preferences at the top of the screen, we are going to change the various folders to the settings shown in the screenshot/table below
Option | From | To |
---|---|---|
Download to: | /root/Downloads | /data/torrents/incoming |
Move complete to: | /root/Downloads | /data/torrents/completed |
Port Number
You will also need to set the port number in the Incoming and Outgoing port sections in line with the ones we set up for the Container of 58946
Press apply and hit OK, your last task will be to port forward your router to you NAS the TCP and UDP ports of 58946
to ensure you get connected to other peers.
Plugins
There are a couple of plugins you will want to enable in the Plugins’ section in Preferences, when enabled you will need to refresh the page to see them. (If you are looking for something to unpack torrents that are zipped then follow the Unpackerr guide)
- Autoadd – This allows you to pull in any torrents in the watch directory (screenshot below)
- Label – This allows Radarr/Sonarr to assigned labels and pull downloads into subdirectories
- Auto Remove Plus – Download the ‘AutoRemovePlus-2.0.0-py3.8.egg’ version from the Deluge forums and place it in the Plugins’ folder in /docker/deluge/plugins. It allows you to fine tune when to remove torrents and their associated data once downloaded. (You may need to stop and and start the container for this to appear)
Historic Updates | Date |
---|---|
New guide for Deluge | 13/09/2021 |
Fixed port settings section and added notes around plug-ins | 30/12/2021 |
Added an extra plugin and note on how to enable them | 06/03/2022 |
Updated with DSM7.1 Screenshots and Steps | 09/07/2022 |
Added new port settings and Docker Bridge Network | 23/07/2022 |
Compose version number removed, small wording amendments and removed an old image. | 08/04/2023 |
Amended the path to save the compose file – this is for security, so the container has no access to the file contents. | 14/04/2023 |
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.
Does the Docker Container have all the “included” plugins?
https://dev.deluge-torrent.org/wiki/Plugins
I don’t see where to assign the watch folder.
Hey, yes all the ‘included’ plugins are available. You need to turn on the Autoadd plugin and the specify /data/torrents/watch as the folder.
You’re amazing! I did not expect a reply that quickly. Turned out I had to refresh refresh the page and now everything populated. I’m just now starting to learn Docker and your guides are fantastic!!
Have you considered a template that installs everything by default?
I am planning on having a single docker compose that sets up all the media automation in a single swoop for those who are using the compose method. Its I draft at the moment.
Hello, when I indicate the folder /data/torrents/watch, it tells me Path does not exist but I have this path in File Station, I do not understand what I have to do… Thank you for this excellent tutorial!
Hey, these are the settings I use.
http://fileshare.drfrankenstein.co.uk/images/deluge%20autoadd%20settings.jpg
Thanks for the guide! A couple questions if you don’t mind:
Have you experienced any inconsistency issues with files being imported from completed to media folders? It’s hit or miss for me – sometimes it imports, sometimes it doesn’t.
What do you use to automate deleting completed torrents from Deluge? On desktop I used the auto complete plugin but that doesn’t seem to work with the web client.
Hey, they mostly pull in for me, I do get the odd file that Radarr fails to recognise. I have set a share ratio within the queue settings that should remove the torrent once it hits it. I don’t have many torrents going more the usenet side.
Any word on a Docker Compose for this? Many thanks for a great blog!
Now updated on this and all the other guides.
Hey, I had to follow another guide myself when I setup mine. https://github.com/sebgl/htpc-download-box#setup-a-vpn-container this one works for me.
As you can see it’s a bit more involved compared to my usual guides.
Hi!
First id like to thanks for a excellent guide-blog. helped me a lot in setting up most of my docker containers.
But since you didnt have a guide for plex yet i followed the guide you linked here. But for some reason when i add paths to libraries in plex (movies and tv) and choose the “data” folder its empty. afaik it should be a media and torrents folder there). if i manually add the path as /data/media/movies nothing is added to the library. so it seems the plex container can only see the data folder but nothing inside that folder.
if i browse to the folder with SMB i can see the folders. so its not that they dont exists (and i have been putting movies and tv there)
the volumes ive added in the container is:
file/folder mount path
data /data
docker/plex/transcode /transcode
docker/plex/db /config
and ive added the correct PGID,PUID and TZ.
and im using host network.
the server is working fine except i cant add libraries since it isnt seeing whats below /data
would greatly appreciate your help! 🙂
i forgot to add that ive added the same volumes to radarr and sonarr (as i followed your guide on everthing except plex). and they see whats below /data
Hey, double check your IDs are correct. Did you use the LinuxServer version of Plex. Can you link the one you used.
Yes, im 100% sure the ID´s are correct (first thing i double checked, and triple checked).
Im using the official docker from Plex:
https://registry.hub.docker.com/r/plexinc/pms-docker/
OK cool, you need to use these environment variables instead of the ones used for Radarr etc
PLEX_UID The user id of the plex user created inside the container.
PLEX_GID The group id of the plex group created inside the container
this should then immediately work
unfortunately no difference in using those.
stopped container, edited it. and then started it again.
Still cant see anything in the /data volume
I would delete it and use the Linux Server version as you can just use the same ID formatting etc
Did that now and still no luck.
i was thinking. if i instead add volumes as /data/media/movies to /movies and /data/media/tv to /tv instead of just /data as /data. would that mess something up with?
Nevermind, tried changing the volumes to /movies and /tv as i said. but those ended up empty instead. so seems that plex do not have permissions to anything below /data for some reason?
one thing that popped in my mind, does it matter who’s the owner of the folders/files?
as i created the folders below the data share on the NAS (and transfered the files from my old fileshare to the new one in /data/media) with a admin account. and looking in DSM on properties on all folders and files under /data the owner is the admin account. perhaps thats what blocking plex from getting permission to see the files/folders? but then again, everytime i manually add some files or folders to the share plex would have issues with that?
or am i thinking wrong?
Oh right yes, make sure your docker user has permission to those files
i changed the owner (in DSM file station) to the dockerlimited user, but that didnt change anything (restarted the container as well)
now i just tried deleting the container and deleting the config files in /docker/plex and do i compelete “reinstall”. but now when i try to run the plex claim commands i get a “invalid user: ‘plex:plex'” when running:
chown plex:plex “/config/Library/Application Support/Plex Media Server/Preferences.xml”
not sure if i got that the first time (perhaps i missed it). if so, i guess thats the problem? also tried dockerlimited:dockerlimited but got the same error message then.
so… i cleared everthing (again) and did everything from scratch (again), but this time i used the plex official docker (again), and for some reason this time it worked. the chown worked, and folders/files are visible in plex. though im 100% sure i did everything exactly the same.
but, whatever. atleast im happy now. 🙂
thanks for helping me!
Hello, thank you for those guides, they have been wonderfully helpful so far. Do you think you could do one for DelugeVPN instead of just Deluge ?
Thank you in advance,
Hello again 🙂
Any chances you have not seen this message ? Would really appreciate your knowledge on those aspects if you have any ideas on how to set this up !
Until the Dr. does a guide, I will be using this guide I stumbled across: https://www.reddit.com/r/synology/comments/ptdqnr/torrent_deluge_trough_vpn_using_docker_dsm7/ It works fine. I set it up tonight. If you follow the guide, make sure you put the PUID and GUID in for your docker user, or it will fail. Read the comments below that thread as well. I think the Dr. could make a much clearer guide though. 🙂
It’s like I knew you were going to post this
https://drfrankenstein.co.uk/2022/03/06/deluge-with-openvpn-in-docker-on-a-synology-nas/
I’m getting a 404 on that link.
Had to take it back down briefly, will be back soon,