Uninstall your old deluge first if having it installed.
Then:
Code: Select all
sudo apt install git
python3 -m venv --system-site-packages ~/.local/deluge
~/.local/deluge/bin/pip3 install git+git://deluge-torrent.org/deluge.git
sudo apt install python3-libtorrent
You can test if it runs now with '~/.local/deluge/bin/deluge' and/or deluged from same place.
All that's missing now is to make links to the deluge components into your user-bin-dir added to your path, e.g. '~/bin' or '~/.local/bin', and change path to deluge in service files which i'd presume is how most run deluge, but note maybe you'd prefer an alternative and easier approach which would let you skip this and next few steps, as outlined later on in the paragraph starting with "Or alternatively ...", but up to you. Anyway, continuing with previous mentioned links added to user-bin-dir(if not going for alternative):
Code: Select all
ln -s ~/.local/deluge/bin/deluged ~/bin/deluged
ln -s ~/.local/deluge/bin/deluge-web ~/bin/deluge-web
ln -s ~/.local/deluge/bin/deluge ~/bin/deluge
ln -s ~/.local/deluge/bin/deluge-console ~/bin/deluge-console
/etc/systemd/system/deluged.service:
Code: Select all
[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluged
After=network-online.target
[Service]
Type=simple
UMask=007
ExecStart=/home//<user>/.local/deluge/bin/deluged -d
Restart=on-failure
# Time to wait before forcefully stopped.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
Code: Select all
[Unit]
Description=Deluge Bittorrent Client Web Interface
Documentation=man:deluge-web
After=network-online.target deluged.service
Wants=deluged.service
[Service]
Type=simple
UMask=027
ExecStart=/home/<user>/.local/deluge/bin//deluge-web -d
Restart=on-failure
[Install]
WantedBy=multi-user.target
Code: Select all
[Service]
ExecStart=
ExecStart=/home/<user>/.local/deluge/bin/deluged -d
Code: Select all
[Service]
ExecStart=
ExecStart=/home/<user>/.local/deluge/bin/deluge-web -d
Or alternatively to changing the service files(or using override files/dirs) and making shortcuts in user-bin-dir, then could just add the shortcuts direct to /usr/bin(sudo ln -s ~/.local/deluge/bin/deluged /usr/bin/deluged' etc), negating these last few steps, up to you.
That should be it.
Oh, whenever wanting to update deluge and deps then run:
Code: Select all
~/.local/deluge/bin/pip3 install --upgrade git+git://deluge-torrent.org/deluge.git
Hope no typo's or glarring mistakes, as just quickly threw together, but tested firstly on an old ubuntu 20.10 VM I had laying around.
Edits:
* Documentation for making systemd service files: https://deluge.readthedocs.io/en/latest ... rvice.html
* If using AutoAdd plugin with magnets, then broken in latest dev56, so use my fixed build from here: viewtopic.php?f=9&p=233591#p233591
* For uninstall you just delete '~/.local/deluge' folder, the systemd service files and possibly override dirs/files if used(stop/disable services first), and the shortcuts, and uninstall git if not needing it for elsewhere.
* You can use other path than '~/.local/deluge', up to you and just a suggestion.
* There's been reported high memory usage and sometimes crashing because of it, fixed in libtorrent 1.2.10 and above, and i'm not certain when started sorry. On ubuntu then latest libtorrent from repos is 1.2.5, so possibly affected, but you can just add the 'libtorrent 1.2 daily builds' PPA from here: https://answers.launchpad.net/~libtorre ... /1.2-daily, and install python3-libtorrent which currently gives 1.2.12, so unaffected. If needing newer libtorrent than your distro provides, then can build static version of python3-libtorrent(so self-contained without runtime-deps on boost and openssl) using userdocs ubuntu/debain build-script found here: https://github.com/userdocs/python-libtorrent-binding - Note currently fails run as boost url in script has changed, so search bintray in it and change the two found urls to instead: "https://boostorg.jfrog.io/artifactory/m ... 6_0.tar.gz" - can easilly be changed to work on other distro e.g. I made it work in arch-linux by commenting out the "check-dependencies" function, since uses apt-get - note newer gcc's is little crazy and on a 4GB system I needed 10GB swap file(failed with 5GB!) added to build finished without OOM(on very minimal non-DE system) - I remember building libtorrent in a 2GB memory assigned win10 VM using msvc 2019.