Where are the node red projects stored?

Is there a file location where the NR projects are stored? I want to copy it and save as a backup.

I messed up my Pi before backing it up. I'm unable to network into it. So now I have to hookup the SD card to my PC, and sift through the folders. But where is it stored?

All Node-RED data is stored under the .node-red directory in the user's home directory.

If you are using the Projects feature of Node-RED, the individual projects are stored under ~/.node-red/projects/

You should also make sure you grab the hidden files ~/.node-red/.config.*.json

You don't need the node_modules folder that you will find there though, that is very large, and is easily rebuilt after restoring the rest of the folder, by running npm install in that folder.

Thanks! I found a flows_raspberrypi.json.

Normally if I work in NR, go to export flows, I can export the flow 1 at a time. I have 4 flows in my project.
But here, it seems all the flows are combined into 1 json. And if I move that above file into a new build, I should get all my flows back? Provided all my modules are installed of course.

If you have any nodes that store credentials then you will also need the flows_raspberrypi_creds.json and the .config.*.json files that Nick mentioned

If you have installed any additional modules then also copying package.json and package-lock.json will avoid you having to re-install those one at a time, and if you have changed anything in settings.js then you would need that too, plus any static files and so on that you may have added. The safest thing is to transfer the whole of the .node-red folder except node_modules and then run npm install to install any additional nodes you may have used.

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