NSSM setup on the Alternate install of Node-Red

I did an Alternate Install of Node-Red because the server I am installing Node-Red on does not have access to the internet.

I started by doing the alternate installer on my own pc and then installed all the modules I wanted.
Copied the node-red install to C:\Node-Red

I am stuck on trying to figure out how to get Node-Red to run as a service from this directory.

I downloaded NSSM and tried a few of the install commands to create the service in Windows, but I am unable to get the services to start.

nssm install Node-Red C:\Node-Red start

"start": "node C:/Node-Red/node_modules/node-red/red.js --userDir ./data"

These are a couple of the commands I tried, but none of them worked.
The "Start" command was not even an option to use.

I tried to find an older version of NSSM like 2.18 because I saw it used to have GUI version that looked pretty simple to use for this process.
You would just use

which is what I believe needs to happen.

Any help would be much appreciated.

Thank you!

Kind regards,

Nevermind I found a way around all of this.
I created a batch file

@echo off
cd c:\node-red
npm start

I saved this batch file in the location: c:\node-red\batchfile as startup.bat

Then I had NSSM install it as a service
nssm install Node-Red "C:\node-red\batchfile\startup.bat"

This works you just need to give the batch file a few seconds to load fully before the Node-Red GUI website is available.

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