Running as a service on a windows OS

No, just show me the shortcut and its path and its content of the one you use to run "alternate-node-red-installer"

Okay Steve,

For this parameter: (Application under "path")

image

This is the "path" I am trying to use:

This is actually the master folder path for my alternate-node-red-installer.

Again, if I used a CMD and go to this path and run the "npm start" command, my node-red instance can succesfully run.

What I wanna do is to automate that "auto-run of my node-red instance" using the nssm. However, I am having an issue with the parameters needs to fill out on the nssm side.

I hope this answer your question.

Thank you Steve.

With kind regards,
Henjoe

ok, step back one minute - forget NSSM for now - I need to be 100% clear on what you (physically you Mr Henjoe) do to start up the "alternative node-red"

What do you click, what do you type.

i need to see the path of that item, the details of that action, the contents of a shortcut or batch file.

Hi Steve,

This is what I did to run the alternate-node-red-installer without nssm.

Thank you.

With kind regards,
Henjoe

OK, now we are getting somewhere.

  1. As user 40800736 you oopen a CMD window
  2. CD to folder "nodered-offline"
  3. enter npm start

^ this is what you need to automate. the important parts are "As user 40800736", "the folder / path" the command "npm" and the command line variable "start"

Remember this...

did you try that?

BUT

ALSO

REMEMBER

You (account name 40800736) is running this project. that brings us back to this...

^ see how it is NOT running as user 40800736?


Yes Steve, I tried this but there were errors when I run the service.

Did you mean, I need to set the Logon configuration into 40800736 user?

Do you understand how one user on windows has no access to another users "stuff"?

If you dont set the user in NSSM - it will try to run as system account.

system account IS NOT user 40800736

So in short - yes, you would need to set NSSM "log on" to the account that you normally use to run alternative node-red.


All said - this is a pretty terrible setup overall (running from a user accounts desktop!

Thanks Steve!

Never knew about this!

I'll try to copy my master folder to C:\ Drive and I let you know the result.

With kind regards,
Henjoe

Hi Steve,

So I have this config:

image

Still I have problem. :frowning:

That would be a step in the right direction of improving this.
also, be sure whatever account NSSM has set in the "log on" tab has permissions to the alternative folder

and what is set in "log on"

Same Config as before:

image

With kind regards,
Henjoe

Hi Everyone and Steve,

Thank you for all your support.
I finally get it running.

What I did is to create a .bat file that run the "npm start" to my master folder.
and then use this ".bat" file to the nssm.
image

Again, thanks for all your support.

Thank you.

With kind regards,
Henjoe

I've already said that I typically don't do that on Windows, I run it manually via PM2 as it better suits how I use it on the PC. My Node-RED server runs on Linux and runs as a systemd service similar to the configuration that is detailed in the installer.

As also mentioned, the parameters are present in the package.json or you can look at the systemd script.

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