opentracker is a open and free bittorrent tracker project
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
opentracker.xcodeproj new flag to enforce gzip even if client did not request it May 29, 2012
tests The BIG refactoring [tm]. Too many changes to count them. If it doesn… Nov 28, 2008
.gitignore initial import Aug 3, 2014
Makefile Dont make srandomdev the default, it exists only in BSDs Jun 8, 2012
README Fix spelling error ;) Jun 7, 2013 updated README Aug 3, 2014
README_v6 v6 works since january Oct 8, 2009
opentracker.c Init prng before udp code needs it. May 28, 2012
opentracker.conf.sample Add functionality to distribute udp to several workers Apr 25, 2012
ot_accesslist.c Prevent infinite loop if whitelist ends in several returns Aug 26, 2010
ot_accesslist.h Introducing the concept of vectors of nets into opentracker Aug 26, 2009
ot_clean.c Make woodpecker spotting more usable by adjusting count every 2 minutes Jun 3, 2012
ot_clean.h The BIG refactoring [tm]. Too many changes to count them. If it doesn… Nov 28, 2008
ot_fullscrape.c Forgot variable declaration May 31, 2012
ot_fullscrape.h Add comments, rename our struct http_data h to cookie, all clientsock… Jan 15, 2009
ot_http.c Fix immediate overwrite in the X-forwarded-for passing case. Thanks t… Aug 4, 2013
ot_http.h Make header parsing more efficient, prepare multithreading and keep-a… Nov 18, 2009
ot_iovec.c Formatting Nov 3, 2008
ot_iovec.h The BIG refactoring [tm]. Too many changes to count them. If it doesn… Nov 28, 2008
ot_livesync.c ** struct ot_workstruct gets ritcher (and will become even ritcher so… Apr 22, 2010
ot_livesync.h ** struct ot_workstruct gets ritcher (and will become even ritcher so… Apr 22, 2010
ot_mutex.c Remove unnecessary =NULL initialization of static pointers. Jun 17, 2009
ot_mutex.h Add a top100 for most popular torrents May 18, 2012
ot_rijndael.c Add rijndael to version report May 29, 2012
ot_rijndael.h Adding rijndael code for udp connection id calculation May 28, 2012
ot_stats.c Make woodpecker spotting more usable by adjusting count every 2 minutes Jun 3, 2012
ot_stats.h Make woodpecker spotting more usable by adjusting count every 2 minutes Jun 3, 2012
ot_sync.c Whitespace fixes Oct 28, 2008
ot_sync.h Whitespace fixes Oct 28, 2008
ot_udp.c Calculate the old hash for the ip address only, when the current one … Jun 3, 2012
ot_udp.h Add functionality to distribute udp to several workers Apr 25, 2012
ot_vector.c Nicer formatting for value-- Aug 26, 2009
ot_vector.h The BIG refactoring [tm]. Too many changes to count them. If it doesn… Nov 28, 2008
proxy.c Stop sending tracker id with every packet Aug 15, 2010
scan_urlencoded_query.c Lot of Gehacktes around this keyword scanner. Don't return a match if… Jan 26, 2009
scan_urlencoded_query.h V6 Jan 13, 2009 Gimmi Beer! Apr 2, 2007
trackerlogic.c Dont ruin the srandomdev initialisation in trackerlogic's init Jun 3, 2012
trackerlogic.h ** struct ot_workstruct gets ritcher (and will become even ritcher so… Apr 22, 2010

opentracker - open-source and free BitTorrent tracker

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.

Build instructions

You need libowfat (

Steps to go:

Clone the libowfat library:

git clone
cd libowfat
cd ..

Clone this repository:

git clone
cd opentracker

That should leave you with an exectuable called opentracker and one debug version opentracker.debug.

This tracker is open in a sense that everyone announcing a torrent is welcome to do so and will be informed about anyone else announcing the same torrent. Unless -DWANT_IP_FROM_QUERY_STRING is enabled (which is meant for debugging purposes only), only source IPs are accepted. The tracker implements a minimal set of essential features only but was able respond to far more than 10000 requests per second on a Sun Fire 2200 M2 (thats where we found no more clients able to fire more of our script).

Some variables in opentracker's Makefile control features and behaviour of opentracker. Here they are:

  • -DWANT_V6 makes opentracker an IPv6-only tracker. More in the v6-section below.

  • opentracker can deliver gzip compressed full scrapes. Enable this with -DWANT_COMPRESSION_GZIP option.

  • Normally opentracker tracks any torrent announced to it. You can change that behaviour by enabling ONE of -DWANT_ACCESSLIST_BLACK or -DWANT_ACCESSLIST_WHITE. Note, that you have to provide a whitelist file in order to make opentracker do anything in the latter case. More in the closed mode section below.

  • opentracker can run in a cluster. Enable this behaviour by enabling -DWANT_SYNC_LIVE. Note, that you have to configure your cluster before you can use opentracker when this option is on.

  • Some statistics opentracker can provide are sensitive. You can restrict access to these statistics by enabling -DWANT_RESTRICT_STATS. See section statistics for more details.

  • Fullscrapes is bittorrent's way to query a tracker for all tracked torrents. Since it's in the standard, it is enabled by default. Disable it by commenting out -DWANT_FULLSCRAPE.

  • By default opentracker will only allow the connecting endpoint's IP address to be announced. Bittorrent standard allows clients to provide an IP address in its query string. You can make opentracker use this IP address by enabling -DWANT_IP_FROM_QUERY_STRING.

  • Some experimental or older, deprecated features can be enabled by the -DWANT_LOG_NETWORKS, -DWANT_SYNC_SCRAPE or -DWANT_IP_FROM_PROXY switch.

Currently there is some packages for some linux distributions and OpenBSD around, but some of them patch Makefile and default config to make opentracker closed by default. I explicitly don't endorse those packages and will not give support for problems stemming from these missconfigurations.

Some tweaks you may want to try under FreeBSD:

sysctl kern.ipc.somaxconn=1024
sysctl kern.ipc.nmbclusters=32768
sysctl net.inet.tcp.msl=10000
sysctl kern.maxfiles=10240


opentracker can be run by just typing ./opentracker. This will make opentracker bind to and happily serve all torrents presented to it. If ran as root, opentracker will immediately chroot to . (or any directory given with the -d option) and drop all priviliges after binding to whatever tcp or udp ports it is requested.

When options were few, opentracker used to accept all of them from command line. While this still is possible for most options, using them is quite unhandy: an example invocation would look like:

./opentracker -i -p 80 -P 80 -p 6969 -i -p 80 -r -d /usr/local/etc/opentracker -w mytorrents.list -A

opentracker now uses a config file that you can provide with the -f switch.

Config file

opentrackers config file is very straight forward and a very well documented example config can be found in the file opentracker.conf.sample.

Closed mode

While personally I like my tracker to be open, I can see that there's people that want to control what torrents to track – or not to track. If you've compiled opentracker with one of the accesslist-options (see Build instructions above), you can control which torrents are tracked by providing a file that contains a list of human readable info_hashes. An example whitelist file would look like:


To make opentracker reload it's white/blacklist, send a SIGHUP unix signal.


Given its very network centric approach, talking to opentracker via http comes very naturally. Besides the /announce and /scrape paths, there is a third path you can access the tracker by: /stats. This request takes parameters, for a quick overview just inquire /stats?mode=everything.

Statistics have grown over time and are currently not very tidied up. Most modes were written to dump legacy-SNMP-style blocks that can easily be monitored by MRTG. These modes are: peer, conn, scrp, udp4, tcp4, busy, torr, fscr, completed, syncs. I'm not going to explain these here.

The statedump mode dumps non-recreatable states of the tracker so you can later reconstruct an opentracker session with the -l option. This is beta and wildly undocumented.

You can inquire opentracker's version (i.e. CVS versions of all its objects) using the version mode.


A torrent tracker basically is an http-Server that collects all clients ip addresses into pools sorted by one of the request strings parameters and answers all other clients that specified this exact same parameter a list of all other recent clients. All technologies to implement this are around for more than twenty years. Still most implementations suck performancewise.

Utilizing the highly scalable server framework from libowfat, opentracker can easily serve multiple thousands of requests on a standard plastic WLAN-router, limited only by your kernels capabilities ;)

One important design decision of opentracker was to not store any data persistently. This reduces wear&tear on hard disks and eliminates problems with corrupt databases.


opentracker was written by Dirk Engling, who likes to hear from happy customers. His mail address is


A project like this one is impossible without lots of help from friends. It is powered by beer, much energy and love, batches of bug reports and support on the operating system integration side by denis, taklamakan, cryx, supergrobi and – his libowfat always on the bleeding edge – Fefe. Thanks are also due to Hannes for helping me out with designing internal data representation.


opentracker is considered beer ware

Although the libowfat library is under GPL, Felix von Leitner agreed that the compiled binary may be distributed under the same beer ware license as the source code for opentracker. However, we like to hear from happy customers.