Website Truck Day 

(This will get a little navel gazy, so if you don’t care about how this site is hosted, feel free to skip it.)

After a little more than six years hosting this site at DreamHost, I packed up and moved it, whole hog, to a VPS instance at Linode. It was less work than I expected (all in, maybe 8 hours), but probably more work than the average joe managing a blog would want to take on. I’ll explain a bit more later about exactly what went into the move, but first …

(Truck Day is the day that a baseball team loads all their gear into trucks and heads down to Florida/Arizona for Spring Training.)

Why move?

The decision to move off of shared hosting onto my own VPS is one that I’d been thinking about for a while. Honestly, I didn’t need to move for any traffic reasons. I get a handful of hits, depending on what I write about, and don’t go out of my way to pimp anything. I was a bit frustrated with the performance of my site on shared hosting (the fact that I don’t get a lot of traffic is sort of irrelevant when you are hosted on shared hosting – you’re all, basically, sharing the same set of resources).

Mostly, though, I’m a dork and I do web stuff for a living, so I wanted a place to mess around. I wanted a box I could login to and do development work, or write occasional scripts, or host code repositories for my own work. That’s something that just isn’t terribly easy/advisable to do on a shared account. DreamHost, actually, is a shared host where that sort of thing is possible, but it’s just a little icky to do that sort of stuff on a shared box (where, if security isn’t perfect, you’re potentially exposing your stuff to other folks, and where performance is never going to be as good as on your own slice of a server).

On top of all that, DreamHost has had a bad run lately. I don’t blame them (well, I do, but I don’t hold it against them), but they’ve had outages and some security issues, and then general problems that seem to come with growth and adding complexity to a company that used to be very narrowly focused on just hosting. Not that I know anything about that. I just didn’t feel like hanging around and letting them figure it out, on my dime. It happens. Sometimes you just grow apart. Anyway …

Linode is one of the premier VPS providers (VPS being where you are renting a dedicated slice of a server, just for yourself, rather than an entire server). They’ve got good pricing, good documentation, and a good reputation.

So I bit the bullet and bought a VPS to start the process of moving.

Moving Day

Moving Day was never intended to be Moving Day. I was going to spend a week or two, getting things ready, copying over data, testing, making sure everything was happy, and then cut over one service at a time (one site, a second site, mail).

Once I had provisioned my new VPS, I started by just getting things updated with the latest patches and all (much easier than you might guess, given all of the fun package manages that exist these days). Then, using those same package managers, I set about installing a web server, various scripting languages, mysql; all of the bits that you need to run a website can be reasonably easily installed with a few commands.

(This isn’t news to me, I’m just sharing.)

The other nice bit of doing things the system way, rather than rolling your own, is that you get to take advantage of system level patches and security updates. If you’re not doing anything crazy, where you need a lot of custom modules or code compiled in, using system packages is a very, very nice way to keep yourself up-to-date.

Throwing a firewall up, and doing a few other security things, and I kinda felt like I was done my setup. In about 3 or 4 hours, I was seeing a test page, had a database, and (hopefully) had things secured reasonably well.

A Quick Note About Security

One of the great things about managing your own site on your own server, virtual or otherwise, is that you are in complete control. Want better performance? Throw up a reverse proxy or caching server. Want some cool new tool that your host won’t install? Install it yourself.

It’s a great amount of freedom. It’s enough freedom, that let me rewrite that previous sentence

One of the worst things about manage your own site on your own server, virtual or otherwise, is that you are in complete control. Forget to setup a firewall? Enjoy having all of your data deleted and your site used for malware. Leave your mail server open for relaying mail? Spend a few weeks wondering why your mail to everyone is flagged as spam.

It cuts both ways. I do this stuff for a living and even I’m paranoid I’ve done stupid stuff. Google around, ask friends, turn off things you don’t need running.

Never login to your server with a password. Always setup SSH keys and use those. Just trust me.

Back to Moving

With the server now, in theory, all configured, I figured “Well, might as well move over my static HTML site.” I keep a backup of my stuff locally (you keep a backup of your site, locally, right?), so I just SCP’d everything up to the server, and there it was.

(Well, when I say “there it was” what I really mean is “There it was, in raw HTML source, connecting through HTTP Client on my Mac, since the way some servers work—including the one I setup—is that your need to connect using both the IP and a “host”, which is hard to do through a browser until you’ve cut over DNS, and you don’t want to cut over DNS until your site is ready, and you can’t tell if your site is ready until you’ve seen it … confusing enough? Google around for adding things to your hosts file, which may be easiest for most folks.)

Since my static site worked, I went to DreamHost to cut over the DNS. I will keep my vitriol to a minimum here. For all of the good things DreamHost does, their control panel/management area blows. It really, truly does.

To change DNS, I had to turn off hosting for my website. Which means my website would go down for as long as it took DNS to show up changed around the world. That could be anywhere from a few minutes to a few hours. Awesome. Appreciate that, DreamHost.

I bit the bullet, broke my site momentarily, and waited for DNS to change. After about 30 minutes, I could see that my site was up and running on my VPS. Success!

Once that was done, I moved my blog. It’s Wordpress, it’s got some plugins, and I figured I’d need to do some reconfiguring (just to make things work perfectly in the new environment). Again, I uploaded my site (local backups, friends), clearing out the statically cached files from my caching plugin of choice. There’s the fun extra step of running a database backup (to copy it to my new site), and a couple of config changes.

A couple of quick things of note:

Again, I do the HTTP Client check, go to DreamHost, break my site temporarily, change DNS, wait for the changeover, and do the Snoopy dance of success.

All that was left was mail.

Mail is confusing as hell, there’s very little good documentation for it, and if you get it wrong, you can end up in very bad shape. My advice, outsource it to Google or any shared web host, where you can probably do it for free.

I ended up forwarding my mail (which I think I’ve gotten secured down to where it works, but won’t say for sure that I have a clue what I’m doing). This was another amazing process with DreamHost’s shit-tastic DNS tools that required an email to support, where they (without asking me) disabled my mail to point it to my new site, leaving my mail broken for 4 hours.

Not my favorite experience (especially since I was dealing with it at a basketball game), but once it was done, I was officially on my VPS.

The End?

In the end, it’s been worth it so far. It’s costing me a bit more each month (about $10/mo more, plus another $10/year for my domain renewal, that used to be free with my hosting), but my site is performing considerably faster—a few seconds per page load, on average, I’ve setup some handy things that let me manage my life a bit easier, and I’ve got a server I can pop into when I need to do some work.

It’s great for me.

I wouldn’t recommend it for most people. In fact, I wouldn’t recommend it to nearly anyone. For the average person, I’d recommend you stick with a shared web host (email me for some recommendations, if you need one). Let someone else deal with all this server crap. You focus on your site.

For me, the server crap is what I kinda enjoy.