How to Install Latest Deluge BitTorrent Client on Ubuntu 16.04/14.04

Deluge is a free, open-source and lightweight BitTorrent client, available for Linux, FreeBSD, Mac OS X and Windows. It has a rich collection of plugins that you can install to extend its functionality. The latest stable version, 1.3.13, was released on July 20, 2016. Deluge BitTorrent 1.3.13 features an extremely large set of bug fixes.

Install Latest Deluge on Ubuntu 16.04/14.04 Desktop from PPA

The Ubuntu software repository includes Deluge 1.3.12. To ensure that you get the most recent version, you need to install it from official Deluge PPA. Fire up a terminal window (CTRL+ALT+T), then run the following 2 lines of comands one at a time.

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

sudo apt update && sudo apt install deluge

install latest deluge on ubuntu 16.04 LTS

This PPA also works on other Linux distributions that are based on Ubuntu 16.04/14.04 such as Linux Mint and Elementary OS. If you already have deluge installed, then the above commands will update your deluge to the latest version. Don’t worry, your existing torrents will be fine.

Once installed, you can start it from Unity Dash or application menu.

deluge bittorrent client on ubuntu 16.04 lts

Deluge 1.3.13 user interface

deluge 1.3.13 linux mint elementary os

You may want to use a VPN to hide your IP address when downloading torrents.

Install Deluge BitTorrent on Ubuntu 16.04 Server

You can install Deluge BitTorrent daemon on a server and manage the program via a Web browser. Using a server to download torrrent is very fast. Today’s server typically has 100Mbit download and upload speed.

Use the following command to install Deluge Web UI and the Deluge daemon on Ubuntu 16.04 server

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

sudo apt-get update

sudo apt-get install deluge-webui deluged

Then create the deluge user and group so that deluge can run as a separate user. This will increase your server’s security.

sudo adduser --system --gecos "Deluge Service" --disabled-password --group --home /var/lib/deluge deluge

The --disabled-password flag disables login for the deluge user. You may want to add your user account to the deluge group with the following command so that the user account has access to the files downloaded by Deluge BitTorrent.

sudo gpasswd -a your-user-name deluge

Once that’s done, create a systemd service file for deluge with your favourite text editor such as nano.

sudo nano /etc/systemd/system/deluged.service

Copy and paste the following lines into the file.

[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target

[Service]
Type=simple
User=deluge
Group=deluge
UMask=007

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

In nano text editor, press CTRL+O to save the file, then CTRL+X to exit. Now start deluge deamon with the following command. Since we want Deluge to run as the deluge user, there’s no need to add sudo to the command, but you will be asked to enter your password.

systemctl start deluged

You may also want to enable auto start when Ubuntu 16.04 is booted up.

systemctl enable deluged

Check Deluge status:

systemctl status deluged

deluge webui ubuntu

You can see that deluged is running and enabled.

Accessing Deluge WebUI

To be able to access the deluge WebUI, we also need to create a systemd service file for deluge web.

sudo nano /etc/systemd/system/deluge-web.service

Copy and paste the following texts into the file.

[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

Save and close the file. Then start and enable deluge-web, check its status. Again, there’ no need to add sudo to the commands.

systemctl start deluge-web

systemctl enable deluge-web

systemctl status deluge-web

The deluge-web service will listen on TCP 8112 port. Now in your Web browser address bar, type

your-server-ip:8112

You will be asked to enter a password, which by default is deluge, to access the Web UI. It’s recommended to change the default password. (Your firewall might be preventing access to port 8112, so check your firewall setting if you can’t access the web UI.)

After you choose to change password, the connection manager window will pop up asking you to connect to Deluge daemon which is listening on 127.0.0.1:58846. Select the connection and click Connect button.

deluge webui connect to daemon

Then you will be able to change the WebUI password. Note that you need to click the Change button to apply this change.

change deluge webui default password

And now you can start using Deluge BitTorrent on your Ubuntu 16.04 server.

install deluge on ubuntu 16.04 server

To add new torrents, click the add button on the upper left corner.

deluge bittorrent web ui add torrent

You can add a torrent file from your local computer or add magnet link. By default, files are downloaded to /var/lib/deluge/Downloads/ directory.

Set Up Nginx Reverse Proxy for Deluge WebUI

A reverse proxy is a proxy for another server, in this case the Deluge WebUI. First install Nginx on Ubuntu 16.04.

sudo apt install nginx

Start Nginx

sudo systemctl start nginx

Then create a Nginx server block file for Deluge WebUI.

sudo nano /etc/nginx/conf.d/deluge-webui.conf

Copy and paste the following texts into the file. Replace the red-colored text with your own domain name. You should also set the A record for your domain name.

server {
  listen 80;
  server_name torrent.yourdomain.com;

  access_log /var/log/nginx/torrent.yourdomain.com.log;
  location / {
    proxy_pass http://127.0.0.1:8112;
  }
}

Save and close the file. Then test Nginx configuration.

sudo nginx -t

If the test is successful, reload Nginx

sudo systemctl reload nginx

Now you can access Deluge WebUI via your domain name (torrent.yourdomain.com).

Enable HTTPS

To secure the Web UI, you can install a free Let’s Encrypt certificate. First you need to install the Let’s Encrypt client (certbot).

sudo apt install software-properties-common

sudo add-apt-repository ppa:certbot/certbot

sudo apt update

sudo apt install certbot python3-certbot-nginx

Python3-certbot-nginx is the Certbot Nginx plugin. After they are installed, run the following command to automatically obtain and install Let’s Encrypt certificate.

sudo certbot --nginx --redirect --agree-tos --hsts --staple-ocsp --email your-email-address -d torrent.yourdomain.com

Once that’s done, refresh deluge Web UI. It will be automatically redirected to HTTPS connection.

Do you like Deluge? What other BitTorrent client do you recommend? Leave your comments below. As always, if you found this post useful,  subscribe to our free newsletter or follow us on Google+Twitter or like our Facebook page.

Rate this tutorial
[Total: 21 Average: 4.6]

11 Responses to “How to Install Latest Deluge BitTorrent Client on Ubuntu 16.04/14.04

  • frans daniel
    8 years ago

    Long too path error!
    “Long path tool” is very helpful for this problem. You can solve this problem like copy, delete, long path files by using this tool.
    I used to have similar problems too, but after using “long path tool” everything was solved.

  • Zachary Grimshaw
    3 weeks ago

    Following these instructions I can’t connect via the thin client (using client deluge software to connect to deluge server). Do you know how I would enable this?

    • Xiao Guo-An (Admin)
      1 day ago

      Maybe your firewall is preventing access to TCP port 8112.

  • Hélder
    3 weeks ago

    Hello,

    My user is not having access to files downloaded by Deluge …

    I used the command “sudo gpasswd -a myuser deluge” and even then I do not have access to /var/lib/deluge/Downloads folder.

    Thanks in advance.

    EDIT:
    It would be good to inform those forgetful like me, that after the above command, or better, after finalizing all the configurations, it is necessary to logout and back in again to make the changes take effect. lol

    • Xiao Guo-An (Admin)
      1 day ago

      Yes, you need to logout and log back in.

  • shivam agrawal
    3 weeks ago

    https://uploads.disquscdn.com/images/67722e0726049491cc9cf8fdf72fb9c4ff2c109ee54be46f9471ee1ecd7dc3dc.png

    what to do after this

  • systemctl start deluged
    Failed to start deluged.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files

    Huh???

  • During the accessing deluge webUI the 127.0.0.1:58846 is showing offline so i cann’t connect.

    • Xiao Guo-An (Admin)
      2 weeks ago

      Maybe you need to restart deluged service. systemctl restart deluged

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here