[HowTo] Compile & Install Deluge on OSMC

Depending on the version available in the repository, you can always compile it yourself, it takes just a few minutes:

sudo apt-get install python python-twisted python-twisted-web python-openssl \
python-simplejson python-setuptools intltool python-xdg python-chardet \
geoip-database python-libtorrent python-notify python-pygame python-glade2 \
librsvg2-common xdg-utils python-mako bzip2 -y

cd ~/
mkdir deluge
cd deluge
wget http://download.deluge-torrent.org/source/1.3/deluge-1.3.12.tar.bz2
tar xvf deluge-1.3.12.tar.bz2
cd deluge-1.3.12
python setup.py clean -a #may look like error message, is not, nothing to worry$
python setup.py build
sudo python setup.py install
sudo python setup.py install_data
cd ~/
sudo rm -rf deluge/

after it finishes, start deluge with

deluged

give it a few seconds, stop it:

sudo pkill deluged

the above is needed to generate the initial config file, which we will modify to grant access to the osmc user:

cp ~/.config/deluge/auth ~/.config/deluge/auth.old
nano ~/.config/deluge/auth

add the line:

osmc:osmc:10

at the end of the file and save with ctrl+x

to allow remote access, run also these commands:

deluged
deluge-console
config -s allow_remote True
config allow_remote
exit

with deluge already runing, to start the web interface in the background run:

deluge-web --fork

at any point you can kill all with

sudo pkill deluge

The instructions above were 99% inspired from the onepitwopi.com website, I only added bzip2 in the initial install, bumped the version to 1.3.11 and changed the user from pi to osmc.

Thanks to @cocomic for putting together this guide!

I’m starting deluged with cron and it’s always worked perfectly for me. Here’s the line from my crontab:

@reboot /usr/bin/python /usr/local/bin/deluged

Edit: Updated link above to v1.3.12

1 Like

If someone else is interesting on HowTo (based on repo) about that, please read : http://www.howtogeek.com/142044/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box/

I’ve now used both of these methods, and ideally I’d prefer to use the repo for the automatic updates, but that second guide just doesn’t work right for me.

Here’s an error message I get every time I connect to the deluge daemon:

osmc@osmc:~$ sudo systemctl status deluged
● deluged.service - Deluge Bittorrent Client Daemon
   Loaded: loaded (/etc/systemd/system/deluged.service; enabled)
   Active: active (running) since Wed 2016-12-14 23:22:19 EST; 2min 58s ago
 Main PID: 483 (deluged)
   CGroup: /system.slice/deluged.service
           └─483 /usr/bin/python /usr/bin/deluged -d

Dec 14 23:23:24 osmc deluged[483]: File "/usr/lib/python2.7/dist-packages/deluge/core/authmanager.py", line 87, in authorize
Dec 14 23:23:24 osmc deluged[483]: raise BadLoginError("Username does not exist")
Dec 14 23:23:24 osmc deluged[483]: BadLoginError: Username does not exist
Dec 14 23:23:43 osmc deluged[483]: [ERROR   ] 23:23:43 rpcserver:266 Username does not exist
Dec 14 23:23:43 osmc deluged[483]: Traceback (most recent call last):
Dec 14 23:23:43 osmc deluged[483]: File "/usr/lib/python2.7/dist-packages/deluge/core/rpcserver.py", line 260, in dispatch
Dec 14 23:23:43 osmc deluged[483]: ret = component.get("AuthManager").authorize(*args, **kwargs)
Dec 14 23:23:43 osmc deluged[483]: File "/usr/lib/python2.7/dist-packages/deluge/core/authmanager.py", line 87, in authorize
Dec 14 23:23:43 osmc deluged[483]: raise BadLoginError("Username does not exist")
Dec 14 23:23:43 osmc deluged[483]: BadLoginError: Username does not exist

There’s probably a way to fix this, but being that it’s not included in the guide, I’ll pass.

HI,

(even if an old post)

The deluge team maintains a repo to ease the installation and a full description of systemd service is available to startup at boot… If you have any interest I can give details about the way to do it on RPI with last OSMC update to ease the HowTo readability

About your error the correct auth file should not have been updated with the correct credentials if done through the deluge-console or the remote access has not been enabled for any remote UI

Why compile from source? Deluge is available pre-compiled in the repositories and that also provides for automatic updates.

There is a full and detailed guide for this already here: