Setting up a Blog Using Ghost

Ghost is a fully open source adaptable platform for building and running modern online publications. With Ghost, setting up a blog is a child’s play. It gets easier with CloudSigma’s already prepared base library OS images.

To start with, I am creating a machine on CloudSigma with 5 GHz CPU and 8 GB RAM. I am naming it “Ghost-Blog” and optimizing it for ‘Linux VM’. I am attaching the image Ubuntu 16.04 LTS from the library and resizing it to 100 GB. One of the most important aspects is to assign a static IP so that if we need to restart our machine, we won’t have to go through the extra trouble of DNS Management.

Once the server is up, we move towards preparing it for Ghost installation.

For production environments, Ghost officially recommends the following stack:

  • Ubuntu 16.04
  • MySQL
  • NGINX (minimum of 1.9.5 for SSL)
  • Systemd
  • Node v6 installed via NodeSource
  • At least 1GB memory (swap can be used)
  • A non-root user for running ghost commands

On the server, we will first upgrade the package list and then upgrade the already installed packages. This would help us get updated versions of any package/software.

After making sure that all the software packages would be latest, we can start proceed with the installation.

First, we install NGINX. According to NGINX Wiki, “NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.”

This is the component which allows our data to be made publicly available by casting it to some port from where users can access it.

After NGINX is installed, we are going to install MySQL server. MySQL is an open-source relational database management system. This component would store the data of our blog.

Make sure to set a password for the MySQL server. It is recommended as Ghost does not support password-less authentication mechanism.

Next, we install Node. Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code server-side.

To Install Node v6, we first need to add NodeSource repo to our machine.

Once the repo is added, we will be able to install Node with this command.

Now that our machine is ready, we can install Ghost.

After installing Ghost CLI, I am creating a directory ‘ghost’ in /var/www/ where I can set up the blog.

Next, I am going to give ownership of the directory to my user ‘cloudsigma’.

The following command would change the permissions of the directory as recommended.

Finally, we can set up the blog. The wait is over!

 

When we enter ghost install command, following would be the output with various prompts written in Bold here.

 

Now that Ghost is set up, we can access it on the IP we had mentioned during the setup. Say, if I had used, 192.168.0.22, anyone can access the blog at http://192.168.0.22.

Further, we need to set up the Blog admin UI at http://192.168.0.22/ghost. Open this link as soon as you finish the above steps from your local machine’s web browser. Ghost Admin page would open up and would look like this:

Ghost Welcome Screen

Ghost Welcome Screen

It will prompt you to create an account. Click on the button to move to this screen where you need to create an account for the first time to access the UI. Fill all the details and move to the next page.

Ghost Account Creation

Ghost Account Creation

On the next screen, you can invite your team who will be penning down the stories with you. An email invitation would be sent to them.

Ghost Invite Your Team

Ghost Invite Your Team

When you are done, you will be logged in to the panel which looks like this:

Ghost Your Stories

Ghost Your Stories

You have various settings to personalize it further in the Settings – General, Design, etc tabs.

To write a new story, you can click on New Story on the left panel.

Ghost Quick Setup

Ghost Quick Setup

 

That’s all. I wish you lots of success with your new blog projects!

Share this Post

About Akshay Nagpal

Big Data Analytics and ML enthusiast.

Leave a Reply