Create your own torrent download server - Part 1
Thursday 26th Novemember saw my media server (an old desktop running XP SP2) give up on me. The harddisk that the OS was installed on was corrupt with a boot becoming impossible because some of window's key files like HAL.dll were missing/corrupt. I soon realised that the disk was finished. But it didn't matter too much because all of my media was installed on an external HD and a second internal HD in the machine.
I like to keep up to date with some of the shows that air in the US before they are shown in the UK. I use Xbox Media Centre to play back the stuff I download, with the "media server" merely serving up the files accross my network. I have a modded Xbox (not a 360) that allows me to play my "backup" games and also allows you to use the Xbox as a media centre.
More info here http://xboxmediacenter.com/
I found myself logged on to my trusty old "media server" all of the time, downloading these shows using the Bittorrent protocol. I've always wanted to have a client that would run as a windows service that I could administer remotely and would not require me to have a User ID logged onto the opperating system 24x7.
It seemed like the perfect time to try and find the solution to this little problem as I rebuilt my machine.
I decided to install a copy of Windows 2003 on my media server, using the same approach as before with the OS on a separate disk. Over the last 4 years I have used most of the torrent clients, the best one being uTorrent. It doesn't have an installation package, require Java, or screw up my router.
As luck would have it when I went to http://www.utorrent.com/ , to get the latest client, they had announced the release of uTorrent WebUI on public beta. This was great news, the remote administration angle looked like it was sorted.
What next? Okay, so if I could just get uTorrent running as a Windows Service on my machine that would do!! With a bit more digging, and downloading The Windows 2003 Resource Kit I found the solution. Using two of the tools that I had downloaded you can configure pretty much anything to run as a Windows Service. See Part 2 of this article to find out how.
You don't need Windows 2003 Server you can do this on XP, so keep reading
I'll walk you through configuring this, starting with uTorrent WebUI.
Install uTorrent WebUI
This is pretty easy, it doesn't have a complicated install process and configuring the WebUI is straight forward. Download the app. You can find it here http://download.utorrent.com/beta/webui_v0.310_beta_2.rar
Once you've downloaded this rar file, get it unpacked on your desktop. You'll find a number of files in the archive. Create a folder for uTorrent, possibly C:\Program Files\uTorrent and copy the utorrent exe into that directory. You could rename it as well. Setup shortcuts etc and run the app. If its the first time you have run uTorrent it will ask you a few questions. Basically associate uTorrent to .torrent files, make it the default client, and don't choose to start it when you logon to windows.
These can be altered in the preferences menu, navigate there now and make sure that Start uTorrent on system startup is unchecked in the general section. The preferences are stored per user so make sure that you are logged on as the user you intend to run uTorrent under when it is installed as a Windows Service. See part 2 of this article on how to do it.
Now Click Start -> Run and enter C:\Documents and Settings\User Name\Application Data\uTorrent at the prompt
This opens uTorrent's appdata directory for the user who's logged on and the service that will run the app. From the downloaded rar file, copy the file webui.zip into this folder. Don't unzip it.
Okay, rather than type I've screen shot all the preferences screens from my install.
Once you've configured it, close the preferences dialog box and fire up your web browser. You don't need to do anything with IIS. uTorrent listens on the port you specify in WebUI section for HTTP requests and serves up the web front end to you browser.
You should now see uTorrent in your browser.
Okay time for a break - come back for part 2, installing uTorrent as a Windows Service
A self confessed Microsoft bigot, Paul loves all Microsoft products with a particular fondness for SQL Server. Paul is currently focusing on Web 2.0 patterns and practices and is always looking for better ways of doing things.
I love the .net platform, and I find it to be the most productive toolset I have used to date.