Install Deluge Torrent Client

There are many different programs available that help to download torrent files. Deluge is a simple download program and my choice! When you open the program on the web page you see little options and the “Add Torrent”button is easily found. Deluge supports all torrent related features.

Deluge is available in different variants. We use the daemon and web interface for our headless server.

Add python package which is required for Deluge:
sudo apt-get install python-software-properties

Add the deluge user and group:
sudo adduser –disabled-password –system –home /var/lib/deluge –gecos “Deluge service” –group deluge

Update repository:
sudo add-apt-repository ppa:deluge-team/ppa

Install Deluge deamon and Web Interface:
sudo apt-get install deluged deluge-web

Update system:
sudo apt-get update && sudo apt-get upgrade

Automatically starting and managing programs (SystemdForUpstartUsers) is havily changed with Ubuntu 16.4. The following instructions apply only to Ubuntu 16.4 and higher.

Create a new file:
sudo nano /etc/systemd/system/deluged.service
and add the folling lines:

[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=000
ExecStart=/usr/bin/deluged -d
Restart=on-failure
# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target

Now start the service and verify that it runs:
systemctl start deluged
Type your password to allow this to happen, sometimes more than ones.
systemctl status deluged
Type your password to allow this to happen, sometimes more than ones. Type ‘q’ to quit.
systemctl enable deluged
Type your password to allow this to happen, sometimes more than ones.

Create a file to allow starting the web interface:
sudo nano /etc/systemd/system/deluge-web.service
Add the following lines:

[Unit]
Description=Deluge Bittorrent Client Web Interface
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=027
ExecStart=/usr/bin/deluge-web
Restart=on-failure
[Install]
WantedBy=multi-user.target

Now start the service and verify that it runs:
systemctl start deluge-web
Type your password to allow this to happen, sometimes more than ones.
systemctl status deluge-web
Type your password to allow this to happen, sometimes more than ones. Type ‘q’ to quit.
systemctl enable deluge-web
Type your password to allow this to happen, sometimes more than ones.

Through http://your.ser.ver.adres:8112 you find the web interface. Myself I have created three directories in which the files reside, being Upload (to easely pickpu torrents), finished (To move done files to) and download (where Deluge puts files in progress).

Last Updated on 31 oktober 2016