Jump to content
xisto Community
Sign in to follow this  
AnimeExile

How To Set Up A Bt Tracker How to set up a Bittorrent tracker

Recommended Posts

How to set up a BitTorrent "Server" T here are 4 different elements that you will need. Even if you cannot offer all these from your machine, you might still be able to offer files via BT (so read on...): A BT "tracker" running on a publicly-available machine. Publicly-available essentially means either a static IP address, or a stable domain. Create a "metafile" for your fileset. This will be the .torrent file that you see in the BT download file link. Run the BT downloader on your system, specifying a download directory where you already have the files stored. Offer the metafile to those who will download the files from you. This is an unusual procedure, and future developments to the BT software may change the process. Like all things, we can break it down into small parts, in order to understand and simplify the process. Firstly you need to download the BT source package from the BitTorrent Homepage. Check the BUILD.windows file; BitTorrent version 3.0 will tell you that you need 3 additional downloads, of Python version 2.0, wxPython, py2exe, and the nullsoft installer. The last 3 items are only necessary if you intend to modify and create your own customised version of BitTorrent, but to run a "server", you will need the first 2. So grab the BitTorrent Source package and Python version 2.0. The BT source package (for Windows) is a .zip file. Unzip it and place it in a folder such as "C:\BT". You'll need to remember where you put it. Python is a programming language. The BT source package comprises a collection of Python programs, but you can't run them until you download Python. It doesn't matter where you install Python on your system so pick whatever directory you would normally use and just install as usual. Now you need to think about your BT tracker. If you're running a web or ftp server, you probably advertise it either with a plain-language url ("http://forums.xisto.com/no_longer_exists/;), or perhaps as a static IP address (usually assigned by your Service Provider) - such as "207.46.230.219". Most individuals on the internet don't have static IPs, so a plain-language dynamic IP will be required. These can be obtained from many sources for free; I use http://www.myip.org/, but if you click the link you'll see that they no longer offer .myip.org addresses. Instead they now refer you to an alternate service - dns2go.com. Newsflash - I just visited the page whilst preparing this FAQ and I see the dns2go.com service is shortly to become a pay service. I'll put up links to other domain name providers as soon as possible. An internet search should turn up many different free domain name providers. If your ISP or network won't let traffic through on Port 6969, or if for some reason you don't want to run the BT tracker on your machine, it is possible to use a tracker running on a different site. You could, for instance, use mine! When you think about this, you can probably see why there may be some legal implications, and future developments with BitTorrent will likely change this method of using trackers. For now, if you want to use my tracker, please e-mail me and we can try it out. (It's possible to configure the tracker to run on other Ports, but I suppose that if you can't use Port 6969 you probably won't be able to use other Port numbers either). If you want to run your own tracker, then your machine will need to recognise itself as " http://forums.xisto.com/no_longer_exists/; or as "http://forums.xisto.com/no_longer_exists/; (or as whatever IP address you are using). Here's another critical issue: the http:// address that you use will be referred to by other downloaders, so you MUST use an addressing method that works for the "outside world" for seeing your machine. Most specifically, you must NOT use the local machine name or local network IP address. So, you got to this site (probably) by using a "http://forums.xisto.com/no_longer_exists/; address. If you lookup smiler.myip.org (using say Ping), the IP address it shows you is - strictly speaking - the IP address of my modem. That's why I have to configure the NAT settings on my modem to pass Port 6969 connections through to the BitTorrent machine. Inside my network, I have to tell my machines that "smiler.myip.org" is the BitTorrent box, and I do that by amending my Windows hosts file. (Start button / Find / (type "hosts") / right-click / Open-With / Notepad). Add a line that says "192.168.1.5 myserver.com" (without the quotation marks, changing the IP address to your local network IP address and changing myserver.com to the domain that you obtained for yourself). This is all standard network stuff, and isn't much more complicated than installing an ADSL or cable modem, so I hope you're with me so far. If any network specialists care to correct any errors, or rewrite this for me, please let me know. The next thing you need to do is to prepare your fileset. Gather together your files and place them in a folder together. Short folder names are best, since (on a Windows system) we're going to be doing some DOS commands. Let's say you placed some files in "I:\BT\filesetfolder". Now we know where we will be running the tracker, and we have a fileset ready. The next thing I did was create a (one-line) DOS batch file for running the tracker. This is the command I (used to) use: C:\PROGRA~1\BITTOR~1\source\bttrack.py --port 6969 --dfile dstate" Notice I used DOS short filenames. This doesn't help legibility, but (stupid me), I 'm not clear on how to run DOS commands using the long filenames. Anyway, you need to specify the path to your BitTorrent source files, then "bttrack.py". The port parameter identifies that the tracker will use for communicating with downloaders, and the "--dfile" bit identifies "dstate" as the name of a temporary file that will be used to save connection information. Save this one-line batch file somewhere that you can get to easily (I have a folder on my desktop containing a whole set of BT batch files), and give it a nice sensible name - like "Start BitTorrent tracker.bat". You can now run the tracker. If the DOS box flashes up and then quickly disappears, there is an error somewhere. If you can't make this work try opening a DOS box and navigating to your BT source folder, then typing the bttrack command manually. You should see helpful error messages in that case. This is (something like) the command I now use: C:\PROGRA~1\BITTOR~1\source\bttrack.py --port 6969 --dfile dstate >>"I:\logs\BTlog.log" The output from this command goes to a log file, and the format is the same as standard web server logfiles. So I can run a logfile analyzer. To begin with, use the command without the >>logfile.log part. You can see messages in the DOS box that way. Once you have the tracker running, it will stay running in a DOS box until you close it. With the tracker running, we can now create the "metafile". For this, I created another one-line batch file. Then, whenever I need to create a new metafile, I just copy the batch file and amend the parameters. This is an example: C:\PROGRA~1\BITTOR~1\source\BTMAKE~1.PY "I:\BT\filesetfolder" http://forums.xisto.com/no_longer_exists/ Notice that there are no wildcards in this command; "filesetfolder" is the name of the folder containing ALL the files I want to offer for download. BTMAKE~1.PY is the short filename for btmakefile.py (in the source folder). This command can take a while to run. The larger the fileset, the longer it takes to run. The output is a file named filesetfolder.torrent, this will be a comparatively small file - a 1.1G fileset that I used resulted in a 25k .torrent file. It depends upon the number of files, and their size. In a real situation, your folder name would probably be something like "gd1972-08-27-shn". Normally the .torrent file will be placed on a web server, surrounded by a page with the appropriate information, and links. The downloader clicks on the fileset.torrent link, the server offers up the .torrent file and the browser starts the BT downloader. The BT downloader receives the .torrent file - which is comparatively small - and once it has the .torrent file it then knows everything it needs to about how to connect and find other downloaders, plus the names of the files, their sizes, and checksums. What's also rather cool about this is that you can actually double-click on the .torrent file (from Windows Explorer) and it will start off the downloader. So you can e-mail the .torrent file or arrange it to be placed on a 3rd party website if you're not running your own web server. The Readme with the BT source package says that the webserver must be configured to handle .torrent files as application/x-BitTorrent; I'm not sure how critical this would be - perhaps a web server that wasn't configured this way would still offer the file so you could use your browser to save the file to hard drive, then double-click on the downloaded .torrent file. Anyway, if you are running a web server, configure it so .torrent files are handled as application/x-BitTorrent, and you should be OK. Place the file on your webserver, and create a page with a link to the .torrent file. If you would like me to place your .torrent file on my server (on my taper-friendly BitTorrent page), please e-mail me. At this stage, there are no connected downloaders, and no-one will be able to receive the files. The key to kick-starting the operation is to start a downloader running on your system, pointing it at your folder containing the complete fileset. Remember how the BT downloader works: Allocate filespace (if files do not already exist) for the fileset to be downloaded. Verify the files to determine what parts (if any) have already been downloaded. Begin downloading any missing parts. I don't recall the reasoning, but in actual fact I'm running my "primary" downloads in DOS boxes. This is an example of the commands I'm using. (One advantage is that if I reboot the machine I only need to double-click on the batch files to kick everything off again exactly as it was before). C:\PROGRA~1\BITTOR~1\source\BTDOWN~2.PY --url http://forums.xisto.com/no_longer_exists/ --ip smiler.myip.org --saveas I:\BT\TOO2002-06-xx-shn --display_interval 2 (all as one long line in the batch file). So for your first, primary downloader - the one you run on your own system - the files already exist - there is no need to allocate or create them. File verification (against the checksums in the .torrent file) will show that the files are complete. Therefore as soon as steps (1) and (2) have been completed (remember, this may take a minute, depending upon filesize), your downloader will show 100% download complete and then start offering the complete download to any new connections. When you started running the downloader, you may have noticed some activity from the tracker (running in its DOS box). You would see a rather cryptic string containing a "hash_info", "peer_id" and other information. If you didn't see this, or if the downloader reported an error such as failure to connect to the tracker, you may need to go back a few steps. Remember, the .torrent file contains within it the url of the tracker (ie "http://forums.xisto.com/no_longer_exists/), so if your machine can't see this url (because of Port problems, or because of machine name problems), the downloader won't be able to see the tracker either. Now all you need to do is advertise your .torrent file or page. http://wiki.etree.org/ has a taper-friendly links page, and most likely if you are interested in sharing files this way you're probably on a few trading lists anyway. So I guess you know where to advertise your page. My experience has been that some lists produce better responses than others - the most effective method has been posts made to the etree announce list. Hopefully downloaders will then start to connect. You want them to stay connected even after their download has finished, so it's a good idea to give some information on your BitTorrent page about how to use the program effectively, and to ask people to kindly stay connected even when they get to 100%. Maybe when people have more experience and better understanding of BT, this will happen more frequently, but I am seeing a lot of times folks reaching 100% then disconnecting almost immediately. So long as there is at least one downloader at 100%, others will (eventually) get the complete fileset. How quickly will depend upon the upload offered by the "primary" downloader, and the number of connections. It saddens me to see 5 completed downloaders abandon their connections leaving 3 or 4 remaining downloaders served by just one completed downloader. The BitTorrent tracker offers some feedback. If you connect to the tracker with your browser you get to see the "hash infos"; which are 20-character strings that only your computer can make sense of. As BitTorrent evolves there will be improved feedback from the tracker, but I hacked my tracker a little bit and I'm sure Bram will come up with something better before long. Check the "Current Activity" links on Smiler's BitTorrent page to see how I made it a little bit more useful, or check my BitTorrent tracker for the standard feedback.

Share this post


Link to post
Share on other sites

Hmm... you didn't copy this right? It's sort of a coicidence that http://forums.xisto.com/no_longer_exists/ has the same tutorial. Please verify that you wrote this. Thank you!

Edit: I approved this post, because there is a possiblity that the URL owner is the same person. However, Please verify! To people who copy: We have ways to detecting copyright. Please limit your posts to only the ones you have authored. To author: You should remove this post if you have not written it.

Edited by Dooga (see edit history)

Share this post


Link to post
Share on other sites

POST COPIED!YOU RECIEVE A PENALTY OF HOSTING CREDITS WORTH 44 DAYS!A POST IS SAID TO BE COPIED IRRESPECTIVE OF THE OWNER OF THE POST OR ARTICLE. BECAUSE A POSTER GIVES A PART OF THE COPYRIGHT TO THE OTHER SITE WHEN HE POSTS. NO FURTHER REASONS SHALL BE ENTERTAINED.TOPIC CLOSED!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.