Hi TotallyInformation, I know this is kinda old topic, but I appreciate if you can reply.
I used your alternate-node-red-installer and it works really fine.
But I don't know how am I going to create an automatic start of my node-red. What I want is, if every time I logged on to my PC, I don't need to type the "npm start" to the master folder anymore, but instead it will automatically run it in the background (no windows command pop out, pretty similar on running an application as a service on a windows OS).
Search this forum for nssm. It will permit you to run node-red as a service in Windows (so you don't even need to log in). Just be sure to use the same account for nssm as you do now (u unless you have setup nodejs for paths to be truly global)
As Steve says, there is a tool that lets you create a Windows service definition from an executable and that can certainly be used and is probably the best way over all.
Alternatively, you can use the Windows Task Manager to start applications in different ways and at different times. If you do things this way, you will need to think about whether you want to run Node-RED all of the time - e.g. even if you are not logged in - or just when you are logged in.
You will also want to familiarise yourself as to where Node-RED log output goes which also depends on how you start it.
One thing that some people do in order to make the logs more accessible and familiar (if you are used to Linux logs) is to use PM2 to actually run Node-RED since that has its own log handler. You can also set that up to run as a service or from Task Manager. I use PM2 when running Node-RED on my PC as that is my development environment so I don't have it running all the time. I have a shortcut set up and available on my Start Menu that starts Node-RED via PM2 and immediately streams the log, this is a cmd shortcut so it leaves the log streaming in a window.
Thanks for this! I actually done this before using the nssm, however my nodered that time was installed globally.
I just need to run the built-in "node-red.cmd" under "C:\Users\AppData\Roaming\npm" folder.
I know how nssm works, but however I don't know what file do I need to run when using the alternate-node-red-installer.
If you want to run the locally installed version of Node-RED as per my alternate installer, the command you need to put into nssm is the one listed in the package.json file under scripts:
I believed you are the who created the alternate-node-red-installer,
How do you do the automatic run of the node-red?
Just like what Steve says, using the nssm, I just don't what parameters need to fill out.
I highly appreciated if you can send a sample of configuration.
Did you set the login on nssm? By default it will run as service which is a different account to how you currently run node-red. You would be MUCH better off moving that folder out of desktop to somewhere the system or network service account can access.
It pusts "global" install stuff in "users" folders etc.
Now, I dont know the anatomy of Julians "Alternative installer" but I had rather hoped it installed in a
completely independent folder. Looking at your screen shot - i see its located in user\appdata\roaming\npm - that is unexpected.
so either you placed it there or you are using a mix of normal node-red install & julians installer - something doesnt look right.
Hang with me - I'll get to a resolution for you - lets get this to a sane condition.
show me the content of the "node-red.cmd" that you circled.
show me the shortcut you normally launch node-red with (i need to see the path of the shortcut and the content of that shortcut
Just for the information,
I have 2 instance of nodered, first is the node-red which is installed globally,
and the other is the "alternate-node-red-installer". I can run the node-red instance automatically (the one who is installed globally).
Do I need to edit the code for this "node-red.cmd"?