How to use "service ghost start" to work with forever or pm2

October 17, 2015 2.3k views
One-Click Install Apps Nginx Ghost Applications Getting Started Deployment

I have a one-click ghost app running but would like to incorporate forever or pm2 to restart the app if it fails. Is this being used by default or is there a way to start the ghost app with one of the above packages?

1 Answer

The 1-click Ghost app uses Upstart to manage the ghost/nodejs process. If you look at /etc/init/ghost.conf, you’ll see that it contains the following:

# If the process quits unexpectadly trigger a respawn

So, ghost should automatically restart if it crashes by default – you don’t need to use forever to pm2.

Have another answer? Share your knowledge.