For the last two years, this blog lived in shared hosting over at DreamHost.
This worked great. I had never had my own domain or server-in-the-sky. There’s a learning curve to this “now your stuff lives out there” experience.
But I learned, and shared hosting grew constricting.
I wanted to run ZNC to keep up with the office chitchat. This is rightly verboten under DreamHost’s shared hosting plan.
Why not move to a VPS? Because $$$. Every plan I found cost as much as my home Internet connection does per month, if not more. I can’t justify that for hosting a mere blog.
$5/mo VPS. A sweet little server all to my self, at half the price I was paying for shared hosting. My fingers itched to make the jump, and the first weekend after I learnt of it, I started moving in.
I dove headfirst in. All options are Linux. I’m not wedded to anything; I’ve used some Ubuntu on and off for the last several years, because that seems to be everyone’s favorite distro for VMs. But I have the teensiest host Digital Ocean offers, and Ubuntu is far from my notion of svelte. I want a change: Arch it is.
If you’re a Machead like me, you might not be acquainted with Arch. Here is Arch in a nutshell:
- Simplicity: Provide a lightweight base which an individual user can shape to meet their needs.
- Correctness: Aim for compact, simple implementations of distro services.
- User-Centered: Hand over complete control and responsibility. Lightly opposed to “user-friendly”.
- Open: Select or build simple, open-source tools.
- Freedom: Allow users to choose everything about their system.
As someone who has flirted on and off with TinyCore Linux – seriously, why don’t people base VMs they expect others to download off something that’s only 12 MB, and only that much if you need a GUI? – this appealed to me. Hard.
I got to skip the install process and jump straight into a VM with some networking tools already installed and some details of integration with the hosting platform already worked out.
Migrating from DreamHost to Digital Ocean
So now I had a working machine to call my own, it was time to migrate everything over from shared hosting.
I only had four services to move over:
- The blog, a simple blob of static pages produced by Octopress.
- Git, which I use to provide myself with private project hosting.
- Piwik, which I use as an alternative to Google Analytics.
- Tiny Tiny RSS, about which see Farewell, Google Reader
These required a few other details:
- A web server.
- MySQL, which both Piwik and Tiny Tiny RSS rely on for external storage.
- PHP. (I’m sorry. It makes me sad too.)
The plan was to get everything up and running, then cut over DNS, then shut down the DreamHost shared hosting plan.
Arch turned out to have packages for everything I wanted to run except Piwik. Installing that is little more than unzipping an archive in the right place and rigging up your web server.
Key to all this is the web server.
Instead of Apache, I went with Nginx - it seems lighter, and I didn’t want to mess with Apache’s configuration files.
I’d never used Nginx before, but it turns out that enough web searching can vanquish most any ignorance these days.
Most everything went fine once I found the alphabetical list of directives, but debugging what stanza handles what can become a pain. Fortunately, it’s a pain with a handy solution, as detailed by Justin Carmony in Debugging Nginx Configuration Trick:
- Want to see some output to verify you’re tickling the place you thought you were when visiting a URL?
google.com/?q=(your debug message here):
redirect ^ http://www.google.com/?q=HELLO! last; break;
To Be Continued
I reckon that’s enough for today. I plan to go over some more of the gory details in future, because they might help someone else the same way a smattering of random blog posts from all over the ‘net helped me.
Share and enjoy!