Host a blogging platform with Ghost CMS

Content Management Systems (CMS) are a vital tool for facilitating the management of web content both on the web and in the enterprise.

I have seen first hand both approaches, and have come to appreciate the efficiency and manageability that CMS systems bring to the table.

Just a few years ago, one of the teams we work with in my day job shunned the usage of a CMS in favor of writing a customized stack for authoring, data management, API and rendering.

The use case was for authoring and managing static pages on our corporate site.  Sounds like CMS functionality doesn't it?  And that begs the question...

You know, why use one of the large number of existing tools that are readily available, free of charge, open source, widely used, and proven CMS options out there?  It would be better to spend our limited development budget developing and maintaining a CMS like thingy from scratch, right?  Right?

Well, in hindsight, this ill advised attempt to code functions that a CMS handles very well from scratch ended looking like a very obvious bad decision.  Not that a lot of people at the time didn't see it coming either.

Anyway, others can make a better case as to why CMS systems are a total win for the many use cases where it is the right tool.  The easiest way to start a blog is to sign up for free hosted blogging platforms like Blogger, Wordpress, Medium, etc.

This is a tech oriented blog, so if you are reading, you are probably just as excited about hosting your own open source CMS stack on the cloud, as you would be about using a one of the free hosted services.

So if hosting your own blog sounds like a good idea...  Read on for more info on my experience setting one up, because doing this is easier than ever these days.

Step 1:  Choose your weapon


The free open source CMS landscape is vast and rich.  There lots of options out there, but I didn't want to go with something heavy like Drupal, Django, or Wordpress.  It seems like overkill for setting up a small blog for personal use, so getting something lightweight was a priority.

The majority of options use PHP and MySQL, but I wanted something that was not only lightweight, but "hackable" and that preferably used Node.js (Have been doing a lot of work with Node.js in the last 6 years with very good results).  Ghost is fits the bill, as it is hackable, open source, and written in Node.js.

Granted, this is not the best way to choose the right tool for the job:  Basing it on the underlying platform that the code is written in.  But my own use case was for a small personal blog, so almost any platform would do the job.  And since this is a personal project of mine, for fun and learning, why not?

If on the other hand, you need to host a blogging stack on the cloud and have more stringent requirements, please do your due diligence, evaluate the options and make an informed decision.

So Ghost CMS it is...

Step 2:  Host it on the internet

The assumption is that you have a Virtual Private Server instance with one of the many capable and reliable hosting providers out there.

If you have a Linux Virtual Private Server (VPS) instance, the simplest route to getting Ghost installed, configured, and hosted is to head to Dockerhub and find an image that suits your need.  The Ghost CMS project maintains an official image that is kept up to date and seems to be updated very frequently.  Sounds good so far!

You can run the following command line in your VPS (With docker installed) and have your instance of Ghost CMS up and running in under 1 minute:

# mkdir data
# docker run -d --name ghost -p 3001:2368 -v ./data:/var/lib/ghost/content ghost:latest

Now you can point your browser to http://{your-vps-domain}:3001 and be greeted by your running Ghost CMS instance!

Easy as pie.  No installation hassles, dependencies, other containers.

Step 3:  Configure your CMS

Now that you have your Ghost CMS instance up and running on the cloud, you will see a green button labeled "Create your account".

After clicking on this button, the CMS will guide you through the process of creating your account, setting up an initial team of bloggers, choosing a theme.

From here on out, the system is pretty intuitive I have to admit.  Play around with the various menu options, rearrange the navigation, post new content, etc.  Have fun and learn your way around.

Final thoughts

If this looks simple it's because it is.  The installation is relatively lightweight with an image size of 434MB total.  The image uses sqlite as a backend, so there are no other dependency containers to install.

I am hosting this personal blog on a VPS using the method above, and have not run into any issues so far.  Things work pretty well and the system is a bit of a joy to use.

This blog is just the latest addition to my personal production VPS on the cloud.  It costs me $US 4.50/month to run the VPS, and I have outfitted it with some niceties like a Traefik reverse proxy, and admin panel with Portainer, and other apps for my personal use.

PS.  I may write post in the near future on setting up a Traefik reverse proxy on your cloud server.  It directs the traffic to all my containers and provides sub domain routing as well as automated TLS secure traffic through Let's Encrypt seamlessly.  Really cool stuff.

Nixon Cheaz
I am a technical lead in the area of Site Search and an engineering manager for a large Fortune 500 technology company by day.
Cary, NC USA