Setting up Deluge Headless with FlexGet, Pushover, Remote Torrent Adder & LFTP
without further ado, here is a overview
Setup Deluge Headless (Torrent Client)
apt-get install software-properties-common -y && add-apt-repository ppa:deluge-team/ppa
apt-get update && apt-get install deluged deluge-web deluge-console nano wget python-pip -y
pip install flexget
wget https://raw.githubusercontent.com/nwgat/deluge-installer/master/systemd/deluged.service -O /etc/systemd/system/deluged.service
wget https://raw.githubusercontent.com/nwgat/deluge-installer/master/systemd/deluge-web.service -O /etc/systemd/system/deluge-web.service
ufw allow 8112
(webui)ufw allow 58846
(remote client)ufw allow 49164
(deluge public port)adduser --disabled-password --gecos "" deluge
su deluge
deluged
(creates configs)echo "deluge:yourpassword:10" >> $HOME/.config/deluge/auth
deluge-console "config -s allow_remote True"
deluge-console "config -s download_location /home/deluge/incomplete"
deluge-console "config -s move_completed_path /home/deluge/complete"
deluge-console "config -s move_completed true"
deluge-console "config -s listen_ports (49164, 49164)"
deluge-console "config -s random_outgoing_ports false"
deluge-console "config -s outgoing_ports (49164, 49164) "
deluge-console "config -s random_port false"
deluge-console "config -s max_active_downloading 100"
deluge-console "config -s max_active_limit 100"
deluge-console "config -s max_active_seeding 100"
pkill -9 deluged
exit
systemctl daemon-reload
systemctl enable deluged deluge-web
systemctl start deluged deluge-web
on windows/linux/osx client do
- Edit > Preferences > Interface > Classic Mode > Uncheck
enable
to disable - Edit > Connection Manager (Ctrl + M)
- Now add in the details deluge ip and user/password we added to auth file
- You can stop the local daemon and turn off "automatically start localhost if needed"
set webui password by login in browser
https://headlessIP:8112
Setup Flexget (automatic tv tracking and downloading)
-
mkdir -p .config/flexget/
-
wget https://gist.githubusercontent.com/nwgat/0db19eda3bac5637e4d79f7496242fa8/raw/b75c17db5bc16eded3378fe4a80f8fed347ffde3/config.yml -O .config/flexget/config.yml
-
nano .config/flexget/config.yml
and edit for you need -
flexget daemon start -d
Setup SSH Keys (more secure and is used for lftp downloading and logging in via ssh)
su deluge
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
nano .ssh/authorized_keys
- Now generate a key pair with Tools > User Key Wizard in xshell (windows)
- Insert the public key into nano on server
- Connect over ssh with user deluge and your new private key to check if it works
Setup LFTP (Automatic fetch on windows)
- Run Command Prompt with Run as administrator
choco install nano lftp
- Open Xshell, go to Tools > User Keys > Export > save it to C:\deluge.key
powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://gist.githubusercontent.com/nwgat/913ebee023cafc6ddc9f/raw/d93ef39494ad1c653f1e1fce361386c826dbadbe/mirrorfrom.sshkey.lftp', 'c:\tv.lftp') }"
nano C:\tv.lftp
- Change
D:\path\to\key
to `C:\deluge.key`` - Change
sftp://deluge:dummy@hostname:22
to your server (dummy is required even for ssh keys) - Change
/home/remote
to/home/deluge/autodl
- Change
/cygdrive/d/local
to where you want to download the files like/cygdrive/d/tv
- Now you can try running it with lftp -f /c/tv.lftp
- put ``bash.exe -c "lftp.exe -f C:\tv.lftp"` in a .bat file and make a shortcut to manually dl or put that into task scheduler etc for more automatic
Remote Torrent Adder (add to deluge within Chrome/opera)
- Install Remote Torrent Adder
- Open Remote Torrent Adder Options
- Add Server
- Server Name:
DelugeHeadless
- Server Type:
Deluge WebUI
- Host:
ip
(of DelugeHeadless) - SSL:
Unchecked
- Username:
Leave blank
- Password:
Password of webui
- Relative path:
Leave blank
sources: