Configuring rtorrent/rtGui

1.Prepare folder structure for rtorrent
It is of course entirely up to you to decide the folder structure for you torrents, but then you have to make the accompanying adjustments to the configfiles below:
My rtorrent dropbox/.incoming/.session/torrents folder setup is created as follows:
sudo mkdir /exports cd /exports sudo mkdir Audiobooks Books Concerts Documentaries Documents Films Music Samples Series Software Sports Talk sudo mkdir /incoming cd ../incoming sudo mkdir audiobooks books concerts documentaries documents films music samples series software sports talk .incoming .session webupload
- exports = This folder will contain your completed torrents
- incoming = We will set up a script to make this rtorrents watchfolder thus enabling us to drop/save torrents to this dir and make rtorrent automaticly start processing them.
- .incoming = this is where the torrents reside when incomplete and under processing
- .session = stores info about active torrents etc
2. Setting up the config file for rtgui.
Let us start with the rtGui config file
sudo vim /var/www/rtgui/config.php
Edit the configfile to suit you needs, I edited the following in mine:
.
// Connect string for your local RPC/rTorrent connection:
$rpc_connect="http://localhost/RPC2";
// rtorrent 'watch' directory (used for upload torrent)
$watchdir="/incoming/webupload";
// Path to report disk usage
$downloaddir="/exports";
// Threshold for disk usage alert (%)
$alertthresh=15;
// Time between ajax calls - default 5000 (5 secs). Disable with 0
$defaultrefresh=5000;
// Display tracker URL for each torrent on main page - you might want to disable this if you run lots (ie 30+ ?)
// torrents - To get the tracker URL requires another RPC call for every torrent displayed.
// If it's disabled, it only requires one RPC call to list all the torrents.
$displaytrackerurl=TRUE;
// URL to your rtGui installation (used in RSS feed). Include trailing slash.
$rtguiurl="http://your.ip/rtgui/";
// Speeds for the download cap settings dialog.
$defspeeds=array(5,10,15,20,30,40,50,60,70,80,90,100,125,150,200,250,300,400,500,600,700,800,900,1000,1200,1400,1500,2000,5000,10000);
// Start download immediately after loading torrent
$load_start=FALSE;
// Enable debug tabs
$debugtab=FALSE;
// Tracker colour hilighting...
// Format is array(hexcolour, URL, URL, ...) The URL is a string to match identifiy tracker URL
// Add as many arrays as needed.
$tracker_hilite_default="#900"; // Default colour
$tracker_hilite[]=array("#990000","ibiblio.org","etree.org");
// Define your RSS feeds here - you can have as many as you like. Used in the feedreader
// Feed name, feed URL, Direct download links? (0/1)
$feeds[]=array("ibiblio.org","http://torrent.ibiblio.org/feed.php?blockid=3",0);
?>
3.Now for the more complex .rtorrent.rc config
I run rtorrent as roor in a screen environment som that meens .rtorrent.rc must reside under /root/
You can get the original configfile from the rtorrent project here
sudo vim /root/.rtorrent.rc
######################## CONNECTION SETTINGS #################################### # Maximum and minimum number of peers to connect to per torrent. min_peers = 40 max_peers = 100 # Same as above but for seeding completed torrents (-1 = same as downloading) min_peers_seed = 10 max_peers_seed = 50 # Maximum number of simultanious uploads per torrent. max_uploads = 10 # Global upload and download rate in KiB. "0" for unlimited. download_rate = 0 upload_rate = 0 port_random = no check_hash = no use_udp_trackers = yes encryption = allow_incoming,try_outgoing,enable_retry dht = auto peer_exchange = yes port_range = 10001-10002 dht_port = 10002 scgi_port = 127.0.0.1:5000 ########################### CONNECTION SETTINGS ################################## # Hash read-ahead controls how many MB to request the kernel to read # ahead. If the value is too low the disk may not be fully utilized, # while if too high the kernel might not be able to keep the read # pages in memory thus end up trashing. # hash_read_ahead = 10 # Interval between attempts to check the hash, in milliseconds. # hash_interval = 100 # Number of attempts to check the hash while using the mincore status, # before forcing. Overworked systems might need lower values to get a # decent hash checking rate. # hash_max_tries = 10 ###################### RATIO ############################## # Enable the default ratio group. ratio.enable= # Change the limits ratio.min.set=200 #ratio.max.set=300 #ratio.upload.set=20M ###################### RATIO ############################## #################### WATCH FOLDERS ####################### # Default directory to save the downloaded torrents. directory = /incoming/.incoming/ # Default session directory. session = /incoming/.session/ schedule = watch_directory_1,10,10,"load_start=/incoming/concerts/*.torrent, d.set_custom1=/exports/Concerts" schedule = watch_directory_2,10,10,"load_start=/incoming/films/*.torrent, d.set_custom1=/exports/Films" schedule = watch_directory_3,10,10,"load_start=/incoming/series/*.torrent, d.set_custom1=/exports/Series" schedule = watch_directory_4,10,10,"load_start=/incoming/sports/*.torrent, d.set_custom1=/exports/Sports" schedule = watch_directory_5,10,10,"load_start=/incoming/audiobooks/*.torrent, d.set_custom1=/exports/Audiobooks" schedule = watch_directory_6,10,10,"load_start=/incoming/books/*.torrent, d.set_custom1=/exports/Books" schedule = watch_directory_7,10,10,"load_start=/incoming/documentaries/*.torrent, d.set_custom1=/exports/Documentaries" schedule = watch_directory_8,10,10,"load_start=/incoming/music/*.torrent, d.set_custom1=/exports/Music" schedule = watch_directory_9,10,10,"load_start=/incoming/talk/*.torrent, d.set_custom1=/exports/Talk" schedule = watch_directory_10,10,10,"load_start=/incoming/samples/*.torrent, d.set_custom1=/exports/Samples" schedule = watch_directory_11,10,10,"load_start=/incoming/software/games/*.torrent, d.set_custom1=/exports/Software/Games" schedule = watch_directory_12,10,10,"load_start=/incoming/software/linux/*.torrent, d.set_custom1=/exports/Software/Linux" schedule = watch_directory_13,10,10,"load_start=/incoming/software/microsoft/*.torrent, d.set_custom1=/exports/Software/Microsoft" schedule = watch_directory_14,10,10,"load_start=/incoming/software/mobile/*.torrent, d.set_custom1=/exports/Software/Mobile" schedule = watch_directory_15,10,10,"load_start=/incoming/software/nonPlatform/*.torrent, d.set_custom1=/exports/Software/NonPlatform" schedule = watch_directory_16,10,10,"load_start=/incoming/software/osx/*.torrent, d.set_custom1=/exports/Software/Osx" schedule = watch_directory_17,10,10,"load_start=/incoming/webupload/*.torrent, d.set_custom1=/exports/Webupload" ########################################## ON COMPLETE ####################################################### # on_finished = move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1=" # Equivalent on_finished for rtorrent > 0.8.4 system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1=" ########################################## ON COMPLETE ####################################################### ################## WATCH FOLDERS ######################## on_start = link1,"create_link=tied,,.started" on_stop = link1,"delete_link=tied,,.started" on_finished = link1,"create_link=tied,,.finished" on_erase = link1,"delete_link=tied,,.finished" encoding_list = UTF-8
Now in terminal type
screen sudo su rtorrent
Hopefully no errors are present. I will add a rtorrent init.d script later
To exit screen and leave rtorrent running :
ctrl+a then press d
To go back to screen and rtorrent:
screen -r
To visit your rtGui, point your webbrowser to http://server.ip/rtgui (password protection using .htacces can be wise)
Now would be a good time to share /incoming and /exports to your network clients
Filed under: Linux, Software | Leave a Comment
Tags: Linux, rtorrent, ubuntu hardy server
No Responses Yet to “Configuring rtorrent/rtGui”