rTorrent
rTorrent is a highly configurable torrent client based on libtorrent and ncurses.
Contents |
Installation
Install net-p2p/rtorrent:
| USE flag | Default | Recommended | Description |
|---|---|---|---|
| color | No | Add custom color support for torrent list | |
| daemon | No | Uses app-misc/screen to daemonize this application | |
| debug | No | No | Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml |
| ipv6 | No | Adds support for IP version 6 | |
| test | No | No | Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore |
| xmlrpc | No | Support for xml-rpc library |
root # emerge --ask rtorrentConfiguration
The RTorrent configuration is stored in the user's ~/.rtorrent.rc. A lot can be configured, for this reason, the configuration is divided in sections.
Basics
These options are pretty straightforward:
# Global upload and download rate in KiB. "0" for unlimited. #download_rate = 0 upload_rate = 75 # Default directory to save the downloaded torrents. directory = /home/user/media/ # Default session directory. When restarting rtorrent, the torrents from this directory will be restarted. session = /home/wim/media/session
Watching a Directory
You can configure rTorrent to watch one or more directories for new torrent files and queue them automatically. You can also set a download directory for each watch directory (rather than downloading to the default download directory).
# A watch directory downloading to the default location schedule = watch_directory_3,5,300,load_start=/home/user/media/watch/*.torrent # Watch directories with customized download directories schedule = watch_directory_1,5,60,"load_start=/home/user/media/watch_series/*.torrent,d.set_directory=/home/user/media/series" schedule = watch_directory_2,5,5,"load_start=/home/wim/media/watch_music/*.torrent,d.set_directory=/home/user/media/music" schedule = watch_directory_3,5,300,"load_start=/home/user/media/watch_movies/*.torrent,d.set_directory=/home/user/media/movies" # Restart torrents that have been copied back and stop those that have been deleted schedule = tied_directory,1,30,start_tied= schedule = untied_directory,1,30,close_untied= # Close torrents when diskspace is low. schedule = low_diskspace,5,60,close_low_diskspace=100M
# Execute command after 5 seconds and again every 5 minutes schedule = some_command,5,300,foo # Execute command immediately and at 03:00 schedule = some_command,0,03:00,foo default
Ratio Handling
You can control seed time by making it dependent on each torrent's ratio. Each torrent is seeded for a minimum of min.set percent. if a total of upload.set has been uploaded. If upload.set is not reached, it will seed a maximum of max.set percent. Read the wiki on the libtorrent site for different ratio groups.
# First, enable the default ratio group, which controls all loaded torrents. Set the limits for the group next. ratio.enable= ratio.min.set=200 ratio.max.set=300 ratio.upload.set=20M
Adding a self-signed certificate
Some trackers use SSL certificates, however most are not signed for various reasons. rTorrent uses the database located in /etc/ssl/certs/ca-certificates.crt. You also may want to use HTTPS because some ISPs (like Comcast) perform bandwidth shaping, effectively slowing down BitTorrent (regardless of whether your use is legitimate).
Add a certificate (if the domain was mytracker.net and the port was 443):
root # openssl s_client -connect mytracker.net:443 </dev/null 2>/dev/null | sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p' >> /etc/ssl/certs/ca-certificates.crtYou need to re-hash after adding a certificate:
root # c_rehashTry with curl:
user $ curl https://mytracker.net:443You should not get a warning regarding the self-signed certificate.
Restart rTorrent. If using the daemon:
root # /etc/init.d/rtorrentd restart