Introduction to Ghost
When installing manually on a VPS, most people wonder how to keep Ghost running after their terminal session has ended. There are multiple ways to do this, the most popular way currently being forever and
Note: These commands should be run from a non root user that is dedicated to running this process.
cd /path/to/ghost/folder sudo npm install -g pm2 echo "export NODE_ENV=production" >> ~/.profile source ~/.profile pm2 kill pm2 start index.js --name ghost pm2 dump pm2 startup
In the last command you will need to set the start up mode based on your operating system. For example if you are running in Amazon then your command will be:
pm2 startup amazon.
Once you have it up and running with
pm2some other useful
pm2 statuscommand will allow you to see some useful status. Three useful things to note from the command will be the
err logscolumns. These are very valuable.
pm2 logscommand will give you live output.
pm2 monitcommand will give you live status on the memory footprint.
If you want more information on pm2, here is a link to their GitHub page.
Tags: command, Status, Ghost, Keep Ghost Running, pm2, running
This work is licensed under a
Creative Commons Attribution-