Torrenting, at its core, is a technology that enables efficient file sharing.

It’s a method that allows users to download files from multiple sources simultaneously, speeding up the download process and reducing the load on any single server.

You might have heard about decentralization and peer-to-peer (P2P) networks are fundamental concepts in the world of open-source software and digital technology.

They offer a different approach to data storage, distribution, and communication, which can have significant benefits for open-source projects.

Torrenting in Docker with Transmission

  • Our goal today:

  • Before you can begin setting up Transmission with VPN, there are a few things you’ll need to have in place:

    • 🌐 A reliable internet connection
    • 🔒 An active VPN subscription
      • We will have Transmission working with ProtonVPN
      • You can do similarly for Mullvad
    • 🐳 Docker installed and running on your machine

The Transmissions Project

Transmission is a popular BitTorrent client that allows users to download files over peer-to-peer networks.

It’s open-source and has been around since the early days of file sharing.

A Fast, Easy and Free Bittorrent Client that you can customize with Add-Ons

Transmission has both a web interface and native apps for macOS, Android, and Linux.

It is known for being fast, easy to use, and secure, making it an ideal choice for torrent users who want to protect their identity while downloading content.

Why P2P?

Peer-to-Peer networks can be used to improve security, backup resilience and availability.

Why Torrenting with VPNs Matters

While sharing public data with other users can be beneficial, it’s crucial to be aware about potential threats:

As you can image - It depends on you

Stepping Out From Google Photos

Self-Hosting Transmission

We will be using a Transmission Docker Image created by the linuxserver people.

If you plan to use P2P continuosly, its recommended to use a VPN together with your Transmission Client.

You will also know how to do it by using Glutune container with ProtonVPN

Important step and quite recommended for any SelfHosting Project - Get Docker Installed

Transmission Docker Configuration

Transmission Docker without VPN

Torrenting with Docker has its advantage - any process running inside a container (like a transmission) has limited access to the host system and to other containers.

  • This can help to limit the potential damage if the torrent client is compromised - the Transmission container wont be able to modify other information than the volumes we specify.

Use this configuration as a Portainer Stack or docker-compose.yaml to deploy Transmission:

---
version: "2.1"
services:
  transmission:
    image: ghcr.io/linuxserver/transmission 
    container_name: transmission
    environment:
      - PUID=1000 
      - PGID=1000 
      - TZ=Europe/Madrid 
    ports:
      - 9091:9091 #UI Port for Transmission
      - 51413:51413 
      - 51413:51413/udp 
    volumes:
      - /home/Docker/Torrents/Transmission/config:/config
      - /home/Downloads:/downloads
      - /home/Downloads/Transmission_watch:/watch
    restart: unless-stopped

You can also get the same images at: lscr.io/linuxserver/transmission or linuxserver/transmission

Now, Transmission is ready at: localhost:9091

Self-Hosting Transmission with VPN (ProtonVPN)

Now, this is the best option for safer P2P:

The configuration for Transmission to use our Gluetun container as VPN looks like this:

version: "3"

services:
  transmission:
    image: ghcr.io/linuxserver/transmission
    container_name: transmission
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Madrid
    # ports:
    #   - 9091:9091 # UI Port
    #   - 51413:51413
    #   - 51413:51413/udp
    network_mode: "container:your_gluetun_container_name"
    volumes:
      - /home/Docker/Torrents/Transmission/config:/config
      - /home/Downloads:/downloads
      - /home/Downloads/Transmission_watch:/watch  
    restart: unless-stopped

  gluetun:
    image: qmcgaw/gluetun
    container_name: your_gluetun_container_name
    cap_add:
      - NET_ADMIN
    ports:
      - 9091:9091
      - 51413:51413/udp
      - 51413:51413
    environment:
      - VPN_SERVICE_PROVIDER=protonvpn
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=you_will_need_this_input_from_the_vpn_config_file
      - WIREGUARD_ADDRESSES=and_also_the_ipv4_version
      - SERVER_CITIES=New York NY # choose any available city
    volumes:
      - /Home/Docker/Gluetun:/gluetun
    restart: unless-stopped

FAQ

Other F/OSS Tools for File Sharing

F/OSS VPN Clients

You can use torrhunt (not F/OSS ❎) application to get the latest trending Torrents:

flatpak install flathub com.ktechpit.torrhunt

How to check your container IP

#docker exec -it qbittorrent sh
curl -sS https://ipinfo.io/json #the command to use
#wget -qO- https://ipinfo.io/json
curl -sS https://am.i.mullvad.net/json #https://whatismyipaddress.com/

If you are using Windows, your IP will differ:

#for windows you would use
powershell -Command "(Invoke-WebRequest -Uri https://ipinfo.io/json).Content"

How to check if someone is using torrent at home

Interesting F/OSS Stack to use for Torrenting