I’ve been wanting to start seeding Linux ISOs to help the Linux community. However, I didn’t want my ISP to complain that I was using too much bandwidth or monthly traffic, so I decided to setup a seedbox and do all my torrenting there. A seedbox is a server that is used specifically for torrents. Typically, it has:
- a large storage drive (either HDD or SSD)
- a fast internet connection (usually 100Mbps or greater)
- a high monthly traffic limit (usually 1TB or greater)
The torrents are downloaded to/from the seedbox, then you download the files to your PC via FTP/SFTP. This way, the seedbox is always on and torrenting, and you can retrieve the files from it whenever you need (as shown below)
----------- ----------- ---------------------------- | Your PC | <-- FTP/SFTP --> | Seedbox | <-- BitTorrent --> | Torrents on the internet | ----------- ----------- ----------------------------
Disclaimer – IANAL, but it’s illegal to torrent copyrighted content almost everywhere in the world. I’m setting this up to torrent Linux ISOs. If you torrent copyrighted content, your host will either forward the notices on to you, or terminate your account.
There are a few things to consider when looking for a seedbox.
Hosting at home vs online
If you have a decent internet connection at home, you may be tempted to host your seedbox there. While I can’t tell you that’s a bad idea, it might not be the best idea. You can usually rent/buy a server in “the cloud” from a hosting company.
|Hosting locally||Hosting in the cloud|
Managed seedbox vs self-managed server
Managed seedboxes come pre-configured from hosting companies so you only need to login and start torrenting. A self-managed server is something you need to setup yourself.
|Managed seedbox||Self-managed server|
VPS vs bare metal
Your last option is to choose between a virtual server, and a physical server.
In the end, I ended up choosing Scaleway to host my seedbox (a bare-metal VPS that I manage myself). I ended up going with them for their server specs, listed below.
- 4 dedicated ARM v7 cores
- 2GB RAM
- 50GB SSD (with the option to add volumes in 50GB increments)
- 1 public IPv4 address
- 200Mbit/s bandwidth
- Unmetered traffic
Scaleway is an interesting beast. They are the commercial arm of Online Labs, which itself is owned by the Iliad Group, a telecommunications provider in France. In an effort to compete with DigitalOcean (who I also use and love) and Amazon, Scaleway launched in late 2014 offering low-priced servers. However, in addition to offering virtual servers, they also offered ARM-based bare-metal servers that they designed themselves. They pack 18 servers onto a single blade, for a total of 912 servers per rack.
While most Linux distributions offer almost any package you need in the ARM architecture, there are still some obscure binaries that aren’t yet available for ARM. However, if you need a cheap, small server (with unlimited traffic) to run a small website (or seedbox), this is a great choice!
Instead of using the version of Deluge in the regular repositories, I’m going to be using the Deluge Personal Package Archive (PPA) on Launchpad.
sudo apt-get install -y software-properties-common python-software-properties sudo add-apt-repository -y ppa:deluge-team/ppa sudo apt-get update && sudo apt-get install -y deluge deluged deluge-web
Create user and firewall rule
You’ll need to create a user for Deluge.
sudo adduser --system --gecos "Deluge Service" --disabled-password --group --home /home/deluge deluge
Next, if you have a firewall up, you should allow the Deluge web interface (port 8112) through it.
sudo ufw allow 8112/tcp
Create systemd scripts
sudo touch /etc/systemd/system/deluged.service sudo touch /etc/systemd/system/deluge-web.service
Edit the file at /etc/systemd/system/deluged.service and paste in the contents 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
Now, edit the file at /etc/systemd/system/deluge-web.service and paste in the contents below. Note – I’m using the
--ssl flag here to set the web UI to use HTTPS instead of HTTP. The certificate and key live in /home/deluge/.config/deluge/ssl if you want to update them manually.
[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 --ssl Restart=on-failure [Install] WantedBy=multi-user.target
Then, enable and start the systemd services.
sudo systemctl enable deluged sudo systemctl start deluged sudo systemctl status deluged sudo systemctl enable deluge-web sudo systemctl start deluge-web sudo systemctl status deluge-web
Visit the web UI at https://<your_IP>:8112. Expect to receive a browser security error, since the certificate is self-signed. The default password is deluge.
You should opt to change that password immediately by going to Preferences –> Interface.
That’s it! Start torrenting!