Tuesday, November 4, 2008

FTP for the dumb

For about a year, I have been hosting mp3 recordings of my church's contemporary service on the web. I use Blogger to, naturally, organize the files in a blog, but the files them selves are stored on our old FTP spaces from someone's previous attempt at building-a-website-using-frontpage.

Or, at least, we used to.

After about a year, while trying to log in to the FTP space that had been so faithful, Filezilla began to spit out all kinds of errors. I e-mailed the providers of the FTP and they informed me that as a free subscriber to their service, we are allowed 20MB of FTP storage. We were using 1861MB. Time to come up with a quick, free, solution.

A disclaimer: What I'm about to describe should probably be implemented with Ubuntu server. But I don't know enough about command lines or configuring an FTP server to care for something as simple as this. So while I describe my quick and dirty approach, there are certainly more robust and elegant ways of doing it.

I rummaged through my garage until I found an old Compaq Deskpro EN. I threw in a second hard drive for storage, some extra RAM, and the loaded Ubuntu. It's a Pentium III, so it's too sluggish to use for every-day computing, but with enough patience, I was able to get Ubuntu usable for this task. I then installed gproftpd out of the repositories. It's a super-easy GUI for managing a basic FTP server. Going in without any experience, it took me about an hour to set up an anonymous user account, a master (full control) account, and then linking it to the storage hard drive. I also made a Samba share out of the FTP mount point, so I could dump a year's worth of mp3s from my working computer to the FTP server using our LAN. I also set up a static IP on the machine and enabled Remote Desktop on it, so I can control it from the Windows computers there using VNC.

Once the FTP server was up, I had to update the links on all the previous blog posts. I eventually used No-IP.com to link up our dynamic public IP address from our cable ISP to a freebie domain name, so that when our IP address changes, I don't have to go back through all the posts and change all the links again. Oh, and if I ever need more storage out of the FTP, I can always either add another hard drive (or replace the one that's in the server already), or I can add a second computer with a large hard drive, share it via Samba, mount it on the FTP server, and add it to the FTP space. So, in a basic sort of way, it's easily scalable.

All of this for $0, if you assume that the Compaq had no monetary value, which it didn't. This is why I can never get a break from doing work at church - crazy cheap ways of doing cool stuff that somehow works. Thanks again, Ubuntu.