The first couple of times I tried to setup Bittorrent I had a lot of trouble. Here is a basic summary of what you need to do:
btmakemetafile.bittorrent test.iso http://server.example.com:8000/announce
The above command will create a metafile named test.iso.torrent. Note that the server name (in this example server.example.com can be an IP address and any TCP port can be used (it’s generally best to use a port above 1024 to run as non-root). The “/announce” at the end of the string is vitally important, it won’t work without it – and you won’t get any usable error message! I have filed Debian bug report #511181 about this .
bttrack.bittorrent --port 8000 --dfile dfile
The above command starts a tracker listening on port 8000 and uses the file named dfile to store the recent downloader information. By default it will only allow downloads for .torrent files in the current directory, the --allowed_dir option allows you to specify another directory and the --parse_allowed_interval option allows you to specify the length of time in minutes between checking for changes to the list of torrent files.
In Debian you can edit the file /etc/default/bittorrent if you want the tracker to start on boot. There is no configuration for starting a btdownload program on boot (for seeding the data). In most cases it’s probably best to just run a couple of seed btdownload processes via screen on different servers and rely on the fact that you can login to restart them if the servers are rebooted.
The above command needs to be run on a machine that has the complete test.iso file in the current directory to seed the torrent. Probably most people will use the same machine for creating the metafile, running the tracker, and running the seed download program. But these can all be done from different machines. This is the curses version which works from screen, there is also a btdownloadheadless.bittorrent program that is designed to be run from scripts.
Once all that is done any machine on the net can start downloading via the above command.
For the seed server the most useful option seems to be --max_upload_rate to specify the maximum transmission rate (otherwise it will eat all your transmission bandwidth).