How to Install Ghost & Host on Github

I just moved from blogspot to Ghost bloggin platform. Mainly because of its simplicity and how minimal it is. I'm using the self-hosted option as I have to write posts on my localhost instead of going to Ghost website itself because its free. Additionally, because I like doing things the hard way :D That's how I roll.

Using Github Pages to host my blog is free and convenient. There is a lot that can be experiment here such as installing themes, plugins etc because it is open source. I write most of my posts in Markdown format because it looks more readable in raw and I can write faster. If you are one this kind, you would want to try Ghost to blog.

This guide uses Ubuntu 14.04 as a prerequisite.

Installing Dependencies

Install node.js and npm.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Download and install Ghost. Checkout this link for latest release and replace wget command.

wget ""
unzip -d ghost
cd ghost
cp config.example.js config.js
npm install

Start Ghost in

npm start

Navigate to for your Ghost Admin panel.

Create a new post if you'd like to.

Hosting on GitHub Pages

Install Git and setting up an account for git command environment. Please create an account on Github first before doing so.

sudo apt-get install git
git config --global "YOUR NAME"
git config --global "YOUR EMAIL ADDRESS"

Go to and create a new repository. Name it something like This will be your Github static website URL.

After that, create a new branch called gh-pages. This branch will host your static webpage.

Configuring Buster

Buster is a tool for generating a static site for Ghost. You can't literally push your Ghost source code into your repository as Github Pages won't render it. Instead, create a static webpages in order for Github Pages to host. There will be no admin backend for this. You'd want to write your posts on

Install pip. A python package management.

sudo apt-get install python-pip python-dev build-essential
pip install --upgrade pip
sudo pip install --upgrade virtualenv 

Install Buster via pip

pip install buster

Generate Ghost Static Site via Buster

Start your Ghost blog on by npm start. While it is still running, create a new directory outside of your Ghost directory and call it blog-static or something. cd into it.

Setup Buster.

buster setup

When prompted, enter the address of the GitHub repository URL you just created.

Start generating static site.

buster generate --domain=

This will generate a static site based on already running Ghost on under a newly created directory called static. Switch into the subfolder by cd static and do the following to push static site to your Github repository.

Inside blog-static/static dir,

git add --all
git commit -m 'commit message'
git push -u origin

Alternatively, you can just skip the git command and use buster deploy in the static directory and buster will upload it.

Adding a Custom Domain

  1. Buy a domain (eg.
  2. In A Records, point to or
  3. Add a CNAME Records pointing subdomain such as or to your * repository.
  4. Push a CNAME file in your repository using the following command: buster add-domain <domain here>. This will create a file called CNAME in static/ folder.
    • Make sure domain doesn't have http:// when adding it
  5. buster deploy

Blogging Workflow

  1. npm start on aimanbaharum-blog/
  2. write posts on localhost:2368/ghost
  3. switch to static dir aimanbaharum-static\
  4. while running buster generate --domain= (creates static site in /static)
  5. buster deploy on aimanbaharum-static/
  6. Or in static/,
	git add --all
	git commit -m "message"
	git push -u origin

Show Comments

Get the latest posts delivered right to your inbox.