BIP KB:
How To Keep Ghost Running With pm2
Article By steve
![]() |
Introduction to GhostWhen 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
pm2
some other useful pm2
commands are:
pm2 status
pm2 stop
pm2 monit
pm2 logs
pm2 status
command will allow you to see some useful status. Three useful things to note from the command will be theid
,Uptime
, anderr logs
columns. These are very valuable.
The
pm2 logs
command will give you live output.
And the
pm2 monit
command 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
Spin Up A VPS Server In No Time Flat
Simple Setup
Full Root Access
Straightforward Pricing
DEPLOY A SECURE VPS SERVER TODAY!Leave a Reply
Feedbacks
![]() This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. |