Skip to main content

Deluge

[[deluge]]

Fix if Web Ui doesn't connect Automatically to Daemon

Set 127.0.0.1:58846 as default daemon

chmod 444 ~/.config/deluge/web.conf
reboot

Deluged (the background daemon) ships as disabled so we need to enable it before proceeding:

sudo nano /etc/default/deluged

and change ENABLE_DELUGED=0 to ENABLE_DELUGED=1

OSMC uses systemd instead of the older init.d method of starting services, so lets use that to deal with starting things automatically at boot time, it will make managing things easier later on.

Firstly, delete the old way to prevent future confusion:

sudo update-rc.d deluged remove
sudo rm /etc/init.d/deluged

Then create a systemd unit as follows:

sudo nano /etc/systemd/system/deluged.service

and add the following text:


[Unit]

Description = Deluge Bittorent Daemon
After = network-online.target

[Service]

Type = simple
User = debian-deluged
Group = debian-deluged
UMask = 007
ExecStart = /usr/bin/deluged -d
Restart = on-failure

# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec = 300

[Install]
WantedBy = multi-user.target

Finally for this step systemd needs to be made aware of the new files and then reloaded to pick up the new unit.

sudo systemctl daemon-reload
sudo systemctl enable deluged.service

The daemon can now be started with sudo systemctl start deluged and will run automatically when the machine boots up, although we need to configure a few things before it will work correctly: