Feature image of "The Easy Way To Build Your Self-Hosted Ghost Blog" post
Photo by Luca Onniboni / Unsplash

The Easy Way To Build Your Self-Hosted Ghost Blog

Want to start blogging and have your own blog ghost too? I explain here how I set up mine on DigitalOcean for cheap

Guillaume Vincent
Guillaume Vincent

Table of Contents

Ghost is a modern and intuitive blogging platform. Unlike WordPress, it does not support e-commerce and landing page creation. Ghost is focused on blogging and content creation.

Ghost's greatest strength is the simplicity it provides for writing. The experience is very similar to that of the Medium blogging platform. The difference is that you own your platform.

Once you have chosen a theme, all you have to do is concentrate on writing your articles. Ghost offers excellent performance and SEO tag optimization. In addition, it integrates perfectly with a lot of third parties.

Concerning hosting, two choices are possible for your ghost platform:

  • Managed-hosting: you don't have any maintenance or upgrades to manage. The platform is hosted on Ghost's servers. In return, you pay more for your hosting.
  • Self-hosting: you deal with hosting and you have to manage updates and maintenance of Ghost but it is cheap.

Looking at the price per month, I opted for the 2nd option. In this article, I will show you how I went about setting up my own blog with DigitalOcean. DigitalOcean is a cloud provider and official hosting partner of the Ghost open-source project.

If you are new to DigitalOcean, you can use my referral link to sign in. You will receive $100 in credit

Create The Ghost Hosting With DigitalOcean

To create the server for Ghost, we will use a DigitalOcean droplet:

"DigitalOcean Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure."

In the right sidebar, click on "Manage" and choose "Droplets":

Droplet management in the DigitalOcean console
Droplet management in the DigitalOcean console

Then click on "Create" and choose "Droplets":

Creation of a new DigitalOcean droplet
Creation of a new DigitalOcean droplet


Now you have to choose an installation image for the new droplet. DigitalOcean offers a specific image for Ghost. Quite a time-saver, isn't it? Type "ghost" in the search bar:

Selection of the ghost image for the droplet
Selection of the ghost image for the droplet

Once selected, you can customize the Ghost server:

Choose a customization plan for the new Ghost droplet
Choose a customization plan for the new Ghost droplet

The droplet image contains the Ghost server and a MySQL database instance. For getting started, I advise you to start with a "Basic" type with 1 vCPU, 2GB of RAM and 25GB of disk storage. I tested with only 1GB of RAM and the consumption quickly reaches 90%.

When your needs will evolve, you can resize the droplet. Note you can increase and decrease the number of vCPUs and RAM but that once the disk storage is increased it cannot be decreased.

For better security, use SSH authentication by key and not by password: many bots on the internet attempt brute force attacks

Configuration of the authentication to the droplet

For a little extra kick, you can have backups. I highly recommend this option!

The automated backup option for the droplet

Finish the Droplet creating by clicking on "Create Droplet".

Take notes of the Droplet public IP when creation is done. We will need it in the next section.

Configure The Ghost Platform

To configure Ghost, we will connect to the droplet from the command line using SSH.

To do this, load the private SSH key corresponding to the public one you used when creating the droplet:

$ eval `ssh-agent`
# Change the path with your own private key if it is different
$ ssh-add $HOME/.ssh/id_rsa

Connect to the VPS using the public IP address:

$ ssh [email protected]_droplet_public_ip

Once logged on the server, a prompt for the ghost configuration is displayed. You need to fill in your domain name and email for the SSL certificate:

Ghost will prompt you for two details:

1. Your domain
 - Add an A Record -> xxx.xxx.xxx.xxx & ensure the DNS has fully propagated
 - Or alternatively enter http://xxx.xxx.xxx.xxx
2. Your email address (only used for SSL)

Press enter when you're ready to get started!

Once finished, go to https://your_domain/ghost. On the welcome screen, click "Create your account":

The Ghost Welcome Page
The Ghost Welcome Page

Enter your email, create a user and password, and enter a blog title:

Creation of the admin Ghost account
Creation of the admin Ghost account

Invite additional members to your team if you want or click "I'll do this later, take me to my blog!" at the bottom of the page:

Invite your staff to be part of your Ghost blog
Invite your staff to be part of your Ghost blog

Configure Ghost Settings and Theme

On the left menu, you have the menu with the posts and elements to manage :

The Ghost interface sidebar
The Ghost interface sidebar

You can configure the Ghost settings by clicking on the gear icon at the bottom left:

Access the Ghost settings
Access the Ghost settings

You can customize the branding and theme :

The Ghost settings
The Ghost settings

Ghost offers free themes to start. You need to download the theme and upload it in the interface:

Configure a theme in Ghost
Configure a theme in Ghost

If you want a professional-looking website that supports membership and newsletter management I recommend you Aspire's themes. I am using the Krabi one.

Have good writing!

Resources

Ghost: Turn your audience into a business
The world’s most popular modern publishing platform for creating a new media platform. Used by Apple, SkyNews, Buffer, OpenAI, and thousands more.
How to install Ghost on Digital Ocean - Official guide
A full production install guide for how to install the Ghost professional publishing platform on a production server running Ubuntu 16.04, 18.04 or 20.04.
CloudBlogging

Guillaume Vincent Twitter

DevOps Engineer & AWS Certified Solution Architect. Cloud enthusiast and automation addict