Difference between revisions of "Deluge"

From ArchWiki
Jump to: navigation, search
Line 1: Line 1:
{{i18n|Deluge}}
+
[[de:Deluge Installation]]
 +
[[es:Deluge]]
 +
[[ko:Deluge]]
 
[[Category:Internet Applications]]
 
[[Category:Internet Applications]]
  
[[de:Deluge Installation]]
+
 
  
 
This article will show you how to set up Deluge also for daemon-based torrenting.
 
This article will show you how to set up Deluge also for daemon-based torrenting.

Revision as of 14:43, 13 June 2012



This article will show you how to set up Deluge also for daemon-based torrenting.

Base Install

Deluge is available in the official repositories:

# pacman -S deluge

Graphical Clients

Web ui

The Web-ui runs on the server and the clients only need a Web-Browser. You need to install python2-mako on the server:

# pacman -S python2-mako

Gtk ui

The Gtk ui needs to have pygtk and librsvg installed on the clients:

# pacman -S pygtk librsvg

Configuration

If You want to run Deluge as user just run:

# deluge -u [gtk|web|console]

daemon

The default user for deluged, the Deluge daemon, is "deluge". You can change this in /etc/conf.d/deluged. Of course, the user needs to exist. In the case of the default "deluge" user, no manual user creation is necessary as the package script has done that for you.

The rest of this guide will assume you use the default "deluge" user. This user's default home dir and therefore its configuration location is in /srv/deluge. This should be fine under most circumstances. Note that this is NOT the default download location, it only holds its configuration and ssl certificates. You will be able to change all other options later on once you get a client working.

Next, start the daemon to generate its default configuration in its homedir:

# rc.d start deluged

And add it to Your /etc/rc.conf, so it gets convieniently autostarted:

DAEMONS=( ... network deluged ... )

Gtk ui

Stop the Deluge daemon:

# rc.d stop deluged

If You want to connect remotely via the Gtk ui, there should be something like this in /srv/deluge/.config/deluge/core.conf:

"allow_remote": true,

Now add yourself to the authentification file:

# echo "yourusername:yourpassword:10" >> /srv/deluge/.config/deluge/auth

10, the authentification level is not used at this time. Read more about that.

Start the Deluge daemon again.

Now start the Gtk ui. If You prefer, You can edit the preferences in ~/.config/deluge/gtkui.conf, but there's also a nice configuration tool in the ui.

Look for classic mode and disable it. Have You seen an icon just pop up? Hit it! If not go to Edit -> Connection Manager and add Your daemon.

Web ui

First, start the web ui daemon:

# rc.d start deluge-web

and login in on http://deluge-machine:8112. Where 'deluge-machine' is name of your deluge server or its private or public IP address. When asked for a password, enter "deluge" as it's the default password.

The preferences in the web ui should be rather self explanatory and the first obvious thing to do is to change your password.

As usual, you should add the daemons to your /etc/rc.conf:

DAEMONS=( ... network deluged deluge-web ... )

Just make sure your network connection is up at the time you start either of those Deluge daemons.

Note: In the current version of Deluge (1.3.1) the WebUI will not work in Google Chrome unless system time is configured properly. The WebUI will load, but upon entry of the password prompt, it will return as if nothing had been entered. This is Chrome thinking the session has expired. The quick and easy way of solving this issue is to install the ntp package and add ntpd to your DAEMONS in /etc/rc.conf.

As of this writing, it is possible to use ProxyPass and ProxyPassReverse with Apache to run your deluge webUI with a web server. to do so, install mod_proxy_html from the AUR. Then add the following lines to your httpd.conf.

In the modules section add.

LoadModule proxy_html_module modules/mod_proxy_html.so

At the end of the file, in the Supplemental Configuration section, add the following two lines.

# Custom proxy html configuration
Include conf/extra/httpd-proxy-html.conf

Also uncomment the Virtual Hosts line.

Include conf/extra/httpd-vhosts.conf

That is all the editing that needs to be done for the httpd.conf. Next, navigate to the extra/ folder and edit the httpd-vhosts.conf file. Append to the file, the following.

<VirtualHost *:80> 

Servername dmz

ProxyRequests off
ProxyHTMLExtended on
ProxyPass /deluge http://127.0.0.1:8112/
ProxyHTMLURLMap http://127.0.0.1:8112 /deluge

Header unset Server

<location /deluge> ProxyPassReverse /
ProxyPassReverseCookiePath / /deluge/
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyHTMLURLMap / /deluge/ ec
ProxyHTMLURLMap /deluge /deluge ec
ProxyHTMLURLMap ([^*])(\/[^*].*) $1/deluge$2 hRxL
#ProxyHTMLLogVerbose On
Order allow,deny
Allow from all
</Location>

</VirtualHost>

See http://blog.stoked-security.com/2011/03/deluge-bittorrent-webui-behind-reverse.html for the source and more information.

Automatically Connect To Daemon

If you want to avoid clicking "connect" everytime you start the deluge web-ui, edit the web.conf file in your configuration directory (usually /srv/deluge/.config/deluge). It should have a line like this towards the bottom:

"default_daemon": "" 

Change it to:

"default_daemon": "127.0.0.1:58846" 

This assumes that your deluge port is the default 58846.


SSL

In case you want SSL for the web ui, you need to generate a new cert/key set. To do this, first stop the web ui:

# rc.d stop deluge-web

then go to /srv/deluge/.config/deluge/ssl/ and issue:

# openssl req -new -x509 -nodes -out deluge.cert.pem -keyout deluge.key.pem

Next you need to edit /srv/deluge/.config/deluge/web.conf and change the pkey and cert configuration directives to use your new self-signed certificates and also enable SSL:

...
"pkey": "ssl/deluge.key.pem",
...
"cert": "ssl/deluge.cert.pem",
...
"https": true,

Afterwards just start the web ui again and you should be good to go:

# rc.d start deluge-web

Troubleshooting

WebUI doesn't store settings

For some yet unknown reason, the web interface with Deluge 1.3.3 refuses to properly store the incoming (listen) ports configuration. This can manually be edited in core.conf. The deluge bugtracker mentions this is fixed, it is not in 1.3.3.

/srv/deluge/.config/deluge/core.conf
...
 "enc_prefer_rc4": true, 
 "listen_ports": [
   49160, 
   49249
 ], 
 "dht": false, 
 ...

Resources

Deluge Homepage