Category menu

Trying out the Ghost blogging platform on a Raspberry Pi

Here’s a quick guide to running the ghost blog platform on a $25 Raspberry Pi.

Pi Ghost setup

Here’s my test blog

Ghost is a new piece of blog software, currently under development which was recently funded by a Kickstarter campaign. Ghost is a completely new blog platform which aims to concentrate on writing and has a really nice minimal, instantly updating theme.

Ghost uses node.js (a new one on me) and can run on the Raspberry Pi computer. So I thought I’d put together a few instructions based on my trial and error. You need to be a Kickstarter backer to download the code, although this will be released fairly soon. 

This assumes you’re running the latest raspbian build.  

For a handy reference check out this blog and the RaspberryPi.org forum posts on running Ghost. 

First Install node.js:

sudo wget http://nodejs.org/dist/v0.10.5/node-v0.10.5-linux-arm-pi.tar.gz
cd /usr/local
sudo tar xvzf ~/node-v0.10.5-linux-arm-pi.tar.gz --strip=1
cd node-v0.10.5-linux-arm-pi
node –v

(this should display the version number to test things are working ok)

then install ghost:

mkdir ghost
cd ghost

For the next step  download and install ghost-0.3.0 from the ghost website – at the moment  you need to be a kickstarter backer – log into the Ghost website, and download ghost-0.3.0.zip onto your Pi.

unzip ghost-0.3.0.zip
sudo npm install --production
sudo npm start

(go and make a cup of tea, this takes a while)

Next open a browser on the pi and enter the address:

http://localhost:2368/

and all being well you should see an intro page!

ghostraspberrypi

The built in browsers on the pi are a bit slow for blogging (particularly if you’re accessing it via a VNC connection) so to speed things up you can access your Ghost blog over your local network:

In the /ghost directory edit the config.js file. You’ll need to know your Pi’s ip address – you can get this from running ifconfig – ideally you need to set up your Pi to have a static ip address – 

sudo nano config.js

 replace “host: ‘127.0.0.1’” with “host: ‘<your IP address>'” and “port: ‘2368’” to “port: ’80′”.

and then enter your Pi’s ip address onto another computer on your network – you should now see your Ghost blog!

If found it very occasionally slows down when setting up users, but once I started adding posts and images it worked really smoothly on the Pi. Having a window open with an SSH session is interesting to see the software updating as you edit and create posts on the blog.

First impressions? it’s very minimal, but the lack of distractions makes this feel like a very creative blog platform to use – it’s not going to compete with the likes of wordpress and drupal for building fully fledged CMS websites, but as an alternative to tumblr or blogger it has a lot of potential.

Here's the side by side view

Here’s the side by side view

Ghost’s approach will be to offer the software as a free download for self hosting, or paid accounts via the website (like wordpress).

I’m looking forward to see how this evolves in time, hats off to the Ghost team. 

Update: making your local blog available on the internet:

I’ve been making my ghost test blog available on the internet – this is handy if you want to be able to update your blog from anywhere – although I wouldn’t recommend it for a production website that might get a lot of traffic, as it’s entirely dependent on your home broadband.

This is assuming you have a residential broadband account (I’m using BT broadband). Most home accounts used dynamic IP addresses, assigned by your service provider that change each time you connect to the internet – we’re going to use a service called no-ip.com which uses a program on your Pi to find out it’s address, and update a domain to point to this address. We’ll also need to open a port in the home router to allow connections to the Pi. 

First sign up for an account at noip.com – there is a free option available, or you can opt to pay $15 a year for a service with more features.

Add a host, and choose a hostname from the list of options.

Next choose the DNS-A host option and save. The settings I’ve been using are below.

no-ip configuration for Raspberry Pi

Next, on the Pi download and install the noip software (here are the instructions from RaspberryPihelp.net – check out their page if you want no-ip to run each time you switch on your Pi)

mkdir /home/pi/noip
cd /home/pi/noip
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
tar vzxf noip-duc-linux.tar.gz
cd noip-2.1.9-1
sudo make

sudo make install
sudo /usr/local/bin/noip2

Whilst installing it will prompt you for your noip.com login details.

Finally you need to open a port in your router to allow traffic through – there is a port forwarding guide for most routers available here – I found that logging in to my router by visiting http://192.168.1.1 in my browser, finding the advanced menu and adding the local fixed IP address of my pi and web forwarding worked for me.

Hopefully if everything is working you should be able to see your Ghost blog in the wide world: my address is

ghostpi.zapto.org

although this is entirely reliant on it being switched on, which depends on the coffee machine in my kitchen needing power or not. 

 

 

,

Trackbacks/Pingbacks

  1. Running Ghost on a Raspberry Pi | Open source and Gamification - September 24, 2013

    […] platform written entirely in Javascript and running off Node.js and damn does it look sexy. Here are instructions on how to get it working on a Raspberry Pi. Can’t wait to try it out […]

  2. Add a Raspberry Pi temperature gauge to your blog - Kimondo - March 22, 2014

    […] you’re interested in hosting a Ghost blog I’ve posted some instructions here – it is a beta blogging platform based on node.js which launched last year – it […]

Leave a Reply