# Can I save the flow file into a remote database?

**URL:** <https://discourse.nodered.org/t/can-i-save-the-flow-file-into-a-remote-database/59290>\
**Category:** General\
**Created:** [3 March 2022 11:00 UTC](https://discourse.nodered.org/t/can-i-save-the-flow-file-into-a-remote-database/59290 "2022-03-03T11:00:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jijun](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jijun/32/57765_2.png) [@jijun](https://discourse.nodered.org/u/jijun)\
**Post date:** [3 March 2022 11:00 UTC](https://discourse.nodered.org/t/can-i-save-the-flow-file-into-a-remote-database/59290/1 "2022-03-03T11:00:07Z")

</div>

How can I achieve real-time synchronization of flow when the application is running in two dockers?  
I want to store the active flow into a database.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [3 March 2022 11:03 UTC](https://discourse.nodered.org/t/can-i-save-the-flow-file-into-a-remote-database/59290/2 "2022-03-03T11:03:02Z")

</div>

Storing flows in a database will require a Storage Plugin, the API that the plugin needs to implement can be found here: [Storage API : Node-RED](https://nodered.org/docs/api/storage/)

An example MongoDB backed plugin can be found here: [GitHub - hardillb/node-red-contrib-storage-mongodb: A flow/library storage plugin for Node-RED that uses MongoDB as the backend](https://github.com/hardillb/node-red-contrib-storage-mongodb)

As for keeping 2 Node-RED instances in step, then you would need to extend any storage plugin to use the Admin API to trigger a flow reload on the other instance when ever a deploy is triggered. Details of the Admin API are here: [Admin API : Node-RED](https://nodered.org/docs/api/admin/)

---

<div class="post-metadata">

**Author:** ![jijun](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jijun/32/57765_2.png) [@jijun](https://discourse.nodered.org/u/jijun)\
**Post date:** [3 March 2022 11:17 UTC](https://discourse.nodered.org/t/can-i-save-the-flow-file-into-a-remote-database/59290/4 "2022-03-03T11:17:31Z")

</div>

Thank you, it's very useful to me

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 May 2022 11:18 UTC](https://discourse.nodered.org/t/can-i-save-the-flow-file-into-a-remote-database/59290/5 "2022-05-02T11:18:03Z")

</div>

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