(It turns out that rtorrent sucks. Not surprising, given how shitty the interface is. Follow the SABnzbd+Deluge guide instead)
SABnzbd+ is a web-based usenet binary downloader that eats NZB files.
Here are the paths we'll assume:
| Path | Purpose |
|---|---|
| /x/usenet/downloads/incomplete | Transfers in progress |
| /x/usenet/downloads/complete | Finished transfers |
| /x/usenet/dropbox | Place where NZBs get picked up from |
$ sudo apt-get install sabnzbdplus
Edit /etc/default/sabnzbdplus and set:
Then just go to http://yourserver:8001/sabnzbd to set it up. Don't forget to set:
rtorrent is a decent torrent client with a rubbish console interface. rtgui is a web front-end for rtorrent.
Here are the paths we'll assume:
| Path | Purpose |
|---|---|
| /home/<USERNAME>/.rtorrent.rc | rtorrent config file |
| /x/torrent/downloads/incomplete | Transfers in progress |
| /x/torrent/downloads/complete | Finished transfers |
| /x/torrent/dropbox | Place where torrents get picked up from |
| /x/torrent/rtorrent-session | Rtorrent session directory |
| /x/torrent/rtorrent.log | Rtorrent log file |
| /var/www/rtgui | RTgui installation (assuming /var/www is your web root) |
$ sudo apt-get install php5 php5-xmlrpc libapache2-mod-scgi rtorrent
Copy rtorrent.rc to ~/.rtorrent.rc and edit as needed.
Start rtorrent:
$ rtorrent
It should come up without error, and you can press Ctrl+Q to exit. Now we'll set it to start automatically. Add the following to /etc/rc.local (replace <USERNAME> with your username):
sudo -H -u <USERNAME> screen -dmS rtorrent rtorrent
This will start rtorrent in a 'screen' session, which you can reconnect to with "screen -R rtorrent", if you wish. However, since the rtorrent interface blows infinitely, we'll install rtgui to manage it over the web.
Since that just starts it on reboot, start it now with:
$ screen -dmS rtorrent rtorrent
rtgui uses Simple CGI (SCGI) to control rtorrent. We have to do a few things to enable it. As root, edit /etc/apache2/sites-enabled/000-default and add the following before </VirtualHost>:
LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so SCGIMount /RPC2 127.0.0.1:5000
If you want to use .htaccess files to apply a password to this, under "<Directory /var/www/>" change AllowOverride to All.
Restart Apache:
$ sudo service apache2 restart
Download rtgui from http://code.google.com/p/rtgui/downloads/list and extract:
$ sudo tar xzf ~/rtgui-x.x.x.tgz -C /var/www
Start with default config:
$ cd /var/www/rtgui/ $ sudo cp config.php.example config.php
Edit config.php. The only things you should need to change are $watchdir, $downloaddir, and $rtguiurl.
(You must have previously set AllowOverride to All in /etc/apache2/sites-enabled/000-default for this to work.)
If you want to require a password for rtgui:
$ cd /var/www/rtgui $ htpasswd -c .htpasswd <username> New password: <password> Re-type new password: <password>
Then populate .htaccess with:
AuthType Basic AuthName "rtgui" AuthUserFile /var/www/rtgui/.htpasswd require valid-user
If you want to have a single dropbox folder that works for both NZBs and torrents, we can make /x/dropbox do this. Download sort-dropbox.pl to your home directory or whereever. Then make it start as a service on boot by adding this to /etc/rc.local:
sudo -H -u <USERNAME> /path/to/sort-dropbox.pl -d &