foreversd / forever

A simple CLI tool for ensuring that a given script runs continuously (i.e. forever)
http://github.com/foreverjs/forever
MIT License
13.88k stars 944 forks source link

How to achieve the following to run the forever script as Sudo #613

Open sahanDissanayake opened 10 years ago

sahanDissanayake commented 10 years ago

https://www.digitalocean.com/community/tutorials/how-to-use-pm2-to-setup-a-node-js-production-environment-on-an-ubuntu-vps#run-your-app-using-pm2,-and-ensure-that-your-nodejs-application-starts-automatically-when-your-server-restarts

These guys say it is not good to run the script as root. Please tell me how I can achieve this ?

Thank you.

adamotte commented 10 years ago

Look at this article http://syskall.com/dont-run-node-dot-js-as-root/

indexzero commented 10 years ago

We're going to be changing the default foreverRoot in 1.0.0 to: