Install and Configure GHOST(blogging platform)

Steps to Install GHOST 

First, we need to install Ghost. We’ll place Ghost in the /var/www/ ghost directory, which is the recommended installation location.

Download the latest version of Ghost from Ghost’s GitHub repository using wget:


Install the unzip program with the package manager. Make sure that the system is up-to-date before installing a new program, so update the packages and install unzip with the following commands:


The -y flag in the preceding commands updates and installs packages automatically.

Once unzip is installed, unzip the downloaded package to the /var/www/ghost directory. First, create the /var/www folder, then unzip the file:


Switch to the /var/www/ghost/ directory:


Then install the Ghost dependencies, but only the ones needed for production.


Ghost is installed once this process completes, but we need to set up Ghost before we can start it.


Configure GHOST

Ghost uses a configuration file located at /var/www/ghost/config.js. This file doesn’t exist out of the box, but the Ghost installation includes the file config.example.js, which we’ll use as a starting point.

Copy the example configuration file to /var/www/ghost/config.js. We’ll copy the file instead of moving it so that we have a copy of the original configuration file in case we need to revert your changes.


Open the file for editing:


We have to change the URL that Ghost uses. If we don’t, the links on the blog will take visitors to Change the value of the url field to your domain name, or to your server’s IP address if you don’t want to use a domain right now.


The url value must be in the form of a URL, like or If this value is not formatted correctly, Ghost will not start.

Ghost can function without the mail settings; they’re only necessary if you need to support password recovery for Ghost users.

You can customize Ghost further by following the configuration details at the official site.

Save the file and exit the editor.

While still in the /var/www/ghost directory, start Ghost with the following command:




Ghost is listening on port 2368, and it’s not listening on the public network interface, so you won’t be able to access it directly.


View all posts by

Leave a Reply

Your email address will not be published. Required fields are marked *