Setting Up A PHP + MySQL Powered BitTorrent Tracker With RivetTracker

Efficient file distribution is an important process for many websites online. BitTorrent makes this easier by sharing the uploading and downloading among clients. This alleviates the bandwidth required by the content provider. This tutorial will show you how to install RivetTracker, a PHP and MySQL driven BitTorrent tracker. RivetTracker is a heavily modified version of PHPBTTracker, written by "DeHackEd". It aims to be easy to use and manage.


RivetTracker License

RivetTracker is licensed under the GPL version 2 license.



-Automatic RSS feed creation makes it easy for podcasts or other content providers to create feeds.

-Ability to upload many torrents at once using a single .zip file.

-Built-in processor is able to show the details of a torrent file.

-Detailed user statistics show exactly who is connected.

-Ability to add HTTP seeding (either GetRight or BitTornado specification) directly into the torrent during upload.

-Built-in configuration allows you to edit/change CSS files.

-MySQL database optimized to minimize queries for efficient performance.

-Easy to install and manage.

-Extensive help file provides all the information you need to understand how BitTorrent works.



1) Webserver - Apache works well here.

Other webservers have not been tested, however, if you get one working please let me know.

2) PHP - PHP version 4 or PHP version 5 should work. RivetTracker has been tested under PHP5 so I would recommend that, just to be safe.

3) MySQL - This is the database that will keep track of all the information.



I'm going to assume at this point that you know how to install and configure the software listed above. If not, there are a variety of tutorials on HowToForge that can help get you up to speed. I'm also going to assume that you know what BitTorrent is and how a tracker works. If not, I would suggest looking up the details on Wikipedia.

As a note, if you are looking for a private tracker, I would suggest checking out many of the other BitTorrent tracker programs out there. While there is an option to hide the tracker and require a login, it's not actually a private tracker.

It's time to download RivetTracker and get it installed. Head over to this website and download the latest version.

After you download the .tar.gz or .zip file, go ahead and extract it. You should end up with a folder called "rivettracker" containing the program. Copy this folder to your "www" directory, in Apache this is: /var/www/. If you need help or get stuck at any point, please see the help file in the "docs" folder.

Next, open up a web-browser and navigate to:


Where yourdomain is your domain name or IP address. If you are running this on your local system it would be localhost.

The page that displays should be asking you how you want to setup the database. You can either create a new user and database using an existing user account (usually admin/root), or if you already have a user and database setup you can use a pre-existing account.

The next page will ask you about the details of the database. This is where you will put in things like the hostname (usually localhost), username, and password. When you click install, the necessary tables will be created in the database. You should get a message on the next page stating that the database was successfully created.

This last page allows you to configure the settings for RivetTracker. It might look a little daunting at first but it's actually pretty simple. If you are unsure, most of the default values should work just fine. Just make sure you read the descriptions carefully, as they tell you everything you need to know.

One important setting on this page is specifying the upload and admin users. The upload user will only be able to add torrents to the database. The admin user (you), on the other hand, will have full access to all the options for adding torrents, seeing statistics, changing settings, etc. Another important setting is turning the RSS feed on or off. An RSS feed is an XML file that provides basic information to RSS readers that can load this information and check to see if there are new torrents listed on your website. This works well if you have a podcast or other type of regular release. Many RSS readers can grab the torrent file and start downloading it right away.

Once you have all the settings the way you want them, click the button on the bottom of the page to save the settings. As long as you have write access to the folder, it should create a file called "config.php" with all of your settings. If you wish to change any of these settings later you can do so in the admin page. If you do not have write access to the folder, you will be able to download a copy of the "config.php" file which can then be uploaded to your server. Please make sure you make the "torrents" and "rss" folders writeable (usually www-data in Apache). After you are finished installing, make sure you delete the "install.php" file.

That's it! You can now point your web-browser to: http://yourdomain/rivettracker/ and you should be able to see RivetTracker running. Login as the admin user with whatever username and password you specified and you can see all of the options available. If you have multiple torrent files ready to upload right away I would suggest zipping them all up and using the batch upload page. Make sure that there are no folders or subfolders in the .zip file. This makes it much easier than uploading each torrent file one by one.



If you get stuck or need help, I would first suggest reading the help file located in the "docs" folder. If you are still stuck please post on the forums: or you can contact me using the contact link here: If you find any bugs or have thoughts about future improvements, you can also contact me. Thanks, and have fun!

Share this page:

1 Comment(s)