What is Deluge: Seedbox Server ?
Deluge is a popular multi-platform Bittorrent client. Therefore it is often used to provide torrenting / seedbox functionality on a Linux server. It is Supported by daemon-service, awesome interface, and great a plugin support.
This tutorial assumes that you have basic Linux knowledge on handling Linux shell. Above all you should have your own VPS server with root access. The installation is quite simple and assumes you are running in the root account. If not you may need to add ‘sudo’ to the beginning of commands to get root privileges.
To make the first connection to your VPS, refer my tutorial, “First Connection to your VPS“.
I will show you step-by-step to install, setup and using Deluge Bittorrent client as a seedbox server on Ubuntu 16.04 VPS. Same steps could be used for any other Debian/Ubuntu, but you may have to change the commands slightly, if necessary for RHEL/CentOS.
Install Deluge to your Server
First update system packages by issuing following commands.
sudo apt-get update sudo apt-get upgrade
Use following commands to install Deluge daemon and web interface.
sudo add-apt-repository ppa:deluge-team/ppa sudo apt install deluged deluge-webui
Note: If you face ‘add-apt-repository: command not found’? problem; use following command to fix it.
sudo apt install software-properties-common
Then create the Deluge user and group:
sudo adduser --system --group deluge
and add user root to the group deluge:
sudo gpasswd -a root deluge
Then you have to create a systemd service file for Deluge using your favorite text editor such as nano:
Add following lines:
[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
Save and close the editor.
Now start and enable daemon using following commands:
systemctl start deluged systemctl enable deluged
Next create a systemd service file for web interface:
And add 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
Save and close the editor.
Now start and enable Deluge-web using following commands:
systemctl start deluge-web systemctl enable deluge-web
Finally, you can access the WebUI by accessing http://YOUR-SERVER-IP:8112 by your favourite web browser. Note that the default password for the web interface is deluge. It’s better change it when you are first login.
Setup your Deluge Installation
First Connection to Deluge
In the first connection to Deluge web interface by providing default password “deluge“, it’ll ask you to change the default password.
On pressing “Yes”, you’ll be shown a new interface as follows.
Select the server and click on “Start Daemon”
When daemon started successfully, click on “Connect”.
And then you’ll be directed to Preferences > Interface. There you can change your deluge password.
Type a Strong password and press on “Change”. “OK” to the password successfully changed message. Finally “Apply” and “Ok” the changes done to preferences.
Changing the Default Download Location of Torrents
Click on Preferences:
Go to Downloads section and Add your desired download location to “Download to:” text box. For example, I am specifying /var/www/html/torrents as my download directory.
Finally “Apply” and “Ok” the changes done to preferences.
Note: The directory you are specifying as your download location should have full permission to access by deluge. You can either make Deluge as user/owner of that directory or chmod that directory to 777.
Installing Apache & Do Configuration to Access the Downloaded Torrents
Firstly, log into your server as root user.
Issue following command to install Apache web server to your VPS :
sudo apt-get install apache2
Create the directory “torrents” inside /var/www/html.
Then make www-data as the owner of torrents/ folder.
chown www-data:www-data /var/www/html/torrents
Then chmod torrents/ folder to 777, so that it could be accessed by Deluge.
chmod 777 /var/www/html/torrents
Finally add user www-data to the group deluge and restart apache server.
sudo gpasswd -a www-data deluge service apache2 restart
Use Deluge to Download Torrents
Go to web interface http://YOUR-SERVER-IP:8112
Click on “Add” button.
You can either add a torrent file or add a magnet URL. Hence in this example I am going to add a magnet URL.
Wait till the downloading reaches to 100%.
Finally you can access the downloaded torrent by visiting http://YOUR-SERVER-IP/torrents/
Let me know the problems you faced while following this tutorial in comment section. I am happy to help you 🙂
How can I add folder torrents to window explorer like Disk D or do you know how to back up data from torrents folder to google drive when torrent complete
To add folder torrents to windows explorer: You can download the torrent files (including folders) at /var/www/html/torrents
to your windows machine by using a SFTP client like WinSCP
To backup data to google drive: easy way is to install a graphical environment to VPS, then by using a browser like firefox in the graphical environment of VPS, you can log into your google drive from VPS and upload your torrent files to drive
To setup graphical environment: https://serverself.zirahosting.com/setup-lubuntu-tightvnc-and-novnc-for-a-vps/
instead of only
> specifying /var/www/html/torrents as my download directory.
I prefer to download to a temporary file, then thick / check
move completed to /var/www/html/torrents
so only if your torrent 100% downloaded, that will be available to download via apache
using SSL is preferable to kick some zombies out who can’t talk SSL …
the only drawback your browser will warn you for a snake oil certificate (self-signed) when accessing https :// yourIP : 8112/
changing default port is another good thing …
there are so many random zombie attacking port 80 or some known ports …
change it into another port will 99% of random attack …
I’m getting this error assessing the web client via the port 8112
This site can’t be reached1x9.xx.1×6.60 took too long to respond.
Search Google for 1×9.xx.1×6.60
What caused this and how can I fix it?
Check whether you have a firewall in your server blocking that port