BitTorrent is a downloader which uses a peer-to-peer protocol.
Under Debian, just install the following packages :
sudo apt-get install bittorrent
You want to share files via BitTorrent, for that you need :
.torrent filesWe are showing how to share many files, acting like a server.
First, run the tracker, using bttrack :
bttrack --port 6969 --dfile dstate --logfile tracker.log
So your tracker is running on the port 6969, you can check it with your browser at http://localhost:6969 and your announce url is: http://localhost:6969/announce
Note: localhost must be replaced by your machine name to be used over internet.
The torrent is a small file ending in .torrent that is used to initialize the transfer.
To create it, just run :
btmakemetafile yourfile http://localhost:6969/announce
You should now have a yourfile.torrent file, now you just have to upload it to your web server.
Note: yourfile could be also a directory
Note: the above syntax did not work on a debian machine, this syntax did:
btmakemetafile http://localhost:6969/announce yourfile
If your are using a Debian packaged apache, you don’t have to configure anything. If your not, add application/x-bittorrent .torrent to your mime.types.
Just create a directory named torrent, and put in it your .torrent files and your files.
Now we need to make your files available for download, by seeding it (give the complete file). For that, launch :
btlaunchmany path/to/the/torrent/directory > seeder.log
Now, if you click on your .torrent files you we be able to download the file, from your server and from other clients too and you earn bandwith !!
Your log file will grow quickly; this can be limited with the option: –display_interval <arg>, where <arg> should be 50 (or higher if it still grows too fast).
You can create shell script to automate some actions.