From ArchWiki
Jump to: navigation, search

Ghost is a free and open source blogging platform written in JavaScript and distributed under the MIT License, designed to simplify the process of online publishing for individual bloggers as well as online publications.

AUR installation

Install ghostAUR, and modify /etc/webapps/ghost/config.js. Then start ghost.service. If you are happy with it, enable it for automatic start when the system boots.

Visit for final configuration.

Custom installation


This instruction will guide you through the installation of Ghost using nginx as web server.

Install nginx, npm, sqlite, python2, base-devel, unzip and nodejs.


Now it is time to configure the web server to act as a proxy of your blog. In the server block configuration file of nginx (etc/nginx/nginx.conf), change the location lines to the following:

location / {
       proxy_set_header   X-Real-IP $remote_addr;
       proxy_set_header   Host      $http_host;

Create the ghost user and directory for ghost:

$ useradd -r -s /bin/false ghost
$ mkdir -p /srv/http/

Now start the nginx.service.

Install GhostAUR or grab the latest version of Ghost from, install it manually and change into the extraction directory::

$ curl -L -o
$ unzip -d /srv/http/
$ cd /srv/http/

Temporarily link the python path variable to python 2 instead of python 3: First create a dummy folder:

$ mkdir ~/bin

Then add a symlink python to python2 and the config scripts in it:

$ ln -s /usr/bin/python2 ~/bin/python
$ ln -s /usr/bin/python2-config ~/bin/python-config

Finally put the new folder at the beginning of your PATH variable:

$ export PATH=~/bin:$PATH
Note: This method of changing environment variables is not permanent and is only active in the current terminal session.

Install ghost - you do not need this step when you have installed it from the Arch User Repository:

$ npm install --production

Start ghost:

$ npm start --production

Done! Open the browser and go to or the IP of the device you installed ghost.

Creating a service

Note: You do not need this step when you have installed Ghost from the Arch User Repository.

If you want to run Ghost in the background, you have to create a service. Create a new service unit for the local system:

Description=Ghost blog

ExecStart=/usr/bin/npm start --production /srv/http/  
ExecStop=/usr/bin/npm stop /srv/http/  


Change the owner of the blog directory and start Ghost:

$ chown -R ghost:ghost /srv/http/
$ systemctl start ghost-example-com

If everything is working fine, you can enable the new unit ghost-example-com as well as the webserver nginx.service.