cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Node-red Instances

Node-red Instances

vlad
Established Member

Hello,

How we can start multiple nod-red instances in ctrlX Core?

4 REPLIES 4

Marc_Smaak
Long-established Member

Just for my curiosity: What would be yoru usecase which requires multiple Node-Red instance? since you can creat ecompletly indepenandt flows in NR I  cuurently only see disadantages:

  • Need for additiona NR licenses
  • Heavy load on the CtrlX resources (NR is a large app()
  • Degradation of performance sinc ethe core is running 2 NR engines
  • Special solution require dto select the right NR instance in the GUI including Dashboard

TheCodeCaptain
Community Moderator
Community Moderator

Hi vlad,

this is not possible and not foreseen.

Can you describe your usecase, maybe we can find an alternative solution.

Regards

vlad
Established Member

Hello,

Yes. So we have a partner who want to use our ctrlX Core in their applications.

They asked for Multiple Node-RED instances in paralel. During a normal integration, to keep the things separated and modular,they are using multiple Node-RED instances. I have attached two examples of how they can start them in other installations (including on a raspberrypi pi). This is a feature fully supported by Node-RED. How can we use it to run also on CtrlX?

Screenshot_20230419_213910_Chrome.jpg

Screenshot_20230420_003531_Chrome.jpg

  

CodeShepherd
Community Moderator
Community Moderator

We did some test and you can start your own plain node-RED instance via the following command:

$SNAP/bin/node $SNAP/lib/node_modules/.bin/node-red -p 1881 -u $SNAP_DATA/solutions/activeConfiguration/node-RED1/

This will create a new folder inside of the active configuration (app data) including all project data.
!!! Beware of security risk because open access !!!
With this standard configuration you directly access via IP of the control and chosen port (no reverse proxy) e.g. 192.168.1.1:1881 and you will have no authentication for external access.
There is no warranty or support for this setup.

As addition you can use our adapted settings.json for an integration into the authentication (see attached). Simply create your instance once that the new project folder is available and replace the existing settings file. This will force a user to login when first accessing the node-RED flow editor with username and password via the user management of the ctrlX CORE itself. Or you can add an valid bearer token as parameter to your URL:

192.168.1.1:1881?access_token=eyJhbGciOiJFUz....
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist