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. SynologyNewbee SynologyNewbee

    Hi, I’ve followed your guide exactly and I was able to install ruTorrent and download a file. But I’m not able to find where the downloads are saved on the disk. I have a shared folder called Downloads and added the moun path ‘/media/downloads/. But after downloading a file, the Downloads shared folder is still empty. Where do I find the downloaded files?

    • Dr_Frankenstein Dr_Frankenstein

      Hey, did you do the final part of the guide ‘In the settings go to ‘Downloads’ and change the default directory to /media/downloads/incoming’

      It may be that your download is within the container and not to the directory mounted to

      • SynologyNewbee SynologyNewbee

        I did. Now that I look again, however, I see that the path has been reset to default. Whenever I restart the ruTorrent container, the settings reset… I gave the user that is associated to the PUID in ruTorrent read/write access to both the docker and the Downloads shared folder. I confirmed that the PUID and PGID are correct.

        • Dr_Frankenstein Dr_Frankenstein

          Have you ensured the docker user you are using has write permissions to both your /docker and /downloads shares. As this sounds like a permissions issue if the settings reset on a container restart.

          • SynologyNewbee SynologyNewbee

            That’s what I thought as well, but I’m sure that the ruTorrent user has all the permissions it needs: https://i.imgur.com/UweySuJ.png.

            Thank you for replying so quickly btw, really appreciate it!

          • Dr_Frankenstein Dr_Frankenstein

            Can you ping me a screenshot of your various settings. Or export the container settings file. drfranky@drfrankenstein.co.uk

        • Dr_Frankenstein Dr_Frankenstein

          Thanks for emailing, looks like we fixed it I have updated the guide with the additional steps required in order to ensure the file paths work.

Leave a Reply

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