How to set up a BitTorrent tracker on Linux

Here are the steps I took to install a BitTorrent tracker on a headless redhat Linux server:

1. Go to the BitTorrent homepage. Then go to the 'Click here for source and older versions' link below the obvious download links. On the sourceforge download page grab the .tar.gz archive of the most recent release.

2. Upload this archive to your Linux server and expand it somewhere. You can unpack the archive with the command: tar -xzf BitTorrent-4.1.0.tar.gz (adjust the filename if needed).

3. cd into the directory you just unpacked. Run this command to start the bt tracker in the background: python bttrack.py --port 6969 --dfile dstate --logfile tracker.log &

To get an explanation of all the command line options available execute python bttrack.py without any options.

4. If you have a firewall installed (and you should) then make sure it allows inbound connections on the port you started the bt tracker on.

Ta-da! You should now see some messages if you point your web browser to the bittorrent port on your server (e.g. http://yourdomain.com:6969) and your announce URL will be something like http://yourdomain.com:6969/announce

Thanks to Dessent.net's btfaq for bringing some clarity to the tangleweed that is the internet.

Posted by dustin on May 19, 2005 with category tags of

10 comments
Are you using Fedora Core? At my new job, I've had to learn all about it. :/ I find I like the command line less than I used to.
   comment by vinny9 (#33) on May 19, 2005

Fedora Core? Ha!

I'm on Red Hat Enterprise Linux 3. It's served me nicely so far.
   comment by dustin (#1) on May 19, 2005

The command line is a beautiful thing... I'm using IRIX at work and Mandrake at home. My only complaint about IRIX is that the GUI is pretty bare bones, and it makes otherwise simple operations more arduous when you need to do them from the command line. On the plus side I've been able to hand huge amounts of my workload over to a few scripts. which shell do you guys work in?
   comment by kingCasey (#60) on May 20, 2005

Hehe, IRIX, that's awesome.

I use bash as my shell since it's the Linux standard, and so there's tons of info and support for it out and about. I agree that shells scripts are a thing of beauty. I've also been playing around with the command line version of php as a scripting language, and I use apache ant for all my software building needs.
   comment by dustin (#1) on May 20, 2005

bash
   comment by vinny9 (#33) on May 20, 2005

I've spent a bunch of time getting to know csh at work, and bash is quite a bit different, I guess it'll come with time.
   comment by KingCasey (#60) on May 21, 2005

I used tcsh for a while and there was a hiccup when I switched, but it's all worked out nicely now.

I just saw a page with some bash tips, so I post it here:
http://www.oreillynet.com/pub/wlg/6915
   comment by dustin (#1) on May 22, 2005

To download a torrent with the client:
% wget http://download.bittorrent.com/dl/BitTorrent-4.0.2.tar.gz
% Untar, cd BitTorrent directory
% ./bittorrent-console.py --url torrenturl --save_as myfile.ext

You can use a later version of BT, but the BT sources eventually require Twisted, which is an extra dependency that I wanted to avoid.
   comment by Connelly Barnes on July 3, 2007

Sorry that last command was supposed to be btdownloadheadless.py. If you have lots of servers, you can start them all downloading a torrent and perhaps make the download go faster.
   comment by Connelly Barnes on July 3, 2007

thanks, i owe you :). Very clear explanation, keep up the good work mate.
   comment by yuda on February 3, 2012

   

VorgTag Cloud

Written by dustin
Latest Photo
Quote of Now:
Friends
Popular Posts
Computer Games

Hey You! Subscribe to dustin's RSS feed.
Or get wider opinion in the Vorg All Author feed.

 
 

Members login here.
© Vorg Group.