# Allow to specify filename of flows\_cred.json, like flowFile in settings.js

**URL:** https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697
**Category:** Feature Requests
**Created:** [14 September 2022 11:56 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697 "2022-09-14T11:56:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![JoW](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jow/32/108217_2.png) [@JoW](https://discourse.nodered.org/u/JoW)
#### Post date: [14 September 2022 11:56 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697/1 "2022-09-14T11:56:13Z")

</div>

This would allow, like the flowFile, to put it in a subdirectory.

This way flows.json and the corresponding flows\_cred.json file can be in their own git repository (when not using the git integration of node-RED).

This way I can bind mount these files in a docker container and not have them in the ( also bind mounted) /data directory.

Ultimate purpose is a system to allow developers to have a repository

- dockerfile for building the image with preinstalled nodes
- a specific instance of a docker container with developer docker-compose file
- a docker-compose file for server deployment with possibility to revert to a specific tagged version of flows.json.

I'd like to have all this in the same repo, as they belong together, but I don't like to see the entire contents of to repo in the projects directory of node-red.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [16 September 2022 10:17 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697/2 "2022-09-16T10:17:24Z")

</div>

Interesting idea. Certainly the use of the userDir folder has greatly expanded over the years so perhaps it might be time to think about the management of the core files and see if there are some improvements that could be made?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [16 September 2022 12:22 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697/3 "2022-09-16T12:22:41Z")

</div>

If you start node red and pass in a flow name eg `node-red foo.json` then it automatically creates `foo_cred.json` for you... Is this not the case if you set the name in settings.js ?

---

<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: [16 September 2022 12:29 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697/4 "2022-09-16T12:29:04Z")

</div>

> [@dceejay](#):
>
> it automatically creates `foo_cred.json` for you... Is this not the case if you set the name in settings.js ?

It always generates the credentials filename based on the flow file name. However it does not take the directory into account - the credentials file always ends up in `~/.node-red` regardless of where the flow file is.

I must admit that surprised me - I thought it always co-located the files.

So yes, there is something to think about here.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [16 September 2022 12:48 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697/5 "2022-09-16T12:48:27Z")

</div>

oooo - that sort of feel like a bug... but then again I can see why we wouldn't want to just stick creds files inside projects to get uploaded to github for everyone to look at ! That would be even worse.

---

<div class="post-metadata">

### Author: ![JoW](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jow/32/108217_2.png) [@JoW](https://discourse.nodered.org/u/JoW)
#### Post date: [20 October 2022 14:30 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697/6 "2022-10-20T14:30:45Z")

</div>

You could also want to specify a cred file for managing it outside a container running nodered (for prepping rapid deployment e.g.)

---

<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: [19 December 2022 14:31 UTC](https://discourse.nodered.org/t/allow-to-specify-filename-of-flows-cred-json-like-flowfile-in-settings-js/67697/7 "2022-12-19T14:31:10Z")

</div>

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