Problem with OPC UA when starting Node-Red as a service

4 Nov 10:52:59 - [info] Node-RED version: v4.0.9
4 Nov 10:52:59 - [info] Node.js version: v22.9.0
4 Nov 10:52:59 - [info] Windows_NT 10.0.14393 x64 LE

I have created a service for Node-Red using nssm. If I start the service manually, everything is fine. If I reboot the machine and the service is set to Auto, the construct new address space for OPC UA does not happen. I have logs of both types of starts. The only thing different in the logs is the following lines do not happen on reboot. I am using the same account for manual and auto. The account being used is a local admin on the server.

4 Nov 10:53:07 - [warn] [opcua-compact-server:f601d747be80e903] construct new address space for OPC UA
4 Nov 10:53:07 - [warn] [opcua-compact-server:f601d747be80e903] construct new address space for OPC UA
4 Nov 10:53:07 - [warn] [opcua-compact-server:f601d747be80e903] construction of new address space for OPC UA done

Are you using the same account for manual testing and for the nssm login service? Does the command in nssn specify the same working as when you run manually?

Yes, I am using the same account and the same service. If I reboot the server and the service is set to auto, it does not create the OPC UA address. If I stop the service and restart manually, it works.

Hmmmm

Maybe try setting the service's startup type to "Automatic (Delayed Start)"?

Are you sure the service is using your account and not the service/system account?

I tried the delayed start. It still does not construct the new address space for OPC UA.

Yes, I am sure it is using my account. I can see it in the setup of the services window.

But what user is set in the nssm dialog? That's the account that runs node-red. The account set in the service runs nssm.

Is this what you are referring to?

If so, then yes, it is the same account.