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

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?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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.