rTorrent on Windows (using Cygwin)

 

 

 

 
 
 
 
  
 

rTorrent on Windows (using Cygwin)

 

Introduction

rTorrent is a widely popular torrent client for Linux. Have you ever wished that you can run it directly on Windows? Well, using a program known as Cygwin, you can! Unfortunately, the program that usually accompanies rTorrent, known as ruTorrent, will not work due to XMLRPC not being supported on Cygwin. This isn't too much of an issue though, since you can navigate and use rtorrent using its own interface - it just doesn't look as cool. Similarly, we won't be supporting autodl-irssi, but since you are using Windows you could use TLTD instead.

Installation

You may be tempted to start straight away, but we advise to read the remainder of this guide, especially the Advanced Tips below before you start installing.

  • Obtain the latest installer from Cygwin
  • Install using the default settings or customize to your needs.
  • When prompted for “A Download Site” just pick one in your country. This is to install Cygwin itself, and not related torrents yet.
  • On the next step, we can add Packages to install. Use the screenshot below to see what you should do.

Select Packages

  • You should see that rtorrent is part of the packages on the Review and confirm changes screen.

Review and confirm changes

  • The setup will now install Cygwin, rtorrent and its dependent files.
  • Click Finish to end the installation. If you would prefer no shortcuts, uncheck the boxes first.

Configuration

You will now have an application called “Cygwin64 Terminal” which you can launch. Do so now. You should end up with a screen like this:

Cygwin bash shell

We'll set up your rtorrent preferences file straight away by copying the sample file to your home folder. To do so, run the following command inside the Cygwin terminal:

cp /usr/share/doc/rtorrent/rtorrent.rc ~/.rtorrent.rc

If you are simply returned to your prompt, then this means the command was successful.

Using your favorite text editor (we highly recommend Notepad++, since it understands Linux line feeds), edit the file and make your preferred settings. Assuming you used the default installation folder, you will find the .rtorrent.rc file in %systemdrive%\cygwin64\home\%username%

Finding the file in Windows Exploder

The following settings should be set. Remember to remove the # at the start of the line so that you uncomment them:

  • directory.default.set = ./torrents # This will put your downloaded torrents into its own folder, rather than just placing them all in your cygwin home folder
  • schedule2 = watch_directory,5,5,load.start=./watch/*.torrent # This will set your watch folder, and automatically load new torrents placed here
  • network.port_range.set = 61000-61010 # A range of 10 ports is recommended. Remember to forward these in from your firewall so that you are connectable
  • dht.mode.set = disable # Required setting for our tracker

If you are needing to do some extended debugging (for example, tracker debug logging), add the following lines to the end and comment/uncomment where needed (lines that start with a # are commented out and not processed):

log.open_file = "rtorrent", ./log/rtorrent.log
log.open_file = "tracker", ./log/tracker.log
log.open_file = "storage", ./log/storage.log
    
log.add_output = "info", "rtorrent"
#log.add_output = "critical", "rtorrent"
#log.add_output = "error", "rtorrent"
#log.add_output = "warn", "rtorrent"
#log.add_output = "notice", "rtorrent"
#log.add_output = "debug", "rtorrent"
    
#log.add_output = "dht_debug", "tracker"
log.add_output = "tracker_debug", "tracker"
  
#log.add_output = "storage_debug", "storage"

Usage

Before starting it for the first time, you have to create some folders. Run the following commands from your Cygwin terminal window.

mkdir ~/log
mkdir ~/session
mkdir ~/torrents
mkdir ~/watch

Once you have saved your configuration file, you can start rtorrent. Start it simply by typing rtorrent

You should see a screen like this, which shows that it is working.

A working rtorrent

To be sure that things are looking good, find and download a freeleech torrent, and save it to your watch folder.

A working rtorrent with download

Navigating the application is just a matter of learning some hotkeys. The most common ones are as follows:

Common rtorrent hotkeys

To view a complete list of rtorrent hotkeys, visit the user guide

To close Cygwin gracefully, shut down rtorrent first (Ctrl+q), so that it sends the final announce to the tracker, and then type “exit” to quit Cygwin.

Advanced Tips

 

Install to Alternate location

Cygwin runs as your locally logged on user. If you need to install it to a network share or an alternate drive, you are welcome to do so during the installation, but you MUST map a network drive first. You cannot use UNC.

Mapping a network drive

Installing to network mapped drive

It is important that your drive be mapped every time you wish to use Cygwin64, or you will simply be unable to start it.

Download to NAS

An alternative to mapping a network drive and installing Cygwin64 on your mapped drive, you can create a symbolic link from your local drive to your network drive instead, so that all your downloads go there. Assuming you used the guide above to download everything to your “torrents” folder under %systemdrive%\cygwin64\home\%username%, and you would like this folder to now be on a network share, we can use “mklink”, a windows command-line tool to create symbolic links. Follow these steps:

  • close rtorrent (control-Q)
  • open a command prompt (start → cmd.exe)
  • in the command prompt, type cd %systemdrive%\cygwin64\home\%username% to go to the folder where the “torrents” folder exists
  • Rename the torrents folder to something else, for example, rename torrents torrents.old
  • Create the symbolic link to your network path - for example, mklink /D torrents \\moon\data\Download
  • Move your downloaded torrents from torrents.old to torrents so that rtorrent can resume them when you restart it.
  • start rtorrent

NOTE: If you get access denied like in my screenshot below when renaming the folder, it's simply because you have a lock on a file or folder (like File explorer window open, or media file open). Close it and try again.

Creating symbolic link

rTorrent doing hash check

 
 
 rtorrent.txt · Last modified: 2022/06/24 22:15 by garetuup
 
 
 
 
 
  
 
Recent changes RSS feed Driven by DokuWiki
 
 
 
posted @ 2025-10-16 12:59  profesor  阅读(1)  评论(0)    收藏  举报