Blog
/
Safely torrenting for noobs

Safely torrenting for noobs

This article will discuss how to safely torrent files. It is intended for people who are new to torrenting and want to learn how to do it safely.

What is torrenting?

Torrenting is a way to share files over the internet. It works by breaking up the file into small pieces and distributing them across a network of computers. When you download a file using a torrent, you are actually downloading pieces of the file from multiple sources at the same time. This makes the download faster and more reliable than downloading the file from a single source. It also makes it harder for authorities to track who is hosting the file since the file is spread out across multiple servers/computers and taking down one server/computer won't stop the file from being shared. It is important to note that torrenting is not illegal, but downloading copyrighted material without permission is illegal. The Verge made a nice video explaining how torrenting works.

Important things to keep in mind

Here are some tips to keep in mind when torrenting:

  • Always download torrents from trusted sources. Downloading torrents from untrusted sources can lead to malware being installed on your computer.
  • Always use a VPN when torrenting. A VPN will encrypt your internet connection and hide your IP address, making it harder for people to track what you are downloading. Note anyone can see what IP addresses are downloading a torrent since it is a peer-to-peer network and your IP address is publicly visible, so if you do download copyrighted material without permission and don't use a VPN don't be surprised if you get a letter from your ISP. I personally use NordVPN and have been happy with it. IMO VPN subscriptions are very worth it since they are very cheap (cheaper than almost all streaming services) and provide a lot of value. You can even use a VPN to access content that is not available in your country i.e. Netflix shows that are only available in a certain country.
  • Torrent Client

    The first thing you need to do to start torrenting is to download a torrent client. A torrent client is a program that allows you to download and upload files using the BitTorrent protocol. There are many different torrent clients available, but I feel like most of them are bloated with ads and unnecessary features. This article will use the transmission client and how to use it through the command line. If you are scared of CLI and want a GUI transmission client, you can download it from here.

    Installation

    To install transmission on Ubuntu, you can run the following command:

    sudo apt-get install transmission-cli

    On macOS, you can install transmission using brew:

    brew install transmission-cli

    Usage

    For this example I will be downloading the latest Ubuntu ISO. To download the Ubuntu ISO, you first need to get a magnet link or a torrent file. You can get the torrent file from the Ubuntu website. Once you have the torrent file, you can start the download by running the following command:

    (venv) ➜  my-blog git:(main) ✗ transmission-daemon
    (venv) ➜  my-blog git:(main) ✗ transmission-remote -a "/Users/rahulvaidun/Downloads/ubuntu-24.04.1-desktop-amd64.iso.torrent"
    localhost:9091/transmission/rpc/ responded: success

    The first command will start the transmission daemon if it is not started and only needs to be run once. The second command will add the torrent file to the transmission daemon and start the download. Please note that you can also use magnet link after -a instead of the torrent file.

    You can check the status of the download by running the following command:

    (venv) ➜  my-blog git:(main) ✗ transmission-remote -l
        ID   Done       Have  ETA           Up    Down  Ratio  Status       Name
        15     2%   106.8 MB  15 min       0.0  6463.0   0.00  Downloading  ubuntu-24.04.1-desktop-amd64.iso
    Sum:            106.8 MB               0.0  6463.0

    Here you can see the status of the download, how much of the file has been downloaded, the estimated time remaining, the upload and download speed, and the name of the file being downloaded. Here are some useful commands that you can use with transmission:

  • transmission-remote -a <torrent-file or magnet link> - Add a torrent file or magnet link to the transmission daemon.
  • transmission-remote -l - List all the torrents being downloaded.
  • transmission-remote -t <torrent-id> -r - Remove the torrent with the given id.
  • transmission-remote -t all --remove - Remove all the torrents.
  • transmission-remote -t <torrent-id> -S - Stop the torrent with the given id.
  • transmission-remote -t all --stop - Stop all the torrents.
  • transmission-remote -t <torrent-id> -s - Start the torrent with the given id.
  • transmission-remote -t all --start - Start all the torrents.
  • transmission-remote -w ~/transmission_torrents - Change the download location to the Downloads folder.
  • watch --interval 1 'transmission-remote -l' - Watch the status of the torrents being downloaded every second.
  • Once the download is complete you can find the file in the Downloads folder. Please note usually once the download is complete, the torrent client will continue to seed the file. Seeding is when you continue to share the file with others who are downloading it. This is important because it helps to keep the file available for others to download. This effectively means other people who are trying to download the file may get a piece of the file from your computer. If you aren't using a VPN your ISP can even see that you are sharing the file from your IP. If you don't want to seed the file, you can remove the torrent from the client with the transmission-remote -t <torrent-id> -r command. Also I would probably alias the transmission-remote command to something shorter like tr to make it easier to type.

    Automatically connect to the VPN

    The safest way to automatically connect to the VPN is install transmission inside Docker, with the VPN connection also inside that same container. The image enforces a killswitch: if the VPN tunnel drops, the container literally loses all network egress. There is no path for traffic to leak even if the VPN is down for a week, transmission just silently sits there unable to talk to anyone.

    I published my setup at github.com/rvaidun/transmission-vpn. It's built on top of haugene/transmission-openvpn (which provides the killswitch) and adds three things on top:

  • A transmission-remote wrapper that runs the real binary inside the container, so you never need transmission-cli installed on your host. Your host literally cannot reach the transmission daemon outside the VPN's network namespace.
  • A transmission-vpn-status healthcheck that confirms the tunnel is up, shows your masked public IP, and tells you which Nord server you're routed through.
  • An hourly sidecar that queries Nord's recommendation API and switches the transmission service to a less-loaded P2P server when the improvement is meaningful (default: only switch if the new server's load is at least 20 percentage points lower). You can also force an immediate switch with transmission-vpn-refresh.
  • Setup is short. Clone the repo, fill in .env with your NordVPN service credentials (NOT your account password — generate them at my.nordaccount.com/dashboard/nordvpn/manual-setup), then:

    docker compose up -d --build
    echo 'export PATH="$PWD/bin:$PATH"' >> ~/.zshrc
    exec zsh

    After that, everything is the same as before — except now it's safe:

    
    ➜  transmission git:(main) ✗ transmission-remote -l
    [12:50:13] container 'transmission' not running (false). starting via docker compose...
    [+] up 2/2
     ✔ Container transmission      Started                                                                            0.1s
     ✔ Container nordvpn-refresher Started                                                                            0.1s
    [12:50:14] waiting for transmission RPC at 127.0.0.1:9091...
    [12:50:18] transmission RPC ready
        ID   Done       Have  ETA           Up    Down  Ratio  Status       Name
    Sum:                None               0.0     0.0
    ➜  transmission git:(main) ✗ transmission-vpn-status
      OK    container 'transmission' is running
      OK    tun0 is up (10.100.0.2/20)
      OK    VPN IP (192.145.118.129) differs from host IP (71.202.166.60)
      info  OpenVPN connected to: us8524.nordvpn.com  (config: us8524.nordvpn.com.ovpn)
      info  refresher has pinned us to: us8514.nordvpn.com
      OK    on Nord's recommended P2P server right now (load 42%)
    ➜  transmission git:(main) ✗

    One quirk to know: because transmission-remote runs inside the container, file paths in commands like -a /path/to/foo.torrent are evaluated container-side. Drop your .torrent files into ./data/watch/ (the auto-add directory) or reference them under /data/... inside the container. Magnet URIs work transparently. Full setup steps, knobs, and caveats are in the repo's README.

    Conclusion

    I hope this article helps you get started with torrenting safely. Happy torrenting!