[How-to] Deluge WebUI Setup

Guides written by the community, for the community, and only guides!

[How-to] Deluge WebUI Setup

Postby archon » Mon Sep 01, 2014 3:34 pm

I managed to get Deluge running on my NSA325v2, and since none of the guides I found online were up-to-date or relevant (including the one on Arch Wiki), I thought I'd share.

This is heavily based on this guide by LostSalad, but requires some additional operations. Note that this is a simple Deluge WebUI guide, so I won't be including things like Samba setup, HTTPS, dynamic DNS, etc. Also note that I'm not a Linux expert, so some operations may not be the "right" way to do things, but the end result works. I'll happily edit the guide if anyone has better solutions to contribute though.


Installing Deluge

Not as straightforward as we'd like, because the standard 'deluge' package doesn't install all of its dependencies, so you have to add them manually. You can check for additional dependencies by running:
Code: Select all
# pacman -Si deluge
Not included in there, but still required, are shared-mime-info and python2-service-identity.

Using a NAS device, I'm only interested in the web UI, so I ran:
Code: Select all
# pacman -S deluge python2-xdg libtorrent-rasterbar python2-twisted python2-pyopenssl python2-chardet python2-setuptools python2-mako shared-mime-info python2-service-identity
If you want the GTK UI, you'll need to add pygtk and librsvg rather than python2-mako (or in addition to, if you also want the web UI).


Setting up autostart

Set the daemon and web UI services to start at boot:
Code: Select all
# systemctl enable deluged.service deluge-web.service


Accessing and configuring the Web UI

Start the services:
Code: Select all
# systemctl start deluged.service deluge-web.service

Access the Web UI by navigating to http://ipaddress:8112 where ipaddress is the IP assigned to your device. The default password is deluge.

You should be greeted by a small window titled Connection Manager, with a default field of 127.0.0.1:58846 as the host. Wait for its status to switch to Connected, then click on the field and click Connect.

Go to Preferences -> Downloads and set your download location. I used the default of /srv/deluge/Downloads/ so as to avoid potential permission issues, then I Samba shared the directory. Go ahead and set the rest of your torrent preferences as well.


Setting default host

As it stands, every time you access the web UI after Deluge is restarted, the connection manager will ask you to connect to the host again. We want to set it so it auto-connects every time.

To do that, we need to figure out where Deluge stores its configuration files, and more specifically web.conf. In my case it was in:
Code: Select all
/srv/deluge/.config/deluge/

It could also be:
Code: Select all
/root/.config/deluge/
But we'll go on assuming it's the former, and you can adjust if necessary.

Before modifying anything, stop the Deluge services:
Code: Select all
# systemctl stop deluged.service deluge-web.service

Edit web.conf and find the line "default_daemon": "",. Add your host address between the quotation marks at the end:
Code: Select all
# nano /srv/deluge/.config/deluge/web.conf

...
"default_daemon": "127.0.0.1:58846",

Reboot. If everything is working well, you should be able to access the WebUI directly without logging into the device. In that case, you're done. Happy torrenting!


Potential issues

- If you've made sure you followed this guide properly, and you're still getting prompted by the Connection Manager after rebooting, stop the Deluge services and check the default_daemon line in web.conf again. If it's back to its default state, add the host address back in again, save, then run:
Code: Select all
chmod 444 /srv/deluge/.config/deluge/web.conf
Restart the Deluge services.

- You may run into a "permission denied" error when starting a torrent if Deluge doesn't have write access to the download location. Try adding the user 'deluge' to the group 'root' by running:
Code: Select all
# usermod -aG root deluge

Then make 'deluge' the owner of your download location:
Code: Select all
chown deluge:root -R /srv/deluge/Downloads
Reboot.

For more info, refer to LostSalad's guide.
archon
 
Posts: 11
Joined: Thu Aug 28, 2014 5:32 pm

Return to Community Guides

Who is online

Users browsing this forum: No registered users and 1 guest