I'm setting up Node-RED for a few Canadian clients, and some of them have to keep personal data in Canada because of PIPEDA, plus stricter public-sector rules in BC and Quebec. Here's the checklist I'm using. I'd like to hear what others would add.
Host the Node-RED instance on a server in a Canadian data centre, and check that the provider doesn't copy snapshots to another country.
Keep flows.json and the credentials file on that server, and set a strong credentialSecret so the credentials stay encrypted.
Point MQTT brokers, databases and file outputs at Canadian endpoints only, and review every third-party node that calls an external API.
Store context data and logs locally, with a clear retention period, instead of sending them to an outside logging service by default.
Turn on adminAuth, put the editor behind HTTPS, and limit who can deploy changes.
Back up flows, credentials and context to Canadian storage, and test a full restore on a clean install.
Document where every copy of the data lives, so clients can answer audit questions quickly.
For those running Node-RED for clients: how do you check which nodes send data outside the country?
This is the one I would not fully agree with. Node-RED, as a powerful, general-purpose compute tool is not specifically designed to deliver robust IdM. It does an OK job but I really don't believe it is robust enough for sensitive work such as with customer environments. In addition, forcing Node-RED's ExpressJS web servers to handle HTTPS ties up significant resource that is far better handled by a proxy which is specifically designed for high-speed connectivity. Leave TLS and IdM to battle-tested services.
You should also remember that Node-RED's flexibility and power is a 2-edged sword. Without very careful handling, it can reach just about everywhere and do anything. For example, its userDir folder contains both user data and system settings which isn't ideal.
You really should be aiming for a robust, multi-layered security architecture. This would involve things like a reverse proxy to provide edge security and a host for a dedicated Identity and Access Management service. Depending on need and customer sensitivity and value, other layers might also be needed such as security audits, continuous security monitoring and reporting, source code and supply chain protection.
You will need some strong auditing capability as part of the service. Node-RED can do anything, anywhere. So you need an external tool to audit what people have made it do. If necessary, you can also add outbound restrictions to ensure that data can only ever go to places that have been specifically authorised.
Of course, what you implement depends heavily on the value of your customers and projects. And a forum post can only ever outline some ideas, please do not take this as professional advice. If you value your customers and they value their data, you really should hire an solutions architect with experience of these kinds of systems in order to make sure nothing is forgotten or misconfigured. Possibly a cyber security expert as well if the sensitivity warrants it.
I would check this at the network boundary, not only by reading the flow JSON: an HTTP Request, Function or third-party node can build its destination at runtime. For the deployed instance, deny outbound traffic by default, route approved destinations through a logging proxy, and review DNS/proxy/firewall logs while exercising each flow with representative inputs. Include the container/host, backup agent and update jobs in that test; an IP geolocation list is a weak substitute for an explicit destination allowlist, especially with CDNs. The logs show where traffic tried to go, while the providers' processing and backup regions still need separate verification.