Ghost up and running on Amazon EC2
I had my free Amazon EC2 instance waiting for this moment since my last use of it.
I spent my few free hours setting up a decent (I hope) theme for Ghost, and reading around what to do and what not to do to have it up and running. My main reference was the nice blog post How to set up an Amazon EC2 instance to host ghost for free.
I followed more or less all the steps suggested in the guide but there was still something missing: I wanted my Ghost blog to be running even when I am not logged in the EC2 instance.
At first I thought it could be nice to try forever but I configured my node.js to listen on port 80 and sudo wasn’t really working properly with forever (if you know how to solve the problem I’ll be happy to read how in the comments). Therefore I decided to opt for a different way: screen.
screen is a sort of VNC or Remote Desktop for Unix consoles. More technically it is a terminal multiplexer that let you run multiple console-based applications simultaneously. The best part of it is that you can leave it running remotely and come back to pick up your console sessions whenever you need:
If your local computer crashes, or you are connected via a modem and lose the connection, the processes or login sessions you establish through screen don’t go away. You can resume your screen sessions with the following command:
screen -r
Awesome! In fact what I did was just run
screen sudo /usr/local/bin/npm start --production
close the terminal and log into my ghost blog to write this post.
As you can see things kept working properly!
Note that I am running the production configuration of ghost. You have to remove the --production
argument to run the development server and use the configuration that you did following the tutorial linked above.
###UPDATE
The theme is no more called pureBuster
. It has been renamed purity
.