Install and configure Forever for Ghost

In this tutorial we will show you how to keep Node.js and Ghost running wiht Forever

Despite the fact that it is not a must have feature to run Ghost, having Forever installed might be a good idea. Forever is a small and simple CLI tool for ensuring that a specific process is running and respawn it in case it exit unexpectedly. In short, it is a good way to keep your Ghost blog running.

If you already have Node.js installed on your system you can easily install Forever using the following command:

/usr/local/bin/npm install -g forever

When you have Forever installed, please stop your Ghost process so we can start it via Forever. This can be done using the following command:

You should replace the two underlined paths to match your current Ghost installation directory and the desired log folder for your Ghost process. When the above command is executed you should see the following output:

warn: --minUptime not set. Defaulting to: 1000ms

warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms