{"id":5432,"date":"2026-11-28T08:00:01","date_gmt":"2026-11-28T16:00:01","guid":{"rendered":"https:\/\/www.cloudacm.com\/?p=5432"},"modified":"2026-10-23T05:52:33","modified_gmt":"2026-10-23T12:52:33","slug":"multi-tenant-node-red","status":"publish","type":"post","link":"https:\/\/www.cloudacm.com\/?p=5432","title":{"rendered":"Multi-Tenant Node-RED"},"content":{"rendered":"<p>These are steps to have multiple instances of Node-RED on a single host.\u00a0 This post was inspired from this post &#8220;Node-Red multiple instances, RPi&#8221;, <a href=\"https:\/\/pysselilivet.blogspot.com\/2019\/04\/node-red-multiple-instances-rpi.html\">https:\/\/pysselilivet.blogspot.com\/2019\/04\/node-red-multiple-instances-rpi.html<\/a><br \/>\nSeriously, buy this person a coffee, <a href=\"https:\/\/buymeacoffee.com\/metzallo9!\">https:\/\/buymeacoffee.com\/metzallo9!<\/a> Having another instance for testing and evaluation can save headaches with your primary flows.<\/p>\n<p>Create a copy of the primary instance to a new secondary instance.<\/p>\n<pre>cd .node-red\r\nmkdir inst-2\r\ncp settings.js ~\/.node-red\/inst-2\/settings.js\r\n<\/pre>\n<p>Update any firewall policies that restrict access.<\/p>\n<pre>sudo vim \/home\/local\/iptables\/iptables.up.rules\r\n<\/pre>\n<pre># Node-RED Instance 2 - Allow\r\n-A INPUT -p tcp -m tcp -s -A INPUT -p tcp -m tcp -s 192.168.0.0\/24,192.168.1.100\/32,192.168.1.110\/32 --dport 1881 -j ACCEPT\r\n\r\n# Node-RED Instance 2 - Global Drop\r\n-A INPUT -p tcp -m tcp -s 192.168.1.0\/24 --dport 1881 -j DROP\r\n<\/pre>\n<p>Start the new instance via command line to verify all is working as expected by opening the site&#8217;s URL<strong>:<\/strong><\/p>\n<p><strong>http:\/\/192.168.0.100:1881<\/strong><\/p>\n<pre>node-red -u ~\/.node-red\/inst-2\/ -p 1881\r\n<\/pre>\n<p>Exit the command and set it to start as a service.\u00a0 Copy the primary service to a secondary service.<\/p>\n<pre>sudo cp \/lib\/systemd\/system\/nodered.service \/lib\/systemd\/system\/noderedinst-2.service\r\n<\/pre>\n<p>Then edit the file \/lib\/systemd\/system\/noderedinst-2.service so that the second instance is called.<\/p>\n<pre>sudo vim \/lib\/systemd\/system\/noderedinst-2.service\r\n<\/pre>\n<pre>ExecStart=\/usr\/bin\/env node-red-pi $NODE_OPTIONS -- $NODE_RED_OPTIONS -u ~\/.node-red\/inst-2\/ -p 1881\r\n<\/pre>\n<p>Save and exit, then enable and start the new secondary Node-RED service.<\/p>\n<pre>sudo systemctl daemon-reload\r\nsudo systemctl enable noderedinst-2\r\nsudo systemctl start noderedinst-2\r\n<\/pre>\n<p>Ensure that the service is running and that access to the URL works<strong>:<\/strong><\/p>\n<p><strong>http:\/\/192.168.0.100:1881<\/strong><\/p>\n<pre>sudo systemctl status noderedinst-2\r\n<\/pre>\n<p>The new secondary instance should have a blank canvas and the nodes available will be unique to it.<\/p>\n<p>Reboot to verify that all is working.\u00a0 If the second instance ever needs to be removed then perform these steps.<\/p>\n<pre>sudo systemctl stop noderedinst-2\r\nsudo systemctl disable noderedinst-2\r\n<\/pre>\n<p>Then delete the \u201dnoderedinst-2.service\u201d file as well as the &#8220;~\/.node-red\/inst-2\/&#8221; directory.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>These are steps to have multiple instances of Node-RED on a single host.\u00a0 This post was inspired from this post &#8220;Node-Red multiple instances, RPi&#8221;, https:\/\/pysselilivet.blogspot.com\/2019\/04\/node-red-multiple-instances-rpi.html Seriously, buy this person a coffee, https:\/\/buymeacoffee.com\/metzallo9! Having another instance for testing and evaluation can save headaches with your primary flows. Create a copy of the primary instance to a new secondary instance. cd .node-red mkdir inst-2 cp settings.js ~\/.node-red\/inst-2\/settings.js Update any firewall policies that restrict access. sudo vim \/home\/local\/iptables\/iptables.up.rules # Node-RED Instance 2 -&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.cloudacm.com\/?p=5432\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5432","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/5432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5432"}],"version-history":[{"count":5,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/5432\/revisions"}],"predecessor-version":[{"id":5438,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/5432\/revisions\/5438"}],"wp:attachment":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}