How To Start Ghost With Forever

Article By: steve


img

start Ghost Linux BIP media The node module, forever, can be used to start Ghost in the background, and monitor to make sure it stays up. If Ghost crashes, forever will automatically start another instance of Ghost.

Installing Forever

Install forever with this command from within your Ghost directory: npm install -g forever.

Start Ghost with Forever

To start Ghost with forever, run the following command from the Ghost directory (/var/www/ghost/):
 forever start index.js
Ghost defaults to loading the development configurations from config.js. If you want to start Ghost with the production configurations with Ghost run
 NODE_ENV=production forever start index.js
 

Stop Forever

To stop Ghost with `forever, run the following from the Ghost directory (/var/www/ghost)
 forever stop index.js
 

Forever Stream Logs To stdout

 forever -f start index.js
 

Forever Log to File

 forever -l /var/www/ghost/forever.log start index.js
 

Possible Errors

  1. Error: SQLITE_READONLY: attempt to write a readonly database
Run the forever start command with Sudo or elevated privileges
 sudo forever start index.js
If the last command says it cannot find 'forever', use the full path to forever
 sudo /usr/local/bin/forever start index.js



Tags: , , , , , , , , , ,


Welcome to the healthcare-only HIPAA - GDPR compliant cloud. Exclusively hosted on a HPC environment!

Learn more or start today by choosing your secure HIPAA - GDPR compliant server's Operating System bellow and pick the package that's best for you.

BIPmd makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine, thousand or more.



Windows VPS options and add ons
Linux VPS options and add ons

>

Looking for a custom solution?

Our technicians can provide you with the best custom-made solutionss on the market, no matter whether you're a small business or large enterprise.

Get in touch

Leave a Reply



Feedbacks