How to install Ghost blog in Ubuntu


In this article i will show you how to install the Ghost blogging platform in Ubuntu using Node and Nginx web server.

Ghost is beautifully designed blogging platform, completely customisable and completely Open Source, as a matter of fact the blog you are on right now is using Ghost.

Ghost will let you write and publish your content, giving you the tools to make it easy and even fun to do optimized for speed and with multiple themes to choose.

Step 1

Logging in to your server

ssh [email protected]
Make sure your OS is up to date.
sudo apt-get update
sudo apt-get upgrade

Once that is done we will install NPM and Node JS from the chris-lea Node repository.

NPM is the package manager for JavaScript we will use it to get all the dependencies for your Ghost installation.

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
sudo apt-get install supervisor

Step 2

Installing Ghost

npm update
npm install ghost

Now we setup supervisor to autostart our Ghost blog on boot

sudo nano /etc/supervisor/conf.d/ghost.conf
command = node /home/user/node_modules/ghost/index.js
directory = /home/user/node_modules/ghost
user = user
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/ghost.log
stderr_logfile = /var/log/supervisor/ghost_err.log
environment = NODE_ENV="production"
sudo service supervisor start
sudo supervisorctl start ghost

Step 3

Install and Configure nginx

sudo apt-get install nginx
sudo rm /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/ghost
server {
        server_name **Your Domain Here**;
        access_log /var/log/nginx/ghost.log;

        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header HOST $http_host;
            proxy_set_header X-NginX-Proxy true;

            proxy_redirect off;
sudo service nginx restart

Step 4

Configure Ghost

go to your ghost url

And Create your account
Ghost Blog

Ghost Blog

10$ off on me with This Link, if you don't have your own server visit DigitalOcean servers starting at 5$ a month
10$ off on me with

Mike Howell

I consider myself a technologist, a programmer, and free software activist who is addicted to series of free software projects including Linux, GNOME, Debian, Ubuntu, and Red Hat.

Vancouver, Canada

Subscribe to UbuntuBoss: Easy Ubuntu Tutorials | How to for Ubuntu Linux

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!