Hi everyone, sorry is it possible to create more than one projects in node red with dashboards that can be opened independently on same windows pc machine? if yes how?
I am running 4 instances of Node-RED in one windows machine. Independent of each other.
how did you managed that? help me please
If you run the command
node-red --help
it will tell you the command line options. In particular, on a linux system, you might run
node-red -u /home/user/.node-red-2880 -p 2880
The first time that is run it will create the folder and start node-red using port 2880. Saved flows will go to that folder along with settings.js etc.
The command would be the same on a Windows machine but enter the full path the Windows way obviously.
Try @Colin advice, if you are stuck at any point, let me know.
sorry if i run node-red -u /home/user/.node-red-2880 -p 2880, it will overwrite the current instance that is running with port 1880? or it will create another instance with port 2880?
No, all of the settings are in the userDir
folder and with that -u
command, you are changing the location of the userDir folder away from the default. So you will have separate instances of the same version of Node-RED.
You can also install Node-RED locally rather than globally and so have even different versions of Node-RED running entirely independently.
Yes, with the files in the new folder.
ok so is there something in this command node-red -u /home/user/.node-red-2880 -p 2880 should i modify?
I don't understand what you mean. You need to specify the folder that you want the flows etc to be saved in, and which port you want to use. What else do you need?
If you mean you only want to run one at a time then look at the projects feature. Projects : Node-RED
my node red directory is C:\Users\admin.node-red, so how the command above should look for this directory?
I imagine that it is actually C:\Users\admin\.node-red
, but you can make it anything. If it is being run by the admin user (probably not that good an idea by the way), it could be C:\Users\admin\.node-red2
or C:\Users\admin\this-is-my-new-instance-of-node-red
(though I don't really recommend making it that long )
ok thanks, then how should i use this command node-red -u /home/user/.node-red-2880 -p 2880 if my directory look like that?
One way is to open a command window and type it in.
i know that but how should i use this command node-red -u /home/user/.node-red-2880 -p 2880 by using that directory of my node red?
should look like this C:\Users\admin\ .node-red2 -p1881? if i want to use port 1881 for .node-red2?
Careful about spaces - please put code between back-ticks.
node-red -u C:/Users/admin/.node-red2 -p 1881
Windows takes forward as well as back slashes. Use either.
This assumes that the user running Node-RED is called admin
. If not, then change that part of the url to something that the user has write access to. That is the only requirement - write access for the user running Node-RED.
And again, let me say - running node-red with an admin user id is a RISK. You need to be aware of that and think carefully whether it is the right approach or whether it would be better to create a separate user id for running it.
ok thanks very much i managed that, now how should i start that instance .node red2 in cmd?
That is the full command assuming that you installed node-red globally with npm install node-red -g
(the -g
telling npm
to install the package globally.
On the other hand, if you mean how do you start node-red automatically, that is a different question.