Creating a torrent
From MEPIS Documentation Wiki
Terminology and functions:
- = A decentralized network created ad-hoc for distributing a file over the internet.
- .torrent file
- = The relatively small control file containing an infohash enabling a tracker to supply information to bit-torrent clients.
- = All the peers who are connected, sharing a torrent.
- = Each user who is sharing a file using a bit-torrent client, either seeding or leeching.
- = Upload to others.
- = Download for self.
- = The program each user launches to connect to others via the bit torrent protocol. KTorrent is the default BT client in Mepis.
- = Server that keeps track of who has the complete file to share, and who wants it. Other than keeping the .torrent contol file in it's database, the Tracker does not itself participate in any of the downloading or uploading activity.
- = A designated segment of the shared file for transfer. Each chunk is of equal size; size is specified when the .torrent file is created.
- = Each chunk is checksummed when it finishes downloading. If it is defective, the chunk is scrapped and downloaded again.
Creating a new Torrent for LinuxTracker.org
This how-to is for using www.linuxtracker.org, but you can apply similar steps for other trackers. To upload a torrent on LinuxTracker you need to register for an account (it's free).
1: Creating the .torrent control file
- Start KTorrent
- Go to File -> New -> In the new window, the top line will ask you to specify what file you want to make a torrent for. Use the drop-down to choose the the file you want to share. You might have to navigate to the directory of all your file-transfer files.
- File Options:
- Size of each chunk: default is 256 KB which is probably a good choice
- Start seeding the torrent: UNCHECK this. With other Trackers, you can have it checked so seeding can begin immdiately. The LinuxTracker.org database works a little differently.
- Private Tracker: uncheck. You'll be using a public tracker.
- You must add at least one tracker: type or paste in the URL: http://linuxtracker.org:2710/announce and click the add button.
- Click "OK" at the bottom.
- A new window will display with the file-list of every folder. Locate the directory containing the file you want to load. Paste the filename in the lower "Name" box - Get it exactly the same as the file-name you want to share!
- After pasting in the filename, make certain the original extension is also part of the name in the Location window. For example Check "Automatically select filename extension (.torrent)"
- Save this newly-created .torrent file to your /home/username directory or someplace from which it will be easy to locate and upload. But do not save it to the directory you have KTorrent set up to scan for .torrents! If you do that, you will screw up the whole process if you are using LinuxTracker.org. With other trackers, it might be OK, but not using LinuxTracker.
KTorrent will take a few moments to digest your file and create a torrent control file called something like: filename.iso.torrent
2: Listing the torrent:
- You must go to http://www.linuxtracker.org and sign in with your username and password. The page reloads, and under the Logo will be a blue bar with "Welcome back [username you logged as]"
- In the blue bar to right, click Upload
- A new page loads, the salient portion of which is: "Upload A Torrent"
- Torrent File: browse to your newly created filename.iso.torrent file and click to load.
- Category: If this is a MEPIS ISO, select "MEPIS" from the drop-down list.
- File Name: Paste the iso filename here.
- Description: here is a text box. The only caveat in this section is that you must use html/bb codes for mark-up <p> must go between every paragraph, <b> text</b> gives you boldface, etc.
- Screenshot: you can skip this option or add a screenshot that's representative for your file.
- Send as anonymous: ???
- click send
If all has gone well, you should be taken to a screen that says your torrent was successfully uploaded. There will be a link for you to download your new torrent.
Download? But I want to upload!
You need to take one more step. When you uploaded the .torrent control file you created in step 1, Linuxtracker assigned a unique tracker code to your .torrent control file, and that's the one everybody has to use from this point on: including you!. So click to download your new torrent, first. Put the new, Linuxtracker version of the .torrent file in your KTorrent scan directory, and KTorrent will do a checksum on existing ISO against the info in the .torrent control file, and start off listing you as the first active seed for the new torrent swarm.
Points to remember
- You don't upload the ISO itself to the tracker at linuxtracker! The ISO stays on your machine which becomes the first "server" to everyone else. As they get 100% of the file, they also become "servers." In the bit-torrent protocol, computers serving to downloaders are "seeds." When you start a torrent, you are the first seed.
- What the person who starts the torrent needs to do is this: Within the torrent file itself, when KTorrent is getting the info together to write the file, you need to specify the URL of the tracker you're going to use. In this tutorial, we're using http://linuxtracker.org/announce.php as the URL of the tracker.
- Then, after the .torrent file is made, only that small .torrent file gets uploaded to www.linuxtracker.org, via their "upload a torrent" script/form.
- When creating the .torrent file, you must specify a chunk size. Setting the optimal chunk size for your ISO involves a sliding scale. Normally, chunks are between 64 KB and 1 MB in size. The larger the chunk size, the smaller your newly-created .torrent file will be, and the faster it will be generated by KTorrent. But that means there are fewer chunks, and leechers will spend more time DL'ing each chunk. If it's bad, it gets thrown away and has to DL again. So larger chunk size can mean a slower overall conversion of leechers to seeders, slowing up the maturity of the swarm as a whole. This is why I suggest using the KTorrent default of 256KB per chunk: a happy medium for an ISO of approximately 675 MB. With approximately 2700 chunks, each 256KB chunk can be DL'd in less than a minute under ordinary speeds in a good, moderately mature swarm. And the .torrent file is only 40KB to 100KB in size --not all that large.
For steps in creating a new torrent using the Deluge bit-torrent client, see Starting a new torrent in Deluge for LinuxTracker