Laggboxx Lives Again: An Easy to Setup Bittorrent and Web Server
August 16, 2007 § Leave a comment
For the last couple of weeks, I’ve been having what I call end of summer blues; you know, when you know that school is very close, and theres is still a part of the summer, but you don’t know what to do with it. The symptoms include oversleeping, lack of interest in topics that previously made me go gaga, and never knowing what to do, might it be on or off the computer. Hell, even a game which is supposed to be addictive like World of Warcraft now seems boring. I just had to create some work for myself, something to distract myself until the school year starts, where I would dive very deep into my CCNA course which promises to be very interesting. Of course, I do have on very exciting hardware project underway, Fr0stByte, but since I ordered everything on ebay, I have to wait at least 14 days for paypal and UPS to do it’s magic, and that’s 14 days of boredom. So what if I worked with what I already have… *Stares at sister’s PC*… excellent…
The box (Compaq Presario with Celeron 1.7 ghz, 384 MB RAM, 80 GB HDD), very appropriately name LAGGBOXX, was already running Windows XP SP2, with a hillbilly install of XAMPP, Peerguardian and uTorrent, crudely daemonized to meet my webhosting and Bittorrenting needs. I was many times the subject of many lulz for running a webserver on Windows, for security issues and shit, and the only response I could give to that was that I was that my n00b of a sister was using the box for browsing the j00tubes at the same time that I used it as a server. Plus, using windows was a just a pain in general : SMB shares were unprotected, I couldn’t manipulate my htdocs folder as easily as in Linux, because of the absence of bind partitions, and it just sucked in general.
The inadequacy of Windows as a server, coupled with my boredom and the taunting presence of Fedora installations CDs right beside me led me to undertake the task of installing Linux and all types of crap on it, as to make it THE server available from the internet. For very long, I have had my services scattered about on 5 boxes around my land, but this system being the strongest system that I had potentially full access to, I decided that it would host pretty much every service imaginable. Basically, I would be turning the box into my very own workhorse and gateway to the internet.
My original plan was the following: to install some half-assed webserver package (again, XAMPP comes into play), outfit that with some console or deamon bittorrent client that comes with a WebUI, so that I can easily manage my torrents from any PC with an internet connection. I would the completed torrents directory of my bittorrent client to the /torrents directory of my webserver, all that protected with either a special Apache config, or plain old static .htaccess file. Slap an entry to make it SMB accessible, for easy LAN retrieval of my files, and you’ve got a system that fully leverages the speed of Bittorrent downloads and the methods of retrieval that we know and love: CIFS and HTTP.
Pretty much everything turned out to work just fine, to the exception of finding a daemonized bittorrent client with a web UI, which led me to find an even better solution: Torrentflux. Torrentflux is a PHP powered bittorrent client, which means that it doesn’t just have a PHP interface available for it, but it’s web interface is the only one available. Althought it doesn’t have the full range of features that say… uTorrent has, it still remains a pretty cool little client. It’s user system means that I can give some accounts out to my buddies, and with the web integration, I can let them download their files once it’s finished. The result is a neat solution that doesn’t rape the system resources that my laptop has. The fact that the client is contained in only a couple of PHP files means that it only takes up some place in my htdocs folder, and that it doesn’t need a specific entry to rc.whatever files to run, since the only thing it does is hijack Apache and PHP modules. This also means that I don’t need to access the torrent WebUI on a seperate port, just a sub-directory will do, which means less ports open, easier access, less logistics to worry about, etc etc etc.
Other than that, this little project has given me an awesome idea: a complete one click, interactive, uber-noob friendly install script that could make my sister capable of installing XAMPP, and with a little bit more research, maybe even the whole package including SMB share setup, one touch Torrentflux install, etc. For now, I’m working on a XAMPP only setup script, but expect the other scripts in a near future.