Deluge

Deluge is a fully-featured, high performance cross-platform ​BitTorrent client.

Initial Setup

Installing Deluge is easy. Simply issue the following command from SSH:

sudo box install deluge

This command will configure Deluge and the associated web interface "Deluge-Web" for use with your user.

After installation, if there will be two 2 new packages installed: libtorrent, and deluge-common. Due to potential packaging conflicts with your distribution's repository, the package deluge-common has been held by apt and will not be marked for upgrade. You may see apt issue a warning regarding the held deluge-common package. This is completely normal and it means the apt mark is working as expected. The package name for libtorrent does not interfere with any apt packages and should not issue any upgrade warnings.

Install Options

When installing Deluge, depending on your operating system, you'll have a couple choices available to you:

Deluge Version

  • Repo: performs an apt-get install deluged deluge-console deluge-web and pulls whatever is available from your operating system's repository. To check versions, you can use the Debian Package Tracker or the Ubuntu Package Tracker.
  • Deluge 1.3.15: pulls the current head of the 1.3-stable branch from Deluge and uses fpm to package it as a .deb for easy installation and removal with dpkg.
  • Deluge 2: pulls the current head of the master branch from Deluge and uses fpm to package it as a .deb for easy installation and removal with dpkg.
    • Deluge 2 is not supported on installations using Debian Jessie due to severely outdated Python3 dependencies.
note

If you intend to use the thin client with your installation, your local version of Deluge must be reasonably similar to your remote version of Deluge. For instance, you're unable to use the thin client for Deluge v2 if your local version is 1.3.15.

Libtorrent Version

  • Repo: performs an apt-get install of the libtorrent-rasterbar* and python*-libtorrent packages to supply both libtorrent and the python bindings required by Deluge.
    • Repo is not an option if you are using Deluge v2 on Ubuntu 16.04 because Libtorrent 1.1+ is required to install Deluge v2. Thus, you must compile a version of Libtorrent to meet this requirement.
  • RC_1_0: pulls the current head of the Libtorrent 1.0 branch, compiles it and packages it with fpm as a .deb file.
    • This branch is only an option if you're using Deluge 1.3.15 and if your version of libboost is 1.65 or earlier. (i.e. Buster is not supported)
  • RC_1_1: pulls the current head of the Libtorrent 1.1 branch, compiles it and packages it with fpm as a .deb file.
    • This branch is currently supported on all supported operating systems.
  • RC_1_2: pulls the current head of the Libtorrent 1.2 branch, compiles it and packages it with fpm as a .deb file.
    • The branch is only an option if you are using Deluge v2 as it is completely incompatible with Deluge 1.3.15.

Libtorrent Patching

If you would like to patch the settings pack of libtorrent (or any other aspect for that matter), the libtorrent compile will check if /root/libtorrent.patch exists. If it does, then the installer will automatically patch the libtorrent source with this patch before libtorrent is compiled. This may be of note since the ltconfig plugin does not exist for qBittorent, thus if you are interested in changing certain settings pack settings for qBittorrent settings which are not currently exposed through the WebUI, then this is the only way to change those settings without manually compiling libtorrent.

You must supply your own patch!

Upgrading and Recompiling

If you decide you'd like to change the version of Deluge/libtorrent you've installed, or you would like to rebuild your current versions against the most recent source, you can recompile and upgrade deluge at any time with the command:

sudo box upgrade deluge

This command will start the Deluge upgrade script. The installer will ask which version of Deluge you'd like to install and will then work on installing it.

How to Access

Thin Client (recommended)

The GTK thin client uses a secure connection to your slot to display the remote contents in the local client. Generally speaking, the thin client is capable of handling more torrents and simply offers better performance than the alternative Web UI. However, in order to use the Thin client, you must have a version of Deluge installed locally on the computer you wish to access your remote client from. Thus the argument of Thin vs Web is generally a choice between "Performance" and "Convenience". Further, the Thin client supports a broader range of plugins -- many plugins have no interface for the Web UI at all.

In order to use the Thin client, you must have a recent version of Deluge installed locally on your computer. Below are instructions for popular operating systems:

sudo systemctl start deluged@<username>

Configuration

Most of the settings in the preferences should be left alone; however, you're welcome to alter settings such as Download location. That said, you should leave the majority of Connection Settings and ltConfig settings alone, as the settings have already been optimized for use on your slot.

Default Download Location

Files downloaded by Deluge will be placed in ~/torrents/deluge by default. You can change this behavior by change the preference: Download to in the Deluge download preferences.

Web Download Location

Similarly, any files in the default download directory (~/torrents/deluge) will be available for browsing via the web server at the location: https://<yourhostname.ltd>/deluge.downloads

Plugins

There are a wide array of plugins available for Deluge. You can find a list of them in the Deluge wiki, here.

note

Not all plugins have a web-ui component. You will likely need to install and manage the options for most of the plugins on the prior page with the thin client.

Connect to other clients

The following variables can be used as a general guide to help you find information you'll need to know in order to connect other clients to Deluge.

Transdroid

Use these settings when connecting your transdroid client to your Deluge instance:

IP or Hostname: <yourhostname.ltd>
User name: <your username>
Password: <your password>
Deluge web password: <your password again>
Advanced Settings:
Port Number: 443
Folder: /deluge
Use SSL: On
Accept all SSL certificates: yes (optional with a valid ssl certificate)

Other Local Clients

Settings for connecting another local client (i.e. Sonarr), to your Deluge instance:

  • Host: 127.0.0.1
  • Daemon port: cat ~/.config/deluge/core.conf | grep daemon_port
  • Web port: cat ~/.config/deluge/web.conf | grep port
  • URL base: /deluge (only if accessing via https)

Connecting to a remote client (i.e. Sonarr)

By default, the web interface of Deluge is bound to 127.0.0.1. In other words, the interface isn't directly accessible from a remote connection. If you want to connect Deluge-web to a remote instance of an application (for instance, Sonarr running from home), you'll need to enable remote connections.

SSH into your slot and issue the following commands:

box stop deluge-web
sed -i 's/127.0.0.1/0.0.0.0/g' ~/.config/deluge/web.conf
box start deluge-web

You can now connect to your Deluge-web instance through http://hostname.ltd:<delugeport>