mod_bt - Making things better for seeders

Documentation

Introduction

mod_bt turns your Apache 2 webserver into a BitTorrent tracker. Instead of running a webserver, running a tracker, and running expensive code to parse the tracker's statistics and produce an HTML webpage, you can run it all in one process. Direct access to the tracker's operating details is given via PHP and Perl language bindings, so your webpage doesn't have to spend time doing expensive transactions like bdecoding to get at statistics.

System Requirements

Components

The mod_bt distribution is broken down into modular pieces with the goals of maximum flexability and portability in mind.

Crash Recovery

As with most databases, the mod_bt tracker database is less likely to become corrupted after a system crash if the hard drive it is stored on does not have write cacheing enabled. Under linux, you can disable a drive's write-cache on startup using the "hdparm" command (eg; hdparm -W0 /dev/hda).

Normally, mod_bt will recover a crashed database without problems when the server starts up. If the tracker was heavily trafficked for a long time without a restart, it may take several minutes for the database recovery to complete. To lower this delay, you should restart your apache server at least once a day. (You're already doing that to rotate your logs anyway, right??)

Here's what to do if your database crashes and apache can't start up:

If the recovery successful, you should still have all of your infohashes online, with all of their statistics/other info still intact. The peerlists for each infohash will have been deleted, but any active peers will reregister themselves within return_interval seconds.

If the recovery was not successful, remove all of the files in the tracker's home directory. If you have been creating backups with btt_db2xml, you can recover your latest backup with btt_xml2db. If you haven't been keeping backups (shame on you!), your only option is to delete all of the files in the tracker's home directory, re-register your torrents, and start fresh.

Reporting Bugs

Bug reports should be submitted via email to the mod_bt Bug Tracking System. See http://bts.yi.org/bugs/mod_bt for more details.

To Do

If you want are able to help, please see the developers page.

License

   mod_bt 0.0.19
   Copyright 2004, 2005, 2006 Tyler MacDonald <tyler@yi.org>
   Website Design Copyright 2006 Donna M. Jaggard <donna@arwen.org>

   Small block of code in src/apache2/mod_bt.c Copyright Ralf S. Engelschall
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this software except in compliance with the License.
   You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.