Multi users on dashboard

Is it possible to use the node-red dashboard on 2 different computers, where one session does not disturb the other?

To some extent yes. make sure you send the socket id, this works for some nodes not all. Use a debug node set to complete message object to see the socket id.

1 Like

Just remember two things about Dashboard 1:

  • It is a single-page app. Every UI node delivers everything structural to every client instance even though you might not be able to see it on-screen at a particular time. I don't believe any of that pays attention to the socket id.
  • The socket id is not very stable. It should not be assumed that it is, in any way, a client id. It will change if the page is reloaded and it will change if anything temporarily breaks the Socket.IO websocket connection (for example if your PC or browser tab goes to sleep or possibly even if your laptop moves from a wired to wireless connection).

So you should not rely on the socket id for any kind of security or privacy.

Dashboard 2 has the ability to create multiple pages which might help a little depending on what you are trying to achieve.

If you want more control and/or a more comprehensive client id model and/or physically separated pages, you will need to look at UIBUILDER.

1 Like

Thanks,
In the UIBUIDER I can have multiples diferrents sessions ?

You still have to code them up. But UIBUILDER provides the tools to let you do so.

  • It allows Node-RED wide middleware for both ExpressJS and Socket.IO
  • It allows instace-level (e.g. each uibuilder node) middleware capabilities
  • It incorporates more stable clientId , tabId and page name identifiers.

The clientId is created when any page of a specific uibuilder node is first accessed. it is stored as a session cookie (lasts until the browser is closed) and replayed with all messages back to Node-RED. If you include it when sending to your uibuilder node, only the client browser tabs open to that node's URL will recieve the message.

This is not full session management of course, which would include session timeouts, authentication and possible authorisation. But it is one of the building blocks. You could, for example, include it in a JWT or some kind of session management server processing.

For Node-RED Dashboard 2.0:

By default we follow the same pattern as Dashboard 1.0, whereby ui-control and ui-notification are constrainable with the socketid (available in msg._client.socketId

If you run Dashboard 2.0 on FlowFuse though, then the Team and Enterprise tiers here offer multi-user authentication and constraints

1 Like

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