How can we run multiple node-red applications in the same machine/system

For example
In other words, Can we able to run on different ports
The application running in http://127.0.0.1:1880/ and the other in http://127.0.0.1:1881/

When running multiple instances, you need to use different workspaces (default is .node-red in your user dir) using the -u DIRECTORY parameter when starting Node-RED (depending on how you start it, of course).

In doing so, you can modify the port in the settings.js of each instance's workspace.

Alternatively, you can specify the port using the -p PORT parameter.

Also, if you search the forum, there are different solutions to this: Search results for 'multiple instances' - Node-RED Forum

Alright Got it, What are the steps to point to the JSON file locally using HTTP localhost
for example;
I have to create it like this; http://localhost:1880/catalogue.json'. This isn't working and the catalogue.json file is in this location C:\Users\user.node-red\catalogue.json

please find the screenshot for reference

Can you open http://localhost:1880/catalogue.json in a browser? If not, then node-red cannot either.

If you are running multiple instances on multiple ports then you may need to change the catalogue port also... unless they all share that same one. - but yes must have access in e first place.

I'm getting this error

That means its not pointing to catalogue.json file

I'm not able to get the catalogue.json content. So what is the correct path to point catalogue.json file - Considering and running single node application
My catalogue.json file is in this location C:\Users\user.node-red\catalogue.json

What is the correct path I can give it in settings.js
PFA screenshot of settings.js file

If you want Node-RED to load a catalog from http://localhost:1880/catalogue.json then you need to do something to set that up http endpoint.

The palette.catalogues setting assumes your are providing URLs.

One option to make that catalogue available would be to use the httpStatic setting - that can be used to tell Node-RED to make a particular directory available on its http server.

So you could do:

  1. create a directory to contain your static served files - such as ~/.node-red/static
  2. copy you catalogue.json into that directory
  3. set the httpStatic property in your settings file to the full path to that directory - c:/Users/user/.node-red/static/ (check I've got that path right...)
  4. restart Node-RED

I have given, but still, it didn't work out
Please find screenshots below



the httpStatic property should be set to the directory containing catalogue.json - not the file itself.

You mean I just need to give for httpStatic in settings.js file as below
httpStatic: 'C:/Users/usre/.node-red/static/'

Yes. Sorry, I see I got my instructions wrong previously. I have edited that reply to correct it.

Alright, But it still didn't work out


image

The url for the catalog is http://localhost:1880/catalogue.json - it looks like you've included 'static' in the url you are trying.

I changed to the above URL as specified, and restarted the node-red.Seems like it's still failing to load

I got it knolleary. I was able to load the catalogues. Thanks a bunch
This I was running for single node-red
But to run a multiple node-red application
Can you please suggest steps to
How can I run multiple node-red applications in the same system and I need to show different catalogues for different ports

1 Like

That has already been answered. By giving each instance its own userDir (-u) they each have their own settings file and catalogue.json file.

Thanks, @knolleary.I got it

a. But in one single instance, i.e say (http://127.0.0.1:1880/), I must be able to log in with different users

Secondly,
When User X logins to http://127.0.0.1:1880/, X must be able to see only User X flows and catalogues
When User Y logins to http://127.0.0.1:1880/, Y must be able to see only User Y flows and catalogues

See the thread you also opened here.