I wanted to take a look a setting up a seed box in 2022 and if it was of any value. The answer to this was yes. It was a great learning experience and something I will use a lot in the future. Using a combination of Docker containers, Gluetun, and qBittorrent I was able to build something special. Read along to find out how you can use Docker and VPN together to build a more secure seedbox.
This part of my overall project of creating a seedbox but is completely independent of the other articles.
In a previous posts I set up a btrfs Arch Linux server with a mirrored btrfs storage pool and a Docker Lab. However all you need to complete this is any modern version of Linux with Docker installed. You will also need a vpn service. Personally I use the premium version of ProtonVPN but for this post I will create a new account and use the free version.
To get a free protonVPN account head over to the site and register. The free account is quite limited but it is a good start.
Once created head on over to the account settings and grab the OpenVPN/IKEv2 username. You will need this later.
When using Open VPN you are not going to use your default protonVPN username and password. You will use the special one listed in the accounts page. This can be changed easily when required with no effect on your main account details.
My file system layout is in the table below but it is flexible and can be modified to suit.
|Where I keep my downloaded files
|Configuration files for download software
|Where I keep the docker compose files
Install docker on your Linux distro of choice.
pacman -S docker
snap install docker
After a fresh install of Docker, it then needs to be started.
Start and Enable Docker
Docker needs to be started after its installed, You can check the status with the command
systemctl status docker
In case its not running you can start it.
systemctl enable --now docker
systemctl status docker
All going well and you should have Docker Online, Enabled and Error free.
It is needed to install docker-compose to manage multiple containers, their networks and services. You can do it manually but why would you want to when docker-compose does it so well.
pip install docker-compose
If you haven’t even got pip installed, then use your native package manager to install the package “python-pip”
So now everything should be ready to run the docker containers and get our seedbox going.
qbittorrent + Gluetun
This is the qbittorrent docker image that offers a feature rich bittorrent client over http.
Gluetun describes itself as “Lightweight swiss-knife-like VPN client“. I couldn’t agree more. Its a fantastic docker image that connects to many of the top vpn services (including ProtonVPN). It prevents data bleed when the VPN service is unavailable by using a firewall. You can even use it as a HTTP proxy.
Creating the Containers
I use docker-compose yaml file to spin it all up. This ensures that the qbittorent client connects to the internet through the Gluetun vpn tunnel. You can find the docker compose file over on my github page. Copy the docker-compose.yml file into your docker folder for such things. For me its the folder “/data/docker/qtorrent”.
The key parts of this are the volumes, this is where you are going to store the files on the local machine. You might want to change this if you are not following my convention from above.
Also the VPN details are essential.
environment: # See https://github.com/qdm12/gluetun/wiki - VPN_SERVICE_PROVIDER=protonvpn - OPENVPN_USER=*********** - OPENVPN_PASSWORD=************ - SERVER_COUNTRIES=Netherlands - HTTPPROXY=on - HTTPPROXY_USER=root - HTTPPROXY_PASSWORD=root
Lets go through all of this options.
|In my case its protonvpn but there are many support see the gluetun web site
|Openvpn Username. If using prontonvpn then this the one we captured earlier.
|Openvpn password. If using prontonvpn then this the one we captured earlier.
|The country to route the vpn through.
|You can also use this service as http proxy to route your web browser through.
So hopefully you have it all set up and we can start it up.
Starting it up
Change direcorty into the folder with the file docker-compose.yml
Run the command to start is all up.
If the command runs successfully then you should see qBittorrent come up.
And now you can see that the VPN is connected. Its all looking good so far.
Testing it out
So lets head on over to our qBittorrent client and see if it works. It should be on http://<your server ip>:9080 So in my case, it would be.
http://192.168.10.194:9080 Username: admin Password: adminadmin
Lets add a torrent. For this I have gone over to archive.org and pulled a very old Linux ISO image. Redhat Linux 2.1. You can grab the torrent here. This is a perfectly ok torrent to download.
Add the torrent
And slowly but surely it works.
Check your torrent IP
Wouldn’t it be super useful to make sure your ip address was the vpn used by Docker when using the tool. Well you can. Head on over to IPMagnet and grab the magnet link. Then load it into qBittorrent and watch the site.
In the qBittorrent client you can see it working.
And on the ipmagnet site you should see the ip address. Which is not the same as your own internet ip.
If you followed all the steps you should have a fully running seed box where you can download torrents and then keep seeding them afterwards.
Seed, Seed, seed
Now you have your seed box, you can seed what ever project you like. From torrents on archive.org to your favourite Linux distro. Its always good to give something back to the community.
I would seriously recommend you don’t use any of the free VPN networks out there for any permanent solution around this docker project. You should pay for a high quality one like ProtonVPN. I have zero affiliates with them. I just like their service.
Any suggestions, then please drop a comment below.
I really enjoy making this content and if you would like to support the cost of keeping this site up and running, please make a purchase through one of my affiliate links.