What is the best way to run multiple node-red instances? As far as i can find a different port is needed for every instance. Is sharing the setting.js file and or node_modules a good option? Or is it advised to make multiple folders?
For now i am using: node-red -p 1881 -u C:\Users\xx.node-red test.json and node-red -p 1881 -u C:\Users\xxx\Test2
In my setups I am using one Node-RED installation and launch different workspaces with -u, each with their own dependencies, settings.js, flows.json and so on.
In my own case, I use my alternate installer so that each instance is self-contained & I don't have to mess with the package.json because it contains the startup scripts (npm start), the script doesn't need to change because the userDir for each instance is in the data subfolder.
As with Matthias's example, the advantage is that you can run each instance with a different version of Node-RED if you like. You could also adapt the start script to run a custom version of node.js if you needed to.
By the way @kuema, are you trying to copy my picture?! I've only just noticed that you also have an archery image but facing in the other direction
Julian (@TotallyInformation), I have been using that picture for a while now, and you have noticed just now? But in fact, that was not intentional. I used it as my Github avatar, so it got moved over here when I signed up at the forum. The difference is, I'm a lefty.
...FWIW, I am using node-red in a docker install.
This way I can have as many instances as i want/need, each looking like a separate host install, including individual IPs .. no need for mapping ports and everything