Installing and Configuring Deluge

01)install deluged, deluge-web and deluge-gtk

apt-get install deluged deluge-web deluge-gtk

As per instructions on https://dev.deluge-torrent.org/wiki/UserGuide/Service/systemd

02) create specific user and group

sudo adduser --system  --gecos "Deluge Service" --disabled-password --group --home /var/lib/deluge deluge

03) Add your user to the deluge group

sudo adduser <username> deluge

04)Remove any old init.d files named deluge in /etc/init.d/

sudo /etc/init.d/deluge-daemon stop
sudo rm /etc/init.d/deluge-daemon
sudo update-rc.d deluge-daemon remove  

05) Remove old upstart scripts

sudo stop deluged
sudo stop deluge-web
sudo rm /etc/init/deluge-web.conf
sudo rm /etc/init/deluged.conf

06) Download the file deluge.txt, rename it to deluge-service and copy it to /etc/systemd/system/

07) enable deluged to start up on boot, start the service and verify it is running

sudo systemctl enable /etc/systemd/system/deluged.service
sudo systemctl start deluged
sudo systemctl status deluged

08) Download the file deluge-web.txt, rename it to deluge-service and copy it to /etc/systemd/system/

09) enable deluge-web to start up on boot, start the service and verify it is running

sudo systemctl enable /etc/systemd/system/deluge-web.service
sudo systemctl start deluge-web
sudo systemctl status deluge-web

As per instructions from https://dev.deluge-torrent.org/wiki/UserGuide/ThinClient

10) In deluge-gtk preferences -> interface, disable classic mode

11) In deluge-gtk preference -> deamon, enable allow remote connections

12) Edit /home/username/.config/deluge/core.conf and set 'allow_remote' to true

13) replace the localclient line in your /home/username/.config/deluge/auth with the localclient line in /var/lib/deluge/.config/deluge/auth