I am tired of WordPress

I’m sure that sentiment is shared by more and more people every day. It is a heavyweight contender that no longer fits the leightweight blogger battles. This is my simple attempt to install something different.

The obvious benefits of Ghost, from my limited experience, have been:

  • the simple markdown editing
  • ease of installation (for people with Linux experience)
  • wonderful mobile support (mostly for tablets)

Update!!!

I primarily use the method described by [5] instead of the rest of it because it is a lot more secure.

You will still need to do a couple of the fixes listed here, but I will move them up for convenience:

  • Delete the default nginx symlink: sudo rm /etc/nginx/sites-enabled/default

Prerequisites

  • have a running Ubuntu 13.10 with root access
  • update apt-repo: sudo apt-get update
  • install the basic packages: sudo apt-get install -y build-essential

Steps to Install Ghost

  • Install the basic Ubuntu Packages required: sudo apt-get install -y nodejs [1]
  • Download the ghost package: curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip [2]
  • Unzip the ghost package: unzip -uo ghost.zip -d ghost
  • Change into the ghost directory: cd ghost
  • Create a symlink of /usr/bin/nodejs to /usr/bin/node [3]
  • You may also need to install sqlite dev libraries: sudo apt-get install libsqlite3-dev
  • You can now run npm install --production
  • To run ghost run: npm start
  • You can modify config.js to have an external-facing IP (such as 0.0.0.0)

Steps to Deploy Ghost

  • Install nginx: sudo apt-get install nginx [4]
  • Create and edit the file: /etc/nginx/sites-available/ghost.conf
  • Enter the following into the file:

[code lang=text]
server {
listen 80;
server_name example.com;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
}
[/code]

  • Change server_name to your domain
  • Symlink your config file from sites-enabled:

[code lang=text]
sudo ln -s /etc/nginx/sites-available/ghost.conf \
/etc/nginx/sites-enabled/ghost.conf
[/code]

  • Delete the default nginx symlink: sudo rm /etc/nginx/sites-enabled/default
  • Restart nginx: sudo service nginx restart

Secure Ghost and Server

Check out this website to know how to do that.

Sources