{"id":614,"date":"2009-08-07T23:55:41","date_gmt":"2009-08-07T23:55:41","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=614"},"modified":"2024-11-10T23:26:44","modified_gmt":"2024-11-10T23:26:44","slug":"bittorrent","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/bittorrent\/","title":{"rendered":"Bittorrent"},"content":{"rendered":"<p>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&nbsp; 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.<!--more--><\/p>\n<p>One of my inspirations was to create a bittorrent swarm for my snipsnap binaries. My experiments involved using the then named &#8220;Open Office&#8221; 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).<\/p>\n<ol>\n<li>The <a href=\"https:\/\/en.wikipedia.org\/wiki\/BitTorrent\">Wikipedia Page<\/a> &#8230; always a good place to start<\/li>\n<li>A <a href=\"https:\/\/medium.com\/@simonhmorris\/why-bittorrent-mattered-bittorrent-lessons-for-crypto-1-of-4-fa3c6fcef488\">review of the economics and history<\/a> 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 &#8220;substantial non-infringing use-cases&#8221;.<\/li>\n<li>Also <a href=\"https:\/\/www.howtogeek.com\/764504\/what-is-a-seedbox-and-why-would-you-want-one\/\">What is a seedbox and why would you want one<\/a>?<\/li>\n<\/ol>\n<h3>2019<\/h3>\n<ol>\n<li><a href=\"https:\/\/www.tomsguide.com\/uk\/us\/bittorrent-how-to-guide-torrent,review-2429.html\">BitTorrent Beginner&#8217;s Guide: Everything You Need to Know<\/a>, they say, &#8220;BitTorrent file-sharing technology isn&#8217;t just for pirates. Here&#8217;s how to access the rich troves of legitimate and legal content.&#8221; They list their top three clients.<\/li>\n<li><a href=\"https:\/\/blokt.com\/guides\/best-torrent-sites\">25 Best Torrent Sites (Most Popular in 2020)<\/a>, an article on the protocol and the role of trackers, listing the most popular at the time of publication.<\/li>\n<li><a href=\"https:\/\/www.rapidseedbox.com\/blog\/download-torrent\">Downloading your First Torrent: The Definitive Guide (2020 Update)<\/a>, by Rapidseed, they offer a proxy service but the article summarises the protocol well.<\/li>\n<li><a href=\"https:\/\/proprivacy.com\/vpn\/comparison\/best-vpn-torrenting\">The Best VPNs for Torrenting 2020 &#8211; Should you torrent a VPN?<\/a>, by proprivacy; let&#8217;s all remember that both torrenting and privacy &amp; anonymity are legal, and in many ways protected human rights law.<\/li>\n<\/ol>\n<h3>2023<\/h3>\n<ol>\n<li><a href=\"https:\/\/askubuntu.com\/questions\/32024\/how-to-create-a-torrent-using-the-command-line\">How to create a torrent using the command-line<\/a>, at AskUbuntu recommends a couple of tools . This all takes me back to <a href=\"https:\/\/erdgeist.org\/arts\/software\/opentracker\/\">opentracker<\/a> , but I misunderstood the role of trackers. (They are not indexers).<\/li>\n<li>However, <a href=\"https:\/\/linuxconfig.org\/how-to-set-up-transmission-daemon-on-a-raspberry-pi-and-control-it-via-web-interface\">this at linuxconfig<\/a>&nbsp; documents the <em>transmission<\/em> daemon, and the daemon ports. Finally I found <a href=\"https:\/\/www.linuxformat.com\/includes\/download.php?PDF=LXF176.tut_3.pdf\">Bittorrent: Set<\/a> by Niel Bothwick at linux format. I installed transmission, using <a href=\"https:\/\/linuxconfig.org\/how-to-set-up-transmission-daemon-on-a-raspberry-pi-and-control-it-via-web-interface\">these instructions<\/a>, except I <acronym title=\"I had to look the syntax up\">used <code>ip-tables<\/code><\/acronym> to <a href=\"https:\/\/docs.rackspace.com\/support\/how-to\/allow-web-traffic-in-iptables\/\">set the firewall rules<\/a>, this, for some reason, <a href=\"https:\/\/raspberrypi.stackexchange.com\/questions\/108161\/problem-with-iptables-on-buster-neither-legacy-or-nft-work\">required a system reboot<\/a>. I used <code>transmission-create<\/code> 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&nbsp; <a href=\"https:\/\/askubuntu.com\/questions\/44686\/transmission-webui-problem-conflict-409\">URL is fragile<\/a>, it needs ~\/transmission\/web\/. On logging in to get some stats, using the command line, transmission-remote, I was <a href=\"https:\/\/stackoverflow.com\/questions\/18936994\/transmission-remote-commands-are-erroring-with-unexpected-response-h1401-una\">rejected<\/a> on numerous occasions. <a href=\"https:\/\/linux.die.net\/man\/1\/transmission-remote\">transmission-remote&#8217;s man page<\/a> is helpful and <a href=\"https:\/\/help.ubuntu.com\/community\/TransmissionHowTo\">cli-ck.io have a page<\/a> on transmission-remote, documenting the -a i.e. the add flag. See also <a href=\"https:\/\/transmissionbt.com\/\">Transmission&#8217;s home pages<\/a>.&nbsp; Is that it? Install and start the daemon, make a torrent file, then notify the daemon about the torrent.<\/li>\n<li>I needed to set a router <span style=\"text-decoration: underline;\">port forwarding rule<\/span>, which requires the use of the IP number, not the DNS name, and I had to <a href=\"https:\/\/www.bt.com\/help\/broadband\/learn-about-broadband\/how-do-i-set-up-port-forwarding-on-my-bt-hub-\">install a new rule<\/a>. (I used, <a href=\"https:\/\/www.yougetsignal.com\/tools\/open-ports\/\">yougetsignal.com<\/a> and <a href=\"https:\/\/canyouseeme.org\/\">canyouseeme.org<\/a> to test that the rule was working. When editing <a title=\"I think this is right.\" href=\"https:\/\/github.com\/eternnoir\/transmission\/blob\/master\/settings.json\">the transmission settings file<\/a>, remember to take a copy, oh for versioning file systems.<\/li>\n<\/ol>\n<h3>Ubuntu<\/h3>\n<p>There is <a href=\"https:\/\/itsfoss.com\/best-torrent-ubuntu\/\">quite a lot of choice<\/a> if using Ubuntu, and it ships with a package called <a title=\"their web site\" href=\"https:\/\/transmissionbt.com\">Transmission<\/a>. I also found <a href=\"https:\/\/superuser.com\/questions\/1687624\/how-to-create-and-seed-new-torrent-files-for-bittorrent-using-transmisson-client\">this article on using transmission<\/a> at superuser.com and <a href=\"https:\/\/web.archive.org\/web\/20230117123820\/https:\/\/www.morehawes.co.uk\/old-guides\/bittorrent-transmission\">this article at morehawes<\/a>&nbsp; and <a href=\"https:\/\/help.ubuntu.com\/community\/TransmissionHowTo\">this at askubuntu<\/a>, and <a href=\"https:\/\/linuxconfig.org\/how-to-set-up-transmission-daemon-on-a-raspberry-pi-and-control-it-via-web-interface\">this at linuxconfig<\/a> which documents the <em>transmission<\/em> daemon, the latter documenting ports required and having a copy of the settings file. Also <a href=\"https:\/\/www.cnx-software.com\/2012\/06\/08\/how-to-create-and-seed-a-torrent-in-ubuntu-using-transmission-command-line\/\">https:\/\/www.cnx-software.com\/2012\/06\/08\/how-to-create-and-seed-a-torrent-in-ubuntu-using-transmission-command-line\/<\/a> which is clearer about how to avoid an indexer.<\/p>\n<p>In 2023, I found this, on <a href=\"https:\/\/askubuntu.com\/questions\/32024\/how-to-create-a-torrent-using-the-command-line\">making a torrent from the command line<\/a>, which confused me on how to publish the torrent. See also ctorrent, a CLI only tool and its <a href=\"http:\/\/www.rahul.net\/dholmes\/ctorrent\/userguide.html#opt_download\">user manual<\/a>, and this <a href=\"https:\/\/wasi0013.com\/2018\/10\/21\/how-to-create-a-torrent-file-in-linux\/\">how to,<\/a> which recommends <code>bittornado<\/code> which seems unavailable for U22.04 and raspbian.<\/p>\n<h3>Opentracker<\/h3>\n<p>They <a href=\"https:\/\/erdgeist.org\/arts\/software\/opentracker\/\">say<\/a>, &#8220;<em>opentracker<\/em> is a open and free <a class=\"reference external\" href=\"http:\/\/wiki.theory.org\/BitTorrentSpecification\">bittorrent tracker<\/a> 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 <a title=\"this may have gone\" href=\"http:\/\/opentracker.blog.h3q.com\/\">free and open tracker blog<\/a> and announce your torrents there (but do not hesitate to setup your own free trackers!).&#8221;<\/p>\n<p>The -h switch displays the usage string, the &#8211;help flag displays more hints. I need to <em>read<\/em> the compiler directing statements more carefully. Especially related to <a href=\"https:\/\/stackoverflow.com\/questions\/71324508\/how-to-fix-cannot-find-lz\">compression<\/a> and&nbsp; access lists.<\/p>\n<p>See,<\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/flygoast\/opentracker\/blob\/master\/opentracker.conf.sample\">opentracker.conf.sample<\/a> , a sample conf file for opentracker<\/li>\n<li><a href=\"https:\/\/techspree.net\/how-to-create-torrent-files\/\">How to create torrent files<\/a> from <em>techspree<\/em>, this also talks of the trackers and <a href=\"https:\/\/techspree.net\/torrent-tracker-list-updated\/\">lists<\/a> some of the tracker&#8217;s announcement URLs.<\/li>\n<\/ol>\n<p>I have come to the view that I don&#8217;t need my own tracker. I found two tracker sites whose names I like, probably both powered by erdgeist i.e opentracker.<\/p>\n<ol>\n<li><a href=\"https:\/\/www.cyberia.is\/tracker.html\">https:\/\/www.cyberia.is\/tracker.html<\/a><\/li>\n<li><a href=\"https:\/\/opentrackr.org\/\">https:\/\/opentrackr.org\/<\/a><\/li>\n<\/ol>\n<figure id=\"attachment_6983\" aria-describedby=\"caption-attachment-6983\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2009\/08\/bittorrent-network.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-6983\" src=\"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2009\/08\/bittorrent-network-1024x397.png\" alt=\"\" width=\"1024\" height=\"397\" srcset=\"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2009\/08\/bittorrent-network.png 1024w, https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2009\/08\/bittorrent-network-300x116.png 300w, https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2009\/08\/bittorrent-network-768x298.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-6983\" class=\"wp-caption-text\">An illustrative bittorrent network, the role of the tracker<\/figcaption><\/figure>\n<ol>\n<li>The initiator makes a torrent file , notifies the tracker and publicises the URL of the .torrent file.<\/li>\n<li>Peers commence Uploads and both notify the tracker and request peer locations from the tracker.<\/li>\n<li>Each peer holds a copy of the data.<\/li>\n<\/ol>\n<h3>Raspbian &amp; Deluge<\/h3>\n<p>I experimented with Deluge; I <strong>never<\/strong> 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.<\/p>\n<p>Deluge seems the PI tool of choice, I found <a title=\"Installing Deluge on the Raspberry Pi\" href=\"https:\/\/pimylifeup.com\/raspberry-pi-deluge\/\">this<\/a> at PiMyLifeUp, and <a title=\"insrtalling deluge on Ubuntu\" href=\"https:\/\/www.youtube.com\/watch?v=qxnJVU0nFTI\">this on youtube<\/a>&nbsp;and <a title=\"good, but also focused on the peer role.\" href=\"https:\/\/www.howtogeek.com\/142044\/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box\/\">How to Turn a Raspberry Pi into an Always on BitTorrent Box<\/a> this is to support the peer role. See also <a href=\"https:\/\/helpdeskgeek.com\/how-to\/how-to-make-a-torrent-file\/\">&#8220;How to make a torrent file<\/a>&#8221; from helpdesk geek. rapidseedbox have a number of resources; here is <a href=\"https:\/\/www.rapidseedbox.com\/kb\/ultimate-deluge-guide#how-to-create-a-new-torrent\">a user manual, from Rapid Seedbox, on creating a new torrent<\/a>. See aslo&nbsp;<a href=\"https:\/\/www.wikihow.com\/Use-Deluge\">how to use deluge<\/a> from wikihow. Using the GTK tool which needs the application password, to remotely connect in my use case.<\/p>\n<p>I used google to search for trackers and further resources on <a href=\"http:\/\/lmgtfy.com\/?qtype=search&amp;q=how+to+run+a+bit+torrent+server+on+raspbian\">running a bit torrent server<\/a> on raspbian. See also the comment <a href=\"https:\/\/davelevy.info\/wiki\/bittorrent\/#comment-149758\">dated 14th January<\/a> for more on deluge and raspbian which I have moved to the comments.<\/p>\n<h3>Early findings<\/h3>\n<p>Most of these were found in the early days of this page.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.google.co.uk\/search?q=maketorrent&amp;ie=utf-8\">A google search for the word&nbsp; maketorrent<\/a>, this, I think returns resources that help make a torrent file.<\/li>\n<li><a href=\"http:\/\/torrentfreak.com\/how-to-create-a-torrent\/\">How to create a torrent<\/a>, by Torrent Freak interesting blog name, documents how to use then popular clients to create a torrent and post to a tracker but not an indexer.<\/li>\n<li>Here&#8217;s <a href=\"https:\/\/web.archive.org\/web\/20210712041338\/https:\/\/www.techsupportalert.com\/content\/finding-legal-and-free-torrents.htm\">some free and legal tracker sites<\/a>., it points at an article called&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20210712055510\/https:\/\/www.techsupportalert.com\/best-free-torrent-search-engines.htm\">Best Free Torrent Search Engines<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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&nbsp; cope with site or server bandwidth scarcity in a client server transaction. I first created this&#8230;<\/p>\n","protected":false},"author":1,"featured_media":7542,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[27,3],"tags":[31,178,1555,1851,121,920,179,911,1885],"class_list":["post-614","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-technology","tag-applications","tag-bittorrent","tag-deluge","tag-opentracker","tag-p2p","tag-software","tag-tech","tag-technology","tag-transmission"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2009\/08\/bittorrent-logo2.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=614"}],"version-history":[{"count":18,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":11767,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/614\/revisions\/11767"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/7542"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}