Migrating Ghost CMS from DigitalOcean to Hetzner

In a world where a man wants to save money and obliterate the coming oligarchy he does what no man dared before and migrates his blog from one host to another. Will he survive?

Migrating Ghost CMS from DigitalOcean to Hetzner
Photo by Gareth Davies / Unsplash. Birds migrating.
⚠️
If you're considering migrating to Hetzner, transactional mails may not work (signing up as a member, log-in links,...). This is to prevent abuse on their part but a major setback for any legitimate users. You can email them to have this restriction removed.

Where it went wrong

As every sane person does, I start my day at 5:50am, put on some Jeremy Clarkson content and enjoy my day.

Up until I realize the time has come. I need to migrate my website from DigitalOcean to Hetzner. Many moons ago, I decided to set-up this website using DigitalOcean – why? Because it has a one click set-up feature, that's why. I was a lazy, dangerous and rogue sysadmin. To be fair, it worked and I didn't need to worry.

However with ease came a price, and to be specific that price was set at €16.80/month. That was for a "Premium AMD 1vCPU 2GB ram and 25GB of SSD with 1 TB of traffic" (with backups and snapshots) ... which is arguably the worst deal I've ever made. Thank the heavens though, I had $200 worth of credits that were valid for a year, obtained through the GitHub Student Pack.

Now after talking to my accountant, she revealed to me that this would only last me 11.90 months. Which meant that after a while I would be paying that monthly amount MYSELF! Which is a terrible deal. That's as if I were to sanction myself with a stupidity tariff. Now some would say that this stupidity tariff would be warranted, considering it's me we're talking about.

The adversary

How do you reduce, fragment and OBLITERATE the cost of something? You go to a DIY shop. That's why I considered Hetzner - the prices are fair and they have servers located in the EU. Also – just look at the chart. It's better bang for your buck in every avenue, honestly DigitalOcean should be ashamed for their prices (said the guy using free credits).

Provider Cost vCPU RAM Storage Traffic
DigitalOcean €16.80 1 2GB 25GB 1TB
Hetzner €5.19 2 2GB 40GB + 10GB 20TB

Not only that, with the 10GB of additional volume I purchased from Hetzner, it meant that I could move my ghost installation files whenever I wanted to, to a new host, as this was not directly attached to the server, making future migrations, if any, much easier.

I also got free credits. Again! I promise I'm not a cheapskate, I just like a good deal. I redeemed a €25 code from one of their random blog posts I encountered. You could probably find a good deal too. Note to self: insert my own referral link here when I'm allowed and make some cash money (this was intentionally left in).

After sending them a picture of my ID and a picture of myself (I guess their support was just really excited to meet their new customer), I got on with it.

Prior to this, I did actually make a backup of my ghost server. Every single bit of it. Using csp and an SSH connection I first compressed my entire ghost installation, dumped the database and transferred it back to my laptop. This was to make sure that if something were to go wrong during the migration I'd have a personal back-up, to complete the migration with.

The outcome

After repeatedly bursting out in tears, sneezing and finally taking my allergy meds, I achieved the process in three hours time.

First, I needed to set-up the actual server which was rather easy following Hetzner's tutorial. All that was left to do, was change my DNS settings and point to the new IP address.

But migrating.. oh god that's another story, a tale I wouldn't dare to tell. A myth so mythical it haunts and daunts me in my worst nightmares.

Ghost has a handy export/import function I overlooked... whoops. This imported all posts, some settings, some routes,.. I still had to import a lot of stuff myself such as images, members and had to fix my own profile.

Probably not the recommended way of doing it but if your blog is small and you don't care that much for it – it works!

I don't plan on migrating again but at least now it's using a Docker image paired with a reverse nginx proxy and a mountable drive for easier transfer. The migration was actually anticlimactic itself, I expected for it to be more difficult but it really,... wasn't.

Conclusion

Considering the reason of the move was cost, I rang up my accountant again and here's what she told me:

Stop calling me every goddamn minute, you're insane – Suzie Sue

So, this time around I decided to do the difficult maths myself:
Hetzner: 5.19 * 12 = €62.28
DigitalOcean: 16.80 * 12 = €201.60

That's a staggering difference of €139.32. With that money saved, my bank account and I are very happy, married even.