Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
How to backup flows and related configuration
Where are things that need backing up?
If Node-RED has been installed as standard, all user files should be contained in
~/.node-red unless the
userDir setting has been changed in
~ refers to the home folder of the user that runs Node-RED. (on Windows,
~ is available in PowerShell but in the older cmd shell, you should use
It is also possible to start Node-RED with parameters that override the location of the
-u) and/or the
settings.js file (
What needs backing up?
For full safety, everything in in the
userDir should be backed up except the folder called
Here is a list of the critical files to backup. However, it is not safe to assume this is all that is needed.
These define the flows and any credentials stored for the flows. The
*indicates that the actual file is named after the machine name you are running on. If you have transferred from another machine name, you might have multiple files though only one set will be active. In addition, there are
*.backupversions of these files. Node-RED copies the old active flow/cred files each time you deploy.
This contains the current configuration being used. Includes a list of all of the modules and node types that are being loaded with their versions.
Defines the user global settings for Node-RED.
If used (will be standard from Node-RED version 0.17), defines the extra npm modules installed such as node-red-contrib-* nodes.
This contains snippets of flows and JS code saved from the Node-RED admin UI as part of the "Library" feature.
.sessions.json(if it exists)
nodesfolder (if it exists)
Not used as much now but allows manually installed nodes.
How to restore
Firstly start by restoring the backup to
~/.node-red or your chosen
If you have maintained a package.json, you can then:
cd ~/.node-red npm install
Then start node-red and everything should be back to where you started.
If you haven't maintained a package.json, you will need to install each required module. If you miss one that is in use in your flows, Node-RED will warn you on the console output.