Skip to content

ruTorrent in Docker on a Synology NAS

UpdateDate
Added Docker Compose details
Added new folder mappings to ensure atomic moves and Hard-linking
03/05/2021
Added fix for the missing downloads by editing the rtorrent.rc file24/05/2021

In this guide I will take you through the steps required to get ruTorrent up and running on your Synology NAS, I will be making some assumptions that you know your way around the DSM interface but if you any specific questions let me know in the comments.

Downloading the Container

In the majority of my guides I use the containers made by Linux|Server, these have very good documentation and are very well maintained so should any issues arise there is a group of people to ask, plus these work really well on Synology.

Open up Docker within DSM and navigate to the ‘Registry’ section and search for ruTorrent in the keyword box. Right click and download the Linux|Server version. When it asks which version number you want to use just choose latest this will ensure the container updates to new versions when they are released.

rutorrent1
Finding the container

Setting up a Docker User for RUTorrent and Obtaining the PGID and PUID

In previous versions of this guide we used your default admin account for each container, this is not very secure so please now follow the separate setup guide and then head back here.

Setting up the Container

Back in the ‘Image’ menu highlight the ruTorrent container and click on Launch. This will open up the setup wizard.

rutorrent4

Tick the ‘Enable Auto Restart’ this will ensure the container starts up automatically if you reboot.

rutorrent5

Volumes / Mounts

On the ‘Volume’ tab you need to add the paths to where you want to keep the config files and where you want all your downloads to take place.

I would recommend creating a ruTorrent folder within the main Docker directory to store the config files.

You will notice there is a consistent mount path for each of the folders across all my guides this is important as Docker will see all of your individual folders as one consistent filesystem rather than separate volumes. This will mean you should see much faster file moves (aka Atomic Moves) and also if you are using torrents it means you can enable hard-links

Port Settings

Next we move to the Port Settings tab, this is where you need to configure the ports required by ruTorrent and allow you to access the web interface. As the container wants to use port 443 and 80 which are already in use by DSM you will need to change the Local port to something else. In this case I used 8888 for the non SSL port and 8889 for the SSL port

Environment Variables

Last up is the Environment Variables, this is where we enter the details obtained earlier for our PGID and PUID values, all you need to do is enter the details as shown in the screenshot below, this will ensure you have full access to the shares we added earlier.

PGID and PUID Values

Now just click OK and you will be back at the first screen we saw, then click next to see a summary of your setup. You are now ready to roll and can start the container.

Final Steps

As we have changed the mount point for our downloads in the earlier section you will need to make sure you also change this to the correct place in RUTorrent and also in rtorrents settings file.

In the settings go to ‘Downloads’ and change the default directory to /media/downloads/incoming

Now stop the container and you need to open up the rtorrent.rc settings file which is located in /docker/rutorrent/rtorrent. I recommend doing this via your PC using something like Notepad++

Once you have opened the file you will see the following ‘Directories’ section. As you can see you need to edit lines 2, 3 and 5 adding /media to the front of the existing /downloads directory paths.

Directories
 schedule2 = watch_directory_1,5,5,"load.start=/media/downloads/watched/*.torrent"
 directory = /media/downloads/incoming
 session = /config/rtorrent/rtorrent_sess
 method.insert = d.get_finished_dir, simple, "cat=/media/downloads/completed/,$d.custom1="
 method.insert = d.data_path, simple, "if=(d.is_multi_file), (cat,(d.directory),/), (cat,(d.directory),/,(d.name))"
 method.insert = d.move_to_complete, simple, "d.directory.set=$argument.1=; execute=mkdir,-p,$argument.1=; execute=mv,-u,$argument.0=,$argument.1=; d.save_full_session="
 method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.get_finished_dir="

Once you have done this save the file and you can start the container back up. You are set!

Docker Compose

You can use the below code saved as rutorrent.yml to do the entire process above in one quick command via SSH. Ensuring you change the variables to your own media paths. (Note you will need to do the Final Steps section)

version: "3.2"
services:
  linuxserver-rutorrent:
    image: linuxserver/rutorrent:latest
    container_name: rutorrent
    environment:
      - PUID=YOURPUID
      - PGID=YOURPGID
      - TZ=Europe/London
    volumes:
      - /volume1/docker/rutorrent:/config
      - /volume1/downloads:/media/downloads
    ports:
      - 8888:80/tcp
      - 8889:443/tcp
    restart: unless-stopped
sudo docker-compose -f /volume1/docker/rutorrent.yml up -d --remove-orphans

Throw me some bits

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running the site, it could even buy me a beer 🙂

  • Bitcoin
  • Ethereum
  • Tether
  • Xrp
  • Polkadot
  • Binance coin
  • Litecoin
  • Bitcoin cash
  • Dogecoin
  • Tron
  • Monero
  • Omisego
Scan to Donate Bitcoin to bc1qfznx5kxad9k9z5t9y79mkm9ukfexan9a6wrzl0

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Tether to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Tether to this address

Scan the QR code or copy the address below into your wallet to send some Tether

Scan to Donate Xrp to rKGpNHetksTn4dgwgpiTkg8JM4uJ3J6pam

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Polkadot to 153iRH61nXQZUXMveZxCmYyzjf1cWYVnxpHpfifoNchQuXbY

Donate Polkadot to this address

Scan the QR code or copy the address below into your wallet to send some Polkadot

Scan to Donate Binance coin to bnb14ye5rju74u5ythneaum2rjvp8eqep6wq8flghx

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Litecoin to LfNfer3aSqLx4p8KfbbkT96ArXLXLDPxoD

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Bitcoin cash to qrc7scd2drzsd7kywpsjfklvkmm26fqc2vd7uyvdx9

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Dogecoin to DCwbNzfYHx22MDSyEVLWgfjxziYHtcgwAM

Donate Dogecoin to this address

Scan the QR code or copy the address below into your wallet to send some Dogecoin

Scan to Donate Tron to TL1Q3vY9mHnDMedHRyU8ERUAY8SzJ4FXiV

Donate Tron to this address

Scan the QR code or copy the address below into your wallet to send some Tron

Scan to Donate Monero to 45qwFr42XiA8egC5z2HdSQ2FzzP9VR1MvD5Sicg4EhGvdvTutx9GsF6DeU8DHAsTZy2ShBERjCB5rdy8iQ9CFnFu9Z6Adgw

Donate Monero to this address

Scan the QR code or copy the address below into your wallet to send some Monero

Scan to Donate Omisego to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Omisego to this address

Scan the QR code or copy the address below into your wallet to send some Omisego

Published inDockerSynology

69 Comments

  1. Stephen Stephen

    hi There,

    I used your excellent guide to setup rutorrent on my synology nas and all has run well for 3 years.
    Suddenly utorrent has stopped working – i have tried updating it but i always get this error below.

    There’s nothing in the container logs and i can see in processes rtorrent trying to start but it immediately stops again.

    [18.04.2021 08:15:30] WebUI started.
    [18.04.2021 08:15:30] No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.
    [18.04.2021 08:15:30] _cloudflare: Plugin will not work. Webserver user can’t access external program (python).
    [18.04.2021 08:15:30] _task: Plugin will not work. Webserver user can’t access external program (pgrep).
    [18.04.2021 08:15:30] create: Plugin will not work. It requires plugin(s) _task

    Any ideas?

    • Dr_Frankenstein Dr_Frankenstein

      Are you using the cloudflare plugin? I change clients so often not used rutottent for a while

      • Stephen Stephen

        I didn’t set it up I just used the image as is and it stopped working after an update. What client are you using now?

  2. NineInchPlaya NineInchPlaya

    Got this up and running but I’m having a problem only when it comes to downloading magnet links. It gets stuck on “Downloading” and the filename looks like something along the lines of “D44234234824802.meta” DHT and peer exchange are on, DHT port is 6881. Anyone run into this or have ideas for a fix?

  3. Burger Burger

    Got this installed, and have my Synology Router port forwarding all of the correct ports to my DSM. I’m using Cloudflare for security purposes, have a domain name pointing at my DDNS, and a sub domain pointing my DDNS with a reverse proxy that then points at the GUI. Using a port checker, all of the following say the port(s) I’ve specified in the container are open:

    – Straight IP address (ex. 1.2.3.4)
    – Synology DDNS (ex. yada.synology.me)
    – Domain name (mydomain.com)
    – Subdomain (torrent.mydomain.com)

    But I cannot for the life of me get it to see that the listening port is open (always says “#####: Port status is unknown”). And I believe because of this, every single torrent I add (from a variety of trackers) turns red because the attempts to communicate with the tracker timeout (Tracker Status: Tracker: [Timed out]).

    Things I’ve tried:

    – Changing ports (and making sure to update the port forwarding rules in my Synology Router)
    – Restarting the container
    – Restarting the DSM
    – Restarting the router
    – Turning off Cloudflare proxying, so the DNS rules are purely just that

    I’ve searched for issues with the port status and found this (https://github.com/Novik/ruTorrent/pull/2050), but that should be fixed because that was fixed in May.

    Any help would be really appreciated. Thanks

    • Dr_Frankenstein Dr_Frankenstein

      Hey missed your comment ping me an email I can probably help.

  4. Robert Robert

    Hi,
    Thx for the guide. I’m getting a error-message when trying to add a torrent-file (*.torrent) from the webinterface, same problems in both ie and chrome. Adding a torrent from URL works fine.

    “[06.06.2020 19:27:04] JS error: [http://192.168.0.121:49999/js/content.js : 72] Access is denied. ”

    Anyone have a clue what it could be?

  5. finnlugg finnlugg

    Got it working, here is how you do it:
    In container Terminal(create-new bash): htpasswd -c /config/.htpasswd yourusername
    You will be asked for password -create one
    Edit your Nginx: ##
    # Basic settings
    ##
    auth_basic “Administrator’s Area”;
    auth_basic_user_file /config/.htpasswd;
    (exactly like this if you have followed Frankenstein guide)
    Restart the container

    • Dr_Frankenstein Dr_Frankenstein

      Thanks much appreciated

Leave a Reply

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