Forever daemonizes the processes, there is no need for screen. From the README:
actions: start Start SCRIPT as a daemon stop Stop the daemon SCRIPT stopall Stop all running forever scripts restart Restart the daemon SCRIPT restartall Restart all running forever scripts list List all running forever scripts ... [Daemon] The forever process will run as a daemon which will make the target process start in the background. This is extremely useful for remote starting simple node.js scripts without using nohup. It is recommended to run start with -o -l, & -e. ex. forever start -l forever.log -o out.log -e err.log my-daemon.js forever stop my-daemon.js
(bold added by me). I use this in production and it works fine.
-Chad
Note we also use --pidFile so we can monitor the process with monit as well.
-Chad
Screen is really for having multiple terminals open with only 1 connection, and for working in a space that doesn’t get destroyed if you lose your connection. It isn’t designed to keep a process running in a production environment. Upstart, monit, forever, and other solutions are.
-Chad
From: nod...@googlegroups.com [mailto:nod...@googlegroups.com] On Behalf Of Matt
Sent: Wednesday, October 17, 2012 2:29 PM
To: nod...@googlegroups.com
Subject: Re: [nodejs] Forever with ssh
I'm no sysadmin, but I've created/worked on some extremely large systems (thousands of machines) and nobody running anything in production environments would ever use screen for keeping things running. It's just not designed for that. It has horrendous potential scenarios for disaster by people pressing the wrong keys. It doesn't deal with log rotation or storage or timestamping. It doesn't deal with restarting failed processes. It's designed for interactive use. It's in no way designed as a secure keep-alive system for daemons.