One CSS for multiple Dashboard instances


We're running multiple NodeRED instances (under FlowFuse), each running its own Dashboard 2 configuration.
Would it be possible to have one central ui-template node where all other Dashboard 2 sites get their CSS main from?


To achieve this, you can follow these steps:

  1. Host CSS centrally: Host your main CSS file in a location accessible to all Node-RED instances. This could be a web server or a shared network location.
  2. Modify ui-template nodes: In each Dashboard 2 configuration's ui-template node, reference the centrally hosted CSS file using a <link> tag in the <head> section of the template.

For example, your ui-template node template might look like this:


    <link rel="stylesheet" type="text/css" href="">

Replace "" with the actual URL where your CSS file is hosted.

  1. Ensure accessibility: Make sure that the Node-RED instances have network access to the location hosting the CSS file. Adjust firewall settings if necessary.


  1. Set the CSS content using global.set:
global.set('cssContent', '/* Your CSS content here */');
  1. In your ui-template node, use <style> tags to include the CSS content:


Copy code


Ah yes.. of course! Solution 2 is perfect for me.
My train of thought about this was all wrong. Simple is best.

Thank you!

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