# Node Red in Docker loosing all flows every restart/reboot

**URL:** <https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402>\
**Category:** General\
**Created:** [6 July 2018 19:41 UTC](https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402 "2018-07-06T19:41:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnoork](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@cnoork](https://discourse.nodered.org/u/cnoork)\
**Post date:** [6 July 2018 19:41 UTC](https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402/1 "2018-07-06T19:41:50Z")

</div>

I am running Node Red in docker on my Synology. It is working as I like only after restart the container or restart Synology all my flows are gone. I mount the /data to a volume on Synology. When I shutdown the container all looks fine in the container but when I start the caontainer again the files will be overwirten and I loos all flows. What do I wrong and how can I solve this?

With kind regards,  
Chris

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 July 2018 21:28 UTC](https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402/2 "2018-07-06T21:28:48Z")

</div>

You could set node-red to not autostart in the container. Then restart the container and check whether the flows file is still present. I suspect you will find that it is gone, in which case this is a docker issue.

---

<div class="post-metadata">

**Author:** ![cnoork](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@cnoork](https://discourse.nodered.org/u/cnoork)\
**Post date:** [13 July 2018 13:33 UTC](https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402/3 "2018-07-13T13:33:56Z")

</div>

Hi Colin, thanks for your reaction. The data is always gone for Node Red with a restart. I am also running Infuxdb where the data is placed out site the docker container like Node Red and that does not have the issue with disappearing data after a restart. I have already updated Node Red to the latest version (6.11.0) but that did not help.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 July 2018 15:13 UTC](https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402/4 "2018-07-13T15:13:14Z")

</div>

> [@cnoork](#):
>
> I have already updated Node Red to the latest version (6.11.0) but that did not help.

Ummm NR is at v0.18.7

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 July 2018 15:31 UTC](https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402/5 "2018-07-13T15:31:05Z")

</div>

> [@cnoork](#):
>
> The data is always gone for Node Red with a restart.

I don't think that actually answered the point I made.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 July 2018 15:43 UTC](https://discourse.nodered.org/t/node-red-in-docker-loosing-all-flows-every-restart-reboot/1402/6 "2018-07-13T15:43:48Z")

</div>

Hi @cnoork,

I suggest the thing to check is whether node-red is writing its data to where you think it is, and whether that is really mounted externally.

When Node-RED starts up it logs the full path to the flow file it uses - check that is under /data, if that's where you've mounted the volume.

Also check the files are actually there outside of the container - wherever you've mounted /data from.

Nick
