Running a Ghost Blog on Hetzner's Ampere® ARM64 Cloud

The ARM-architecture is gaining more and more traction. In this post, I’ll show you how you can run a Ghost instance in the new Hetzner Ampere® Altra® cloud.

Running a Ghost Blog on Hetzner's Ampere® ARM64 Cloud
Source: Oracle

In this post, I’ll show you how you can run a Ghost instance in the new Hetzner Ampere® Altra® cloud. The setup process is very similar to hosting on the standard x86-architecture. As a fun fact, this blog is also a Ghost instance, and it’s also hosted in Hetzner's Ampere cloud.


Why should I choose ARM over x86?

There's a big price incentive. Let's compare the cloud pricing for Hetzner's x86 and ARM64 cloud:

x86 Cloud

This image shows the specs for the lowest cloud tier with IPv4. For under €5 you get quite some power compared to similar services like DigitalOcean or Linode/Akamai. Now, let's compare it to the Ampere® tier (which – by the way – costs the same):

ARM64 Cloud

For the same price, you get double the vCPUs, RAM, and disk space. Plus, the ARM architecture tends to be more energy efficient, which helps out our planet too.

Other cloud providers like Oracle also offer lower-cost servers running on ARM (even in "Always Free" tiers), so if you're searching for cost-efficient hosting, maybe take a deeper look at ARM cloud offerings.


Prerequisites

  • You'll need a Hetzner Account
  • You'll also need a domain name for your instance. I recommend Cloudflare Registrar as they offer domains for wholesale prices without any markup
💸
Want to save €20? Sign up with my affiliate link to get €20 in credits for your Hetzner account (new customers only). Sign up to Hetzner Cloud →


Creating the server

Once you're logged in to your Hetzner Cloud Console, add a server to your project of choice. Choose the following:

  • 🇩🇪 Falkenstein – eu-central
    (As of writing this article, this is the only location where Hetzner offers its ARM cloud)
  • Ubuntu 22.04
  • Shared vCPU Arm64 Ampere

Then choose a tier. I went with the CAX11 tier, as it's unbeatable for its low price. You can configure the rest of your server as you desire.


Setting up Ghost

Like I said before, the setup process is very similar to how you would host a Ghost instance on the standard x86-architecture.

In general, you can follow the official installation guide. I recommend changing the following steps:

1. Install build-essential

It's possible that you might run into issues, if you don't install build-essential like this:

sudo apt install build-essential

This may be ARM specific and is therefore not in the official Ghost installation guide.

2. Install the correct Node.js version

I recommend installing Node 18 instead of Node 16, as it's newer and also supported/recommended by Ghost. Here are the supported Node versions.

# Add the NodeSource APT repository for Node 18
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash

# Install Node.js
sudo apt-get install -y nodejs

3. Fix MySQL connection problems

In the Ghost installation process, set the MySQL hostname to 127.0.0.1 instead of localhost, as localhost could cause connection issues between your MySQL database and your Ghost instance.

I was also getting an Access denied for user 'root'@'localhost' error. To fix this error, if you get it while trying to start your Ghost instance, run the following commands:

# Open mysql
sudo mysql -u root

# Reset the password (Change <YOUR_PASS> to the MySQL password you set in the Ghost installation process
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<YOUR_PASS>'; 

# Exit mysql
exit

# Restart mysql
service mysql restart

Then start/restart Ghost to see if the error is gone.


That should be all! 🎉 If you're like me, you always run into multiple errors while installing Ghost, but there are tons of answers on the Ghost Forum for any issues or errors.

I hope this little guide was able to help you with the majority of errors that occur when hosting Ghost on ARM.


Final thoughts

I'm really excited about the new ARM64 cloud by Hetzner and the possibilities it comes with. I cannot stress enough how satisfied I've been with Hetzner for years. If you'd like to support me and my work, make sure to sign up to Hetzner with my affiliate link.

I hope you'll have fun with your new ARM Ghost instance! ❤️

This post covers my own opinion. I was not paid by Hetzner for this post. I only receive a credit to my Hetzner account when you sign up with my affiliate link.