# Picking up different flows file

**URL:** <https://discourse.nodered.org/t/picking-up-different-flows-file/14062>\
**Category:** General\
**Created:** [6 August 2019 20:26 UTC](https://discourse.nodered.org/t/picking-up-different-flows-file/14062 "2019-08-06T20:26:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![realjax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realjax/32/895_2.png) [@realjax](https://discourse.nodered.org/u/realjax)\
**Post date:** [6 August 2019 20:26 UTC](https://discourse.nodered.org/t/picking-up-different-flows-file/14062/1 "2019-08-06T20:26:18Z")

</div>

I am working on a custom node which involves having to restart node-red quite often. I've just noticed something strange though. Node-red suddenly started loading a different flows file. Take a look at his log piece:

```auto
6 Aug 22:03:16 - [info] Node-RED version: v0.20.5
6 Aug 22:03:16 - [info] Node.js version: v11.10.1
6 Aug 22:03:16 - [info] Darwin 18.5.0 x64 LE
6 Aug 22:03:17 - [info] Loading palette nodes
6 Aug 22:03:17 - [debug] Module: node-red-contrib-ikea-home-smart 1.0.0
6 Aug 22:03:17 - [debug] /Users/myName/.node-red/node_modules/node-red-contrib-ikea-home-smart
6 Aug 22:03:17 - [debug] Module: node-red-dashboard 2.15.3
6 Aug 22:03:17 - [debug] /Users/myName/.node-red/node_modules/node-red-dashboard
6 Aug 22:03:17 - [debug] Module: node-red-node-email 1.4.0
6 Aug 22:03:17 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-email
6 Aug 22:03:17 - [debug] Module: node-red-node-feedparser 0.1.14
6 Aug 22:03:17 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-feedparser
6 Aug 22:03:17 - [debug] Module: node-red-node-rbe 0.2.4
6 Aug 22:03:17 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-rbe
6 Aug 22:03:17 - [debug] Module: node-red-node-sentiment 0.1.3
6 Aug 22:03:17 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-sentiment
6 Aug 22:03:17 - [debug] Module: node-red-node-tail 0.0.2
6 Aug 22:03:17 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-tail
6 Aug 22:03:17 - [debug] Module: node-red-node-twitter 1.1.4
6 Aug 22:03:17 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-twitter
6 Aug 22:03:17 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
6 Aug 22:03:17 - [info] Dashboard version 2.15.3 started at /ui
6 Aug 22:03:17 - [info] Settings file : /Users/myName/.node-red/settings.js
6 Aug 22:03:17 - [info] Context store : 'default' [module=memory]
6 Aug 22:03:17 - [info] User directory : /Users/myName/.node-red
6 Aug 22:03:17 - [warn] Projects disabled : editorTheme.projects.enabled=false
6 Aug 22:03:17 - [info] Flows file : /Users/myName/.node-red/flows_MyNames-MBP.local.json
6 Aug 22:03:17 - [debug] loaded flow revision: 55b7841aec62164d5358ef96fda05a3a
6 Aug 22:03:17 - [debug] red/runtime/nodes/credentials.load : no user key present
6 Aug 22:03:17 - [debug] red/runtime/nodes/credentials.load : using default key
6 Aug 22:03:17 - [debug] red/runtime/nodes/credentials.load : keyType=system
6 Aug 22:03:17 - [warn]

```

and then a couple of minutes later:

```auto
6 Aug 22:14:44 - [info] Node-RED version: v0.20.5
6 Aug 22:14:44 - [info] Node.js version: v11.10.1
6 Aug 22:14:44 - [info] Darwin 18.5.0 x64 LE
6 Aug 22:14:44 - [info] Loading palette nodes
6 Aug 22:14:44 - [debug] Module: node-red-contrib-ikea-home-smart 1.0.0
6 Aug 22:14:44 - [debug] /Users/myName/.node-red/node_modules/node-red-contrib-ikea-home-smart
6 Aug 22:14:44 - [debug] Module: node-red-dashboard 2.15.3
6 Aug 22:14:44 - [debug] /Users/myName/.node-red/node_modules/node-red-dashboard
6 Aug 22:14:44 - [debug] Module: node-red-node-email 1.4.0
6 Aug 22:14:44 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-email
6 Aug 22:14:44 - [debug] Module: node-red-node-feedparser 0.1.14
6 Aug 22:14:44 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-feedparser
6 Aug 22:14:44 - [debug] Module: node-red-node-rbe 0.2.4
6 Aug 22:14:44 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-rbe
6 Aug 22:14:44 - [debug] Module: node-red-node-sentiment 0.1.3
6 Aug 22:14:44 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-sentiment
6 Aug 22:14:44 - [debug] Module: node-red-node-tail 0.0.2
6 Aug 22:14:44 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-tail
6 Aug 22:14:44 - [debug] Module: node-red-node-twitter 1.1.4
6 Aug 22:14:44 - [debug] /usr/local/lib/node_modules/node-red/node_modules/node-red-node-twitter
6 Aug 22:14:45 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
6 Aug 22:14:45 - [info] Dashboard version 2.15.3 started at /ui
6 Aug 22:14:45 - [info] Settings file : /Users/myName/.node-red/settings.js
6 Aug 22:14:45 - [info] Context store : 'default' [module=memory]
6 Aug 22:14:45 - [info] User directory : /Users/myName/.node-red
6 Aug 22:14:45 - [warn] Projects disabled : editorTheme.projects.enabled=false
6 Aug 22:14:45 - [info] Flows file : /Users/myName/.node-red/flows_MyNames-MacBook-Pro.local.json
6 Aug 22:14:45 - [debug] loaded flow revision: 5f33d08dcd5d76dbe78f76298a972aec
6 Aug 22:14:45 - [debug] red/runtime/nodes/credentials.load : no user key present
6 Aug 22:14:45 - [debug] red/runtime/nodes/credentials.load : using default key
6 Aug 22:14:45 - [debug] red/runtime/nodes/credentials.load : keyType=system
6 Aug 22:14:45 - [warn]

```

Notice the different flows file... What might be causing this? I had only one admin tab open ( chrome) and no other browsers active.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [6 August 2019 20:31 UTC](https://discourse.nodered.org/t/picking-up-different-flows-file/14062/2 "2019-08-06T20:31:49Z")

</div>

Mac OS networking. You can fix the flows file as an option on startup

[https://nodered.org/docs/getting-started/local](https://nodered.org/docs/getting-started/local)

---

<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:** [6 August 2019 22:19 UTC](https://discourse.nodered.org/t/picking-up-different-flows-file/14062/3 "2019-08-06T22:19:01Z")

</div>

Just to spell it out, Node-RED uses the hostname as part of the flow file name by default. This was an early design choice when were copying images around multiple Pis and wanted a convenient way for each Pi to pickup its 'own' flow file.

In retrospect, I wouldn't make that same choice today as I think it causes more problems then it solves.

In this instance, your Mac has picked up a different hostname for some reason. As Mark points out, you can configure Node-RED to use a fixed flows file via either the command-line for the `flowsFile` option in your settings file.

---

<div class="post-metadata">

**Author:** ![realjax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realjax/32/895_2.png) [@realjax](https://discourse.nodered.org/u/realjax)\
**Post date:** [7 August 2019 08:22 UTC](https://discourse.nodered.org/t/picking-up-different-flows-file/14062/4 "2019-08-07T08:22:55Z")

</div>

Thanks all. I'll use the startup option then. I knew a flows file is picked based on a hostname but I guess I didn't expect my mac to suddenly change its hostname...

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [15 August 2019 02:51 UTC](https://discourse.nodered.org/t/picking-up-different-flows-file/14062/5 "2019-08-15T02:51:03Z")

</div>

> [@realjax](#):
>
> I guess I didn't expect my mac to suddenly change its hostname...

It happens to me all the time -- something to do with mdns/bonjour... I think it can be cured by beating up on your router, but I use @ukmoose's solution.
