Install Headless Deluge on Ubuntu 18.04

One thing I have come to live by with a mid-range laptop and a love for using it as my daily and HTPC is running almost everything headless. Headless simply means no GUI, Graphical User Interface, to directly interact with. Though all of the software we offer tutorials on here do have a WebUI, i.e. http://localhost:7878 for Sonarr. Taking this approach Sonarr, Radarr, Jackett, SABnzbd, Deluge, and JDownloader2 all run 24/7 with no noticeable performance loss. Lets get to installing Deluge headless.

 

Install Deluge:

1. First lets make sure you can handle additional repositories, then add Deluge repository.

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deluge-team/ppa
sudo apt update -y

2. Now lets go ahead and install Deluge as well as Webui.

sudo apt install deluged deluge-webui

3. Next we are going to create a deluge user and group. If you are running on your personal PC and not a server you could skip this step. Though if you are on a live server I do not recommend skipping this steps.

Deluge home directory will be /home/deluge/
Default Download directory will be /home/deluge/Downloads/ . I recommend changing this, you can do so later.

sudo adduser --system --group deluge

4. Lets create Service to Auto Start Deluge.

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

Copy and paste the below. User=deluge and Group=deluge need to be changed if you used a different username or your own. Use Ctrl +X then Y and Enter to save after you have pasted below.

[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

5. Now lets start Deluge service and enable it to start on Boot.

systemctl start deluged
systemctl enable deluged

 

Enable Deluge WebUI as a Service:

1. Now we need to create a systemd service file for WebUI.

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

Copy and paste the below. User=deluge and Group=deluge need to be changed if you used a different username or your own. Use Ctrl +X then Y and Enter to save after you have pasted below.

[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

2. Finally lets Start and Enable Deluge WebUI.

systemctl start deluge-web
systemctl enable deluge-web

Now open your browser and point it to http://your-server-ip:8112 it will prompt you for a password which by default is deluge.

You will have a pop-up asking to connect to Deluge daemon. Select the daemon then click connect and you are done.

(Visited 10 times, 1 visits today)

Leave A Comment

Your email address will not be published. Required fields are marked *