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

**URL:** <https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583>\
**Category:** General\
**Created:** [4 November 2025 20:56 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583 "2025-11-04T20:56:49Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![wstillwell](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@wstillwell](https://discourse.nodered.org/u/wstillwell)\
**Post date:** [4 November 2025 20:56 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/1 "2025-11-04T20:56:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 November 2025 21:44 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/2 "2025-11-04T21:44:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![wstillwell](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@wstillwell](https://discourse.nodered.org/u/wstillwell)\
**Post date:** [4 November 2025 21:58 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/3 "2025-11-04T21:58:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 November 2025 23:29 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/4 "2025-11-04T23:29:24Z")

</div>

Hmmmm

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 November 2025 23:57 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/5 "2025-11-04T23:57:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wstillwell](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@wstillwell](https://discourse.nodered.org/u/wstillwell)\
**Post date:** [5 November 2025 20:05 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/6 "2025-11-05T20:05:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wstillwell](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@wstillwell](https://discourse.nodered.org/u/wstillwell)\
**Post date:** [5 November 2025 20:06 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/7 "2025-11-05T20:06:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 November 2025 20:37 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/8 "2025-11-05T20:37:38Z")

</div>

> [@wstillwell](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![wstillwell](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@wstillwell](https://discourse.nodered.org/u/wstillwell)\
**Post date:** [5 November 2025 21:02 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/9 "2025-11-05T21:02:40Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e22586f15a6a7b9b527c23a2ce090fbccd6c0da4.png)

Is this what you are referring to?

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

---

<div class="post-metadata">

**Author:** ![wstillwell](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@wstillwell](https://discourse.nodered.org/u/wstillwell)\
**Post date:** [10 November 2025 19:14 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/10 "2025-11-10T19:14:28Z")

</div>

We figured out what was wrong. No calculations were being done in the server. It is just reading tags. A random number generator field was added and now the OPC UA server starts on reboot.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 February 2026 19:14 UTC](https://discourse.nodered.org/t/problem-with-opc-ua-when-starting-node-red-as-a-service/99583/11 "2026-02-08T19:14:39Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
