I have installed node-red on a windows 11 PC which is running 24/7. Node-red is started by the autostart function of windows.
Problem is, node-red will closed automatically without any failure in flows or the installation itself.
Result of checking was, at the same time the internet connection was disconnected and re-established by the provider automatically during night time. That happened several times in the last weeks.
Is it possible that Windows make a reset of user rights as result of the new internet connection? The windows auto update function is disabled btw.
Is there any way to keep node-red running by using and "auto restarter" which is checking wheater node-red is running all time? In case node-red was stopped it should be restarted automatically.
You need to view the Node-RED logs to see what is going wrong.
Yes, there are several ways on Windows. It is easier on Linux though.
Run node-red as a service by registering it using the nssm app.
Run it using the Windows scheduler with the appropriate auto-restart options.
Run it via PM2.
Run it behind IIS (as a reverse proxy) using iisnode
I don't run my live service using Windows. My Windows PC is a dev PC for Node-RED and I use PM2 which has the advantage of not only making the Node-RED logs easier to deal with but I can use its watch capabilities to auto-restart Node-RED when I change config or node package files.