Need advice about node-red multiple user instances

Hello everyone,
I'm about to build a dashboard for multiple users, lets say an admin dashboard, where you can access each tab and get the most information and control, and an user dashboard where you have only the view of 1 tab with minimum control. In addition I would like to secure both dashboards, so only admins with an admin pw can access the admin dashboard.

As I noticed there is no way to to so with the "classic" nr dashboard, because it doestn support multiple user instances. Now is my question: what is the best way to go?

I've read that its possible to run node red as multiple instance with different port with its own settings and so on. That could be a possible way. And maybe the quickest one.

And I read that the ui_builder is qualified for those purpose, is it right? So for example I can use the classic dashboard for admins with admin authentification and build another dashboard with ui_builder and secure it with user authentification. Over the long run I will use ui_builder anyways, because I like to design stuff and classic dashboard is limited for this purpose.

Is there a third possibility that I'm missing? What would you recomend for my requirement?

Thank you!

If you use ui_builder you can create whatever (multi user) web page you want without multiple instances (though the backend will be shared)

you can even have multiple ui_builder instances serve pages/spas from one node-red server.

so you would say ui builder is the way to go?

Nobody can say whether that is the way to go for you. From what you have said it appears to be a viable solution and you have said that would like to design stuff yourself. There are other solutions though so you have to look at them and decide which fits your experience and desired outcome best.

1 Like

It is A way to go. Another alternative would be multiple instances of Node-RED.

Partly depends how different flows for each user might be and who would be maintaining them.

With uibuilder, you get the ability to do anything you want against a single back-end Node-RED instance (of course you can have multiple back-ends too if you really want). So if your flows are common but you want to differentiate the front-end - uibuilder will let you build it.

Note that uibuilder v3 does have some early code for authentication and authorisation built in but it isn't currently well tested and almost certainly not complete. Though you should probably try it anyway and let me know how you get on. I've struggled to find the time to finish that part off but if you had specific feedback, that might help.

But even without that, you can still build something that will work.

1 Like

Thats actually the thing, I have actually the same flows and just want to use different dashboards as explained before. Atm I work with different links on dashboard, that hide and show tabs in the menu, based on wich tab is open first. But the user can just change the url and get access to admin view. And that is what I dont want.
So I thing I will go the ui builder way, I have some basic know how bout css and html, so only need to learn how to work with framework and get control over the ui with payloads.
Btw @TotallyInformation you wrote a post here in forum about svelte framework. Will it be the new standard for ui_builder or am I better to work with vue.js and bootstrap?

You can work with any framework with uibuilder, that is one of its features.

Vue is included for convenience and to get you going, I chose it because it requires minimal boilerplate code, doesn't need to have a build step and produces good results with a relatively light-weight codebase. It is also one of the fastest growing frameworks. But by all means use something different if it suites you.

I'm really impressed with Svelte but it won't be a new standard for uibuilder because the only way to use it is with a build step and that is off-putting for beginners. However, I've shown that you can easily use it should you want to and shared how to do it. I rather expect that, now I have a better way for sharing templates, I will make a template for Svelte in a future release.

At present, handling a build step with uibuilder still requires you to drop to the command line to run the build. That is inconvenient for many and confusing for others. As you may see from the docs, I plan to make that much easier in the future by leaning on more npm features so that having a script called build specified in a package.json file in the uibuilder node's root folder (~.node-red/uibuilder/<url>) will automatically surface a build button in the Editor. Templates already now have package.json files included so we are part-way there already.

So choose a framework you are comfortable with, VueJS will certainly remain the default for the foreseeable future so feel free to use that, it is a good framework.

As for bootstrap, bootstrap-vue is included because with it, you can produce really decent looking UI's with very little boilerplate and no messing with CSS. So again, great for beginners and experts alike. But there are plenty of alternatives if you prefer Material Design or some other CSS framework instead.

Oh, and by the way, it is "uibuilder". Not "ui_builder", "UiBuilder", "UI Builder", ... All one word, all lower-case. Abbreviated to "uib". :rofl:

You also have node-red-contrib-mdashboard

It is even working in combination with the standard dashboard.

regarding security. I don't know if you can specify different authentification for mdashboard compared to regular dashboard.

thanks! didnt know there is another dashboard besides the original one. But seems like I'm not able to use contrib made ui nodes inside the mdashboard. I would like to use @hotNipi artless gauge there. Maybe it is possible threw ui template?

yes, that is a limitation of mdashboard. I guess for that someone needs to port these contrib ui nodes to mdashboard as well.

Or take the code from artless gauge and simply reproduce it in your own front-end code using uibuilder :grin: Or persuade @hotNipi to produce a VueJS component version of his lovely gauge :rofl:

If I ever should have a need to extract only reasonable and necessary part of code from artless-gauge to make it working in one and only condition - I'd start from scratch. The "support this and that case" code is largely predominant. :smiley:

1 Like

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