Website-Dashboard embedding

Can I embed a dashboard from node-red to my own website?
If not, then what should I do?

yes using an iframe ?
If that is not acceptable then maybe look at node-red-contrib-uibuilder as a basis for building your own site that can use just about any framework and links to the Node-RED backend.

1 Like

Hello dceejay,

Can you tell me how to do this please what is needed from Node-red code wise to copy into the I-frame?
I am an Automation guy and this HTML coding is all brand new to me.

Thank you

Plenty of help out there on iframes... you just need to add the tag into your existing web page and set the url to point to the Node-RED dashboard. eg

<iframe src="http://your_dashboard_in_node-red:1880/ui" height="800" width="1000"></iframe>

If Node-RED is not running on the same computer as your existing website you may have to open up the cross website settings (CORS) - in your settings.js file eg

httpNodeCors: {
    origin: "*",
    methods: "GET,PUT,POST,DELETE"
},

https://www.w3schools.com/html/html_iframe.asp

Dear dceejay,

Do you know some way to embbed nodered dashboard using iframe that maintain the http auth?

Using your code above, I've tried pass the user and password in the front of the url:

<iframe src="http://user:password@your_dashboard_in_node-red:1880/ui" height="800" width="1000"></iframe>

in this way I can achieve the iframe implamantion on a poorly way, giving that I am exposing my user name and password. And the Chrome browser does not support such implementation...

Is there a way to embed the nodered dashboard by passing my user credentials in some form?

or even using the provided token in node red admin api?

https://nodered.org/docs/api/admin/oauth#step-1---obtain-an-access-token