Import-Export flows

I have a node red flow having opc ua package and mongo db package. I want to export flow so that it should be run on another machine, so How can I export such flow along with installed packages?

Is it the complete flows file that you wish to transfer to the other machine? If so then copy the flows file itself (changing the name to match that on the destination) and also package.json and package-lock.json. Then on the new machine, in the .node-red folder, run
npm install
and it will install all necessary nodes.

1 Like

Thanks for quick response..
I have flows that consists of mongo db and opc ua client nodes that are installed. If I transfer these flows to other machine how am I supposed to send backup of mongo db and opc ua nodes to that machine?

What do you mean by a backup of the nodes. The config nodes' configurations will automatically be included in the exported flow. Did you not notice that when you tested exporting from one system and importing to another? It will also be necessary to install the contrib nodes on the other machine.

I got it. Just copied package.json and flow.json and put them in .node-red directory and tried npm install.
Thanks for the help!

1 Like

If you want to ensure it has exactly the same versions of any additional nodes then also copy the package lock file, as I said previously. Without that file it will install the latest versions, which may be what you want, or may not be.

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