Where Does Node-RED Store Flows and Settings?
Node-RED keeps flows, credentials, and settings in its user directory, defaulting to ~/.node-red with flows named after the hostname.
Last updated
Node-RED's user directory is the whole application state in one place. The flows file (named flows_[hostname].json by default) holds every node and wire. The credentials file beside it holds encrypted secrets. settings.js tunes the editor, context storage, and palette behavior.
Installed extra nodes live in node_modules inside the same folder with their own package.json. That makes the directory self-describing: flows plus settings plus package manifest fully defines the instance. Copy all three (plus credentials) and the clone behaves identically.
Where Node-RED stores this, by platform
~/.node-red
Flows file, credentials file, settings.js, package.json, and node_modules for extra nodes. Override with --userDir. Docker images mount this path as a volume for persistence.
~/.node-red
Same user-directory layout on macOS. LaunchAgents and Homebrew services commonly set --userDir explicitly, so check the service definition when the folder is not in the default spot.
%USERPROFILE%\.node-red
Same layout under the user profile. Windows services and scheduled tasks often pass --userDir to a data drive; inspect the service command line before hunting the default.
Frequently asked questions
How do I run Node-RED from a different folder?
Run node-red with --userDir pointing at the folder you want. The flows file, credentials, and installed nodes all follow the user directory, so one flag relocates everything.
What do I back up to migrate Node-RED?
Copy the user directory with Node-RED stopped: flows file, credentials file, settings.js, and package.json together. Installs also need npm install in the copy to restore the nodes folder.
Notice an outdated path? Let us know.