I have looked at Bittorrent on and off over the years. It was controversial as it was the preferred filesharing solution of choice for copyright pirates but it has significant other uses and benefits. It was probably designed to  cope with site or server bandwidth scarcity in a client server transaction. I first created this page in May 2009 as a result of and to aid my experimentation with bittorrent clients. I had another look 10 years later and significantly updated the page to document my experiments with deluge on raspbian. In 2023, I had another go. As ever, see below/overleaf for my notes.

One of my inspirations was to create a bittorrent swarm for my snipsnap binaries. My experiments involved using the then named “Open Office” which had its own torrent download. (In one solution, I would act as a seeder and in the second I would act a peer. (It seems these words are actually synonymous).

  1. The Wikipedia Page … always a good place to start
  2. A review of the economics and history of the founding company by Simon Morris; I take from this that bittorrent the company protected itself from closure and legal attack by managing its intent i.e. working hard to avoid illegal use and recognising that there were “substantial non-infringing use-cases”.
  3. Also What is a seedbox and why would you want one?

2019

  1. BitTorrent Beginner’s Guide: Everything You Need to Know, they say, “BitTorrent file-sharing technology isn’t just for pirates. Here’s how to access the rich troves of legitimate and legal content.” They list their top three clients.
  2. 25 Best Torrent Sites (Most Popular in 2020), an article on the protocol and the role of trackers, listing the most popular at the time of publication.
  3. Downloading your First Torrent: The Definitive Guide (2020 Update), by Rapidseed, they offer a proxy service but the article summarises the protocol well.
  4. The Best VPNs for Torrenting 2020 – Should you torrent a VPN?, by proprivacy; let’s all remember that both torrenting and privacy & anonymity are legal, and in many ways protected human rights law.

2023

  1. How to create a torrent using the command-line, at AskUbuntu recommends a couple of tools . This all takes me back to opentracker , but I misunderstood the role of trackers. (They are not indexers).
  2. However, this at linuxconfig  documents the transmission daemon, and the daemon ports. Finally I found Bittorrent: Set by Niel Bothwick at linux format. I installed transmission, using these instructions, except I used ip-tables to set the firewall rules, this, for some reason, required a system reboot. I used transmission-create to make a .torrent file, take notice of the arguments, the output file and the tracker need to be specified; when complete I placed the torrent on my web site, and the transmission web interface, sensibly allows one to specify an http URL for the torrent file. However the invoking  URL is fragile, it needs ~/transmission/web/. On logging in to get some stats, using the command line, transmission-remote, I was rejected on numerous occasions. transmission-remote’s man page is helpful and cli-ck.io have a page on transmission-remote, documenting the -a i.e. the add flag. See also Transmission’s home pages.  Is that it? Install and start the daemon, make a torrent file, then notify the daemon about the torrent.
  3. I needed to set a router port forwarding rule, which requires the use of the IP number, not the DNS name, and I had to install a new rule. (I used, yougetsignal.com and canyouseeme.org to test that the rule was working. When editing the transmission settings file, remember to take a copy, oh for versioning file systems.

Ubuntu

There is quite a lot of choice if using Ubuntu, and it ships with a package called Transmission. I also found this article on using transmission at superuser.com and this article at morehawes  and this at askubuntu, and this at linuxconfig which documents the transmission daemon, the latter documenting ports required and having a copy of the settings file. Also https://www.cnx-software.com/2012/06/08/how-to-create-and-seed-a-torrent-in-ubuntu-using-transmission-command-line/ which is clearer about how to avoid an indexer.

In 2023, I found this, on making a torrent from the command line, which confused me on how to publish the torrent. See also ctorrent, a CLI only tool and its user manual, and this how to, which recommends bittornado which seems unavailable for U22.04 and raspbian.

Opentracker

They say, “opentracker is a open and free bittorrent tracker project. It aims for minimal resource usage and is intended to run at your wlan router. Currently it is deployed as an open and free tracker instance. Read our free and open tracker blog and announce your torrents there (but do not hesitate to setup your own free trackers!).”

The -h switch displays the usage string, the –help flag displays more hints. I need to read the compiler directing statements more carefully. Especially related to compression and  access lists.

See,

  1. opentracker.conf.sample , a sample conf file for opentracker
  2. How to create torrent files from techspree, this also talks of the trackers and lists some of the tracker’s announcement URLs.

I have come to the view that I don’t need my own tracker. I found two tracker sites whose names I like, probably both powered by erdgeist i.e opentracker.

  1. https://www.cyberia.is/tracker.html
  2. https://opentrackr.org/
An illustrative bittorrent network, the role of the tracker
  1. The initiator makes a torrent file , notifies the tracker and publicises the URL of the .torrent file.
  2. Peers commence Uploads and both notify the tracker and request peer locations from the tracker.
  3. Each peer holds a copy of the data.

Raspbian & Deluge

I experimented with Deluge; I never got this work, the slugged functionality on raspbian was a problem and I never found a tracker. I got as far as installing deluge which would allow me to participate in a swarm as a peer, but not as an initiating seed.

Deluge seems the PI tool of choice, I found this at PiMyLifeUp, and this on youtube and How to Turn a Raspberry Pi into an Always on BitTorrent Box this is to support the peer role. See also “How to make a torrent file” from helpdesk geek. rapidseedbox have a number of resources; here is a user manual, from Rapid Seedbox, on creating a new torrent. See aslo how to use deluge from wikihow. Using the GTK tool which needs the application password, to remotely connect in my use case.

I used google to search for trackers and further resources on running a bit torrent server on raspbian. See also the comment dated 14th January for more on deluge and raspbian which I have moved to the comments.

Early findings

Most of these were found in the early days of this page.

8 Replies

  1. I removed some dead links. My qube is dead and I do not have sufficient admin rights on davelevy.info, so I need another answer if I want to persist with this.

  2. I removed the following words from the article, which were about 10 years old, all the technology has come on a lot.

    I have downloaded and installed Bit Torrent from the http://bittorrent.com, downloads page. I tested it using Open Office which has a bit torrent distribution page. This has downloaded and seeded. I need to check if it requires firewall configuration to participate in a feed.

    This was originally written at a time that the BT Home Hub needed the firewall configured, it was mentioned but no configuration documented, although I seem to remember that the port forwarding page need to be opened and the bit torrent protocol authorised.

    I also removed mention of my now departed Cobalt Qube.

  3. I removed the following comments from the page, “Having posted my copy of the snipsnap .tgz package and thinking about a presentation I was planing to do on privacy and copy right I began to investigate Bittorrent. The Pirate Bay trial is going on at the moment and the peer-to-peer nature of bt appeals to many libertarians.”

  4. I retired the following comments from the main article.

    Deluge seems the PI tool of choice, I found this at PiMyLifeUp, and this on youtube and How to Turn a Raspberry Pi into an Always-On BitTorrent Box, from how to geek which recommends using deluge and discuss the three ways to connect to the server, configuring he daemon and connecting to the internet. The three connection modes are the text console, web-ui and a GTK console. The GTK console is not available on Raspbian, but is available for the usual culprits. One can get deluge directly from the developers at the deluge download page, where there is a windows installer & thin client exist. I also found more on configuring deluge for the pi., a good script for the install, which includes service files; it also installs an application enclosed password, which is used by the thin client. See also “How to make a torrent file” from helpdesk geek. The web console also has a password

    rapidseedbox have a number of resources starting with more on the thin client. They describe how to create a new torrent, you need the thin client aka GTK Console, here is a proprietary user manual, from Rapid Seedbox, on creating a new torrent. The GTK tool needs the application password. See also, How to load a torrent using deluge, from rapidseedbox.

    While interested in Ubuntu & μtorrent, I found this, a utserver.conf at github.

  5. On opentracker, why is this so hard? I can make it, and start an opentracker instance. I can create a torrent file using both ctorrent, and transmission; I am unclear if the source file needs to be on the web (the torrent file needs to be on the web.)

    But I misunderstood the role of the trackers; they are not indexers.

    When making the torrent, the tracker location is encapsulated in the .torrent file. When requesting an upload, the new user starts from the .torrent, runs an upload, contacting the tracker to identify seeds. I was able to perform my first download to my seedbox using transmission. (I am still unclear if deluge on the pi will do what I want.) NB the tracker is informed at the time the .torrent is made. The bittorrent daemon needs its port enabled on the router/network access gateway in order to post to the swarm. I stuck with transmission, making the torrent file seems simple and it’s available via apt. I have published my .torrent on one of my web sites; you don’t need a third party indexer although this may be a response to the pursuit of the pirate bay.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.