How to deployer app node red in local computer

hello ,
I want deployer my project node red on my server (local computer )
I need your help

I think you need to be a little more clear on exactly what you mean. Do you mean you have it running in the cloud and want to run it locally instead? If so then the first thing to do is to install node-red on the computer. See the node red Getting Started guide to see how to install it on your OS.

Thanks for your reply.
I mean that after developing my node red project, I like to know how to deploy my project on server production (local server : windows server 2012)

First Install node-red on the server and make sure it works.
If you are using the projects feature of node-red then you can fetch the project from the appropriate repository.

Otherwise it is advisable, on the development machine, to edit your settings.js and explicitly specify the name of the flows file. Rename that file if necessary and restart node-red to make sure it works. The reason for doing this is that the default flows file name includes the host name, which will be different on the server.
Next stop node-red on the server and copy all of your .node-red directory, except the node_modules folder, across from your development machine to the equivalent directory on the server, then cd into that folder and run npm install which should install all the extra nodes. Restart node-red and with luck all will work as expected.

thanks ,
But I ask how configure node red start automaticly after a restart ( windows server)

That is not what you asked at all. I have no idea, since I don't use Windows. You could try looking in the node red docs, I see the relevant page has a section on Windows.

I presume that you have to use windows server for some reason. I believe many would suggest that a LInux alternative such as Ubuntu Server would more appropriate for such applications. That is certainly what I do.

For me running Node-Red when windows starts was as simple as :

  1. creating a batch file on the desktop ie. RunNodeRed.bat
  2. adding node-red command in batch file.
  3. In windows 'Task Scheduler' create a new Task that 'triggers' on System startup with ..
  4. Action set to run the batch file

image

ps. you may need to play around with the task configuration since im autologin in my test machine.
but there is an option in task 'General' settings to "run whether the user is logged on or not".

[EDIT] Running a Batch File from Task Scheduler Without User being logged In

Rather than scheduled tasks or user executed scripts, you can run node-red as a proper service using something like nssm....

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