Multiple Dashboards on one Node-Red-Instance?

Hi,

is there already a solution / fork for having more than one UI for different users ?

I would like to run one Node-Run Instance and push values to different independent UIs that are not aware of each other.

I think of individual UI-Links like:

servername:1880\ui_XZH7U
servername:1880\ui_AB5Z1
servername:1880\ui_BB77i

Can this be realized in any way ?

BR
G

As you have probably discovered, there is only 1 runtime set of flows that is shared by all UI elements and users that are accessing this node-red instance. So the dashboard does not provide a different context for each user. If you need a common set of runtime logic with different dashboards, you probably have to roll your own using the UI Builder nodes.

If you really need different runtimes (i.e. independent flow logic) you can run multiple node-red instances on different ports -- so the urls could be set up like this:

servername:18801/ui
servername:18802/ui
servername:18803/ui

which is not an easy mapping for humans to remember... So in that case, I would install an nginx reverse proxy on the standard servername:80 port, with mappings from the url root path to each port, such as:

servername/XZH7U/ui
servername/AB5Z1/ui
servername/BB77i/ui

using a series of server location mappings in the nginx.conf file:

    server {
        listen       80 default_server;

        location /XZH7U/ {
            proxy_pass http://localhost:18801/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Real-IP $remote_addr;
        }
        location /AB5Z1/ {
            proxy_pass http://localhost:18802/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Real-IP $remote_addr;
        }
        location /BB77i/ {
            proxy_pass http://localhost:18803/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Real-IP $remote_addr;
        }

        location / {
            proxy_pass http://localhost:1880/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Real-IP $remote_addr;
        }
    }

That last entry is the default Node-RED admin server running on the standard port, which you may or may not need.

3 Likes

As Steve has mentioned, the only way currently to do this with Node-RED is to use the node-red-contrib-uibuilder node which lets you build pretty much any front-end UI and lets you have as many instances of the node. Each instance gets its own configuration, effectively its own web service and matching websocket connection. Front-end libraries are shared between instances but your custom code is independent (though there is also a mechanism for common code as well).

Of course, you don't get all the nice hand-holding that the Dashboard gives you. But on the other hand, you get to write whatever UI you like with whatever framework you like (or no framework at all if you prefer).

uibuilder comes with VueJS and bootstrap-vue (and hence bootstrap) by default which actually lets you build really nice UI's with minimal effort and coding. VueJS is the fastest growing framework and has great community support of its own. But swap it for REACT, Angular, jQuery, or anything else you like.

1 Like

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