Playing with Debian

Tuesday, 25th March 2008 at 05:44pm

Make your server run BitTorrent; it's faster than you.

One of my purposes for getting a VPS was so that I could run BitTorrent 24 hours a day, without having to leave my laptop on to do it. I could just run BitTorrent on my server and that could do all the work for me. After all, I may only have 2Gb hard drive at the moment, but I do have 1000Gb of bandwidth which I'm hardly putting a dent in. Not to mention, at home I have a one meg connection, whereas my server has 100Mbs.

It was going to work something like this: I'd start bittorrent up on the server to start downloading a file. Once it downloads it, I could get the file through SCP or FTP which would probably be quicker than me doing the torrenting myself. It's also helpful when you're downloading a rare file which only a few seeders who aren't uploading when you're machine is on; your server is always on, so it's going to be able to download 100% of the time there's an uploader.

Let's go through the steps to do that, from the beginning.

I decided to go ahead and get BitTornado, which you might have used as a client before. Get it using sudo apt-get install bittornado. Now you've got that, go to the directory you want to download the torrent to. I made a /downloads/ folder in my home directory.

Let's find the .torrent file that we want to download from. In theory, BitTornado will work with just the URL to the .torrent file, but you won't find many trackers that will give you that, instead they'll give you a URL which looks something like http://www.mininova.org/get/1218398. What you can do with that though is wget the torrent file.

Then do this:

btdownloadercursers --max_upload_rate 70 1218398

This sets the maximum upload rate of 70kb/s. Yes, you have a fast server, but you don't want to get in trouble with your providers for hogging all their pipes, so make sure you set it. The 1218398 is the torrent file that's on our machine now, since we just downloaded it.

Now you'll get an application open giving you stats and stuff about your download. You can't send this to the background using ^Z, else it'll stop it. You can quit using ^C or just Q.

The downside of this though, is that my connection is so fast, and my memory so low (64Mb, with 128 swap) that downloading at 600Kb/s crashed my server... three times. So, don't bother trying to use BT unless you have a fairly decent machine.

Comments

Your name: Your URL:

Body:

Read some previous entries