Any fields marked as credentials get stored in a separate file from the flows file - usually flows_cred.json. Currently if you choose a different flow file name the the creds also get a similar name - eg myflow.json and myflow_cred.json - BUT... you can also specify a different directory for the flows file - and it works just fine... but the creds always stay in the user directory (typically ~/.node-red).
I must admit I had not noticed or indeed cared about this until yesterday... when using docker (yeah yeah I know) I wanted to mount "just" the flows and creds outside the container - but leave settings, nodes and other stuff from the userdir inside... and of course it turns out to be somewhat impossible due to the way we save the files on deploy... ie we write them with a temporary name first then rename them to help avoid file corruption - but this breaks using any symbolic links etc.
So should the creds "track" the location/directory of the flows file so at least they stay together ? That would be a breaking change - but a) would not affect most people who never moved their flow files... (or don't use creds ) b) could be mitigated by checking for file existence etc so existing flows could work but new installs use the new locations.
Or should it be an optional flag to say where the creds are stored ?... uuurgh yet another option to have to think about.
Or is it just a "me" problem and just accept that I need to mount the complete userdir or nothing
Thoughts please