# Flows lost after power loss

**URL:** <https://discourse.nodered.org/t/flows-lost-after-power-loss/38776>\
**Category:** General\
**Created:** [8 January 2021 10:37 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776 "2021-01-08T10:37:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukeyboytas1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lukeyboytas1/32/34979_2.png) [@lukeyboytas1](https://discourse.nodered.org/u/lukeyboytas1)\
**Post date:** [8 January 2021 10:37 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/1 "2021-01-08T10:37:36Z")

</div>

When I build a flow, and I leave the pi turned off for a while (Day or more), I turn it back on and the flow is gone.. any help/advice. New to NodeRED btw

luke

---

<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:** [8 January 2021 10:49 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/2 "2021-01-08T10:49:18Z")

</div>

If you turn the pi off for 20 seconds (disconnected from power) and then power it up again is the flow gone?

---

<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:** [8 January 2021 10:50 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/3 "2021-01-08T10:50:36Z")

</div>

How do you start Node-RED?  
If you don't name the flow in the startup command, nr uses the host name to name the flow file. It is possible that on your network, the name of the device has changed so when NR starts there is no flow file by the new name.

If you look at the startup log yo will see the name of the flow file file being used - for example  
`8 Jan 05:44:30 - [info] Flows file : /home/pi/.node-red/test.flow `  
If you go to the .node-red folder, you can look at the names of the files there and see if you can find the original flow file.

You can also start node-red using the name of the flow file:  
`node-red my_great_flow.flow`

---

<div class="post-metadata">

**Author:** ![lukeyboytas1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lukeyboytas1/32/34979_2.png) [@lukeyboytas1](https://discourse.nodered.org/u/lukeyboytas1)\
**Post date:** [8 January 2021 10:57 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/4 "2021-01-08T10:57:31Z")

</div>

still there after 20 sec..

---

<div class="post-metadata">

**Author:** ![lukeyboytas1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lukeyboytas1/32/34979_2.png) [@lukeyboytas1](https://discourse.nodered.org/u/lukeyboytas1)\
**Post date:** [8 January 2021 10:58 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/5 "2021-01-08T10:58:41Z")

</div>

ah!... so if pi gets a diff IP address (as its dynamic) same thing??

---

<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:** [8 January 2021 11:31 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/6 "2021-01-08T11:31:55Z")

</div>

It would not normally get a different host name when it got a new ip, so there is something unusual about your setup. Did you install node-red using the [recommended method](https://nodered.org/docs/getting-started/raspberrypi)?

Also you can follow @zenofmud's suggestions to work out what is happening.

---

<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:** [8 January 2021 11:40 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/7 "2021-01-08T11:40:01Z")

</div>

It's the hostname that is the key. On the Pi, it shouldn't change but show us what is in the .node-red folder

```auto
cd $home
ls .node-red -al

```

---

<div class="post-metadata">

**Author:** ![lukeyboytas1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lukeyboytas1/32/34979_2.png) [@lukeyboytas1](https://discourse.nodered.org/u/lukeyboytas1)\
**Post date:** [11 January 2021 10:21 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/8 "2021-01-11T10:21:36Z")

</div>

Ok thanks everyone - I'll try giving it a name 🙂

---

<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:** [11 January 2021 11:09 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/9 "2021-01-11T11:09:57Z")

</div>

Have you looked in the .node-red folder, as suggested, to try and work out what is going on?

---

<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:** [12 March 2021 11:09 UTC](https://discourse.nodered.org/t/flows-lost-after-power-loss/38776/10 "2021-03-12T11:09:58Z")

</div>

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