It super easy to get started with using Ghost and AWS lightsail; it’s literally a few clicks to get your instance up and running.

Ghost

Ghost is a free and open source blogging platform written in JavaScript and distributed under the MIT License, designed to simplify the process of online publishing for individual bloggers as well as online publications.

AWS Lightsail

Lightsail is an easy-to-use cloud platform that offers you everything needed to build an application or website, plus a cost-effective, monthly plan. Installing Ghost on Lightsail gives you a predictable low cost of $3.50 per month.

Prerequisites

  • Create an AWS account here. Make sure you create a new IAM user and don’t login with root.
  • [Optional] Register a domain name from somewhere like GoDaddy.com or domain.google.com. I used GoDaddy to register chrisyorkston.com
  • [Optional] Generate a SSL certificate using Lets Encrypt so your website uses https rather than http (it’s pretty much the standard these days).
  • [Optional] Create a Cloudflare account, update your nameservers on your domain’s registrar account to use Cloudflare’s nameservers, configure A/AAAA/CNAME records in Cloudflare to point to your ghost instance with the static IP address generated below. I will create a separate post about how to do this.

Create your Ghost instance

Login to AWS Lightsail and click Create Instance. Select ‘Linux/Unix’ and then the Ghost instance image.

Select the $3.50 per month plan and click ‘Create instance’

Choose your instance plan

Voila, that’s it! Your Ghost image is up and running!

Ghost instance

Create a static IP

You will need to create a static IP address as every time the instance is restarted a new public IP address will be generated.

Create static IP

Create a static IP address

That’s it, your public static IP address 18.130.162.75 has been created and is attached to your Ghost instance. Rebooting your Ghost instance will likely re-generate a new public IP address, but the public static IP address will remain the same.

Log into Ghost admin

In order to login to the Ghost admin panel you are going to need to use the default username [email protected] and a unique password that was generated in a config file when you created this instance. To access the instance you’ve got a couple of options using SSH AWS terminal in the browser (easiest) or using your own dedicated SSH terminal (a bit more long winded to setup if you’ve never done this before).

Let’s go with the easiest option; accessing your instance in the browser. Click on the orange terminal icon

By default you should be in the /home/bitnami directory.

Run:

sudo cat /home/bitnami/bitnami_credentials 

to print your password to the terminal window. Head to the ghost admin panel at yourdomain.com/ghost and pop in your credentials. Congrats, you are now logged in and ready to start creating content!

Housekeeping

While ultimately your blog is now up and running, there are a few housekeeping activities you will likely need to perform to ensure its smooth operation.

Configure the Ghost domain name

Some of default posts and links and any new images you upload and use will be using your public ip address instead of your domain name. e.g. https://18.130.162.75/tag/getting-started/ when we’d rather it be https://chrisyorkston.com/tag/getting-started/. To fix this, again login to your instance via the terminal and follow these instructions:

Ghost requires the domain name to be specified in the /opt/bitnami/apps/ghost/htdocs/config.production.json file. For example:

url: 'yourhost.com',

Set your own domain name in this file manually or change it automatically with the bnconfig configuration tool:

sudo /opt/bitnami/apps/ghost/bnconfig --machine_hostname example.com

Then, rename this tool so that it does not change again at boot time:

sudo mv /opt/bitnami/apps/ghost/bnconfig /opt/bitnami/apps/ghost/bnconfig.disabled


This is my first ever blog post, so it only felt right that the content should feature how I setup this blog in the first place. All feedback and comments are greatly appreciated, thanks for your time.