Forever - how to running Node Red continuously

Hope to get some guidance.

We Have Node Red on AWS EC2 -Flows and Dashboard all working flawlessly.
I am not too experienced in sys adm ( coming from different background) so need so guidance.

Problem that we need help on:
1. How do we keep the NodeRed running continuosly so we can always access the Node Red app?

So far, we have tried installed "npm install forever -g:"
Then entered "forever node-red"

We get some errors about scripts, but really again. not sure what all this is about.

ubuntu@ip-172-31-28-82:~/.node-red$ forever red
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up f
error: Cannot start forever
error: script /home/ubuntu/.node-red/red does not exist.
ubuntu@ip-172-31-28-82:~/.node-red$ forever node-red
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
error: Cannot start forever
error: script /home/ubuntu/.node-red/node-red does not exist.

Ubuntu iirc comes with Systemd. The Node-RED docs contain a unit file for systemd. If you set that one up, reload, then start/enable the service you’re done. You can find it in the install instructions for local installs, then linux/raspi/ubuntu section

1 Like

Don't forget to uninstall forever which you won't need.