Installing Deluge on Debian Lenny [Updated]
The installation PPA of this post is outdated and you should use the following instead:
deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu lucid main deb-src http://ppa.launchpad.net/deluge-team/ppa/ubuntu lucid main
Using this PPA key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 249AD24C
Unfortunately, at the time of writing, Debian Lenny only has Deluge 1.2.3 in its repositories, which isn’t all that stable apparently.
Also unfortunately, Deluge’s wiki gives pretty bad, long-winded instructions on how to get it working. Luckily, it’s all rather simple. I did the following steps in order to get a nice deluge webui working on a Lenny VPS. Do the following steps as root (sudo su).
Simply fire up your favourite editor and edit:
Tack these two lines onto the end:
deb http://ppa.launchpad.net/ferramroberto/linuxfreedomlucid/ubuntu lucid main deb-src http://ppa.launchpad.net/ferramroberto/linuxfreedomlucid/ubuntu lucid main
Next, you must grab the GPG key!
apt-key adv --recv-keys --keyserver pgp.surfnet.nl 3ACC3965
Finally, update apt and install using
apt-get update && aptitude install deluged deluge-web
Aptitude will then proceed to offer you a couple of solutions (if you did this with
apt-get, the install would simply fail). Those solutions are either, (1) Install nothing, or (2) Pull the libraries that
python-libtorrent (a dependent of
deluged) needs from those PPAs we added to
sources.list. I think you can guess which one we want! Thusly, hit
n (for no) to the first solution and
y (yes) to the second.
If you get any errata about signatures not being able to be verified at the update stage, take a look here.
Next, create a user that will run Deluge. How about “deluge”? (I know, you weren’t expecting that!)
adduser --disabled-password --system --home /home/deluge --group deluge
Finally, follow this very useful part of the wiki. Remember to put it the user as “deluge”. At the end of it, you should have gotten the webui up and running! If you haven’t changed anything, it will be running on port 8112 with the default password of “deluge”.
I discovered that the webui has trouble running on Safari and Chrome (and Opera too, I think) because the session limit expires if the server’s time is wrong (checkable with
date). On my VPS it was impossible to change the time using
sudo date --set <time>, and the zoneinfo method resulted in the wrong times, and still didn’t work even when I fudged it. Luckily this doesn’t affect Firefox. Thus, to overcome this, log into the webui via Firefox and go to Preferences –> Interface and change the Session Timeout value to 99999 (the maximum possible).
Voilà! Safari and Chrome should find that their session timeouts haven’t timed out yet, as we set the value very high. If anyone finds a way to disable either the password or session limit entirely, please let me know!
You can also add HTTPS by simply finding the relevant tickbox in the Preferences and ticking it – there are default keys and certs that Deluge uses to encrypt itself. Pertaining to this, if you wish to use a signed SSL certificate instead, see this post.