Having a BitTorrent seedbox is convenient in many ways. Few days ago, I needed to download something (totally legal!) using BitTorrent, but I don’t want to open my laptop 24/7 for seeding. Since I already have a dokku server up and running, I can just set up a BitTorrent seedbox using rtorrent and ruTorrent

The method is to use dokku’s image tag deployment to set up a new app. But first I need to have a docker image for rTorrent and ruTorrent. Fortunately, there is one Kerwood/Rtorrent-LXC, so I am not going to repeat myselft.

First I need to create a new app

ssh dokku@tannguyen.org apps:create torrent

Then, I need to pull the Rtorrent-LXC image from docker hub into my local machine

docker pull kerwood/rtorrent-lxc

Then, retag it to follow dokku’s conventions

docker tag kerwood/rtorrent-lxc dokku/torrent:v1

However, this image is stored in my local machine, I need to push it to the dokku server before I can do any deployment

The default port mapping is http:80:5000 which means to map port 5000 of the container to port 80 in the nginx virtual host, but according to Rtorrent-LXC, it runs rutorrent on port 80. So I need to change the port mapping from 5000 to 80

Downloaded files are stored within the docker container, I need to mount the download directory to a directory in the host in order to access the downloaded files. Dokku comes with a plugin docker-options to make it easy to specify docker options