# Creating new flow instead of using existing one

**URL:** <https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852>\
**Category:** General\
**Created:** [29 December 2021 16:07 UTC](https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852 "2021-12-29T16:07:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maximilian](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@Maximilian](https://discourse.nodered.org/u/Maximilian)\
**Post date:** [29 December 2021 16:07 UTC](https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852/1 "2021-12-29T16:07:11Z")

</div>

Hello,

recently for some reason, when node-red gets started, it finds the flow in the directory, but instead it chooses to create a new flow and use that one instead. Can you help with this issue please?

Original version - german  
Translation by me - might not be 100% accurate  
Attached you find the information, when i try to start the flow.

Thanks in advance & best regards,

Maximilian Beck

Original:

# Willkommen bei Node-RED!

29 Dec 15:44:15 - [info] Node-RED Version: v1.0.4  
29 Dec 15:44:15 - [info] Node.js Version: v6.14.4  
29 Dec 15:44:15 - [info] OS400 7.1 ppc BE  
29 Dec 15:44:17 - [info] Paletten-Nodes werden geladen  
29 Dec 15:44:22 - [info] Dashboard version 2.9.5 started at /ui  
29 Dec 15:44:22 - [info] Einstellungsdatei: /home/ILS/.node-red/settings.js  
29 Dec 15:44:22 - [info] Kontextspeicher: 'default' [module=localfilesystem]  
29 Dec 15:44:22 - [info] Benutzerverzeichnis: /home/ILS/.node-red  
29 Dec 15:44:22 - [warn] Projekte inaktiviert: editorTheme.projects.enabled=false  
29 Dec 15:44:22 - [info] Flow-Datei: /home/ILS/.node-red/flows\_PREYREG.preymesser.de.json  
29 Dec 15:44:22 - [info] Neue flow-Datei wird erstellt  
29 Dec 15:44:22 - [warn]

* * *

Die Datei mit den Datenflowberechtigungsnachweisen wird mit einem vom System generierten SchlÃ¼ssel verschlÃ¼sselt.

Wenn der vom System generierte SchlÃ¼ssel aus irgendeinem Grund verloren geht, werden Ihre Berechtigungsnachweise  
Die Datei kann nicht wiederhergestellt werden. Sie mÃ¼ssen sie lÃ¶schen und erneut eingeben.  
Ihre Berechtigungsnachweise.

## Sie sollten Ihren eigenen SchlÃ¼ssel mit Hilfe der Option 'credentialSecret' in Ihre Einstellungsdatei. Node-RED wird dann Ihre Berechtigungsnachweise erneut verschlÃ¼sseln. Datei mit dem ausgewÃ€hlten SchlÃ¼ssel beim nÃ€chsten Deployen einer Ã nderung verwenden.

English - translated by me:

# Welcome to Node-RED!

29 Dec 15:44:15 - [info] Node-RED Version: v1.0.4  
29 Dec 15:44:15 - [info] Node.js Version: v6.14.4  
29 Dec 15:44:15 - [info] OS400 7.1 ppc BE  
29 Dec 15:44:17 - [info] Palette-Nodes loading  
29 Dec 15:44:22 - [info] Dashboard version 2.9.5 started at /ui  
29 Dec 15:44:22 - [info] Settings: /home/ILS/.node-red/settings.js  
29 Dec 15:44:22 - [info] Context: 'default' [module=localfilesystem]  
29 Dec 15:44:22 - [info] User directory: /home/ILS/.node-red  
29 Dec 15:44:22 - [warn] Project inactive: editorTheme.projects.enabled=false  
29 Dec 15:44:22 - [info] Flow-file: /home/ILS/.node-red/flows\_PREYREG.preymesser.de.json  
29 Dec 15:44:22 - [info] Creating new flow file  
29 Dec 15:44:22 - [warn]

* * *

## Warning about proof of eligibility on data flow file. . . .

---

<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:** [29 December 2021 16:09 UTC](https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852/2 "2021-12-29T16:09:47Z")

</div>

By default, Node-RED uses the hostname as part of the flow file name. That can cause problems if your hostname changes for some dns-related reason.

The solution is to edit your `settings.js` file (` /home/ILS/.node-red/settings.js`) and set the `flowFile` property to a fixed name (like `flows.json`).

---

<div class="post-metadata">

**Author:** ![Maximilian](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@Maximilian](https://discourse.nodered.org/u/Maximilian)\
**Post date:** [29 December 2021 16:38 UTC](https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852/4 "2021-12-29T16:38:04Z")

</div>

Thanks for the fast reply!

As the Log above shows, the flow file is already unindependent from the IP-adresse and called "flows\_PREYREG.preymesser.de.json".  
I implemented it in the settings file now aswell, but the problem remains the same.

---

<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:** [29 December 2021 16:43 UTC](https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852/5 "2021-12-29T16:43:27Z")

</div>

> [@Maximilian](#):
>
> , the flow file is already unindependent from the IP-adresse and called "flows\_PREYREG.preymesser.de.json"

It uses the **hostname** not IP address.

Have you restarted Node-RED after editing the settings file? What flow file name did it log when it started? Does it match what you set in the settings file?

---

<div class="post-metadata">

**Author:** ![Maximilian](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@Maximilian](https://discourse.nodered.org/u/Maximilian)\
**Post date:** [29 December 2021 16:54 UTC](https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852/6 "2021-12-29T16:54:00Z")

</div>

Sorry i did overread that an thought you meant IP.

Thanks alot, it worked just as you described!  
I renamed the \*.json into a fixed named and also changed it in the settings file.  
Now the flow loads just as intended.

---

<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:** [27 February 2022 16:54 UTC](https://discourse.nodered.org/t/creating-new-flow-instead-of-using-existing-one/55852/7 "2022-02-27T16:54:33Z")

</div>

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