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

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.