node-red / node-red

Low-code programming for event-driven applications
http://nodered.org
Apache License 2.0
19.89k stars 3.42k forks source link

Docs: Clarify flow file/credential file setup and how flows can be moved #1263

Open TristanCP opened 7 years ago

TristanCP commented 7 years ago

Hi, I have a real simple scenario where I want to deploy on 50 raspberries a flow which publish temperatures to a MQTT broker. The MQTT broker requires user/password authentication and it works great through UI but now, the credentials are not in my flow file and I can't find them anywhere (I can find Twitter credentials from an other test though, but not MQTT credentials).

Could u please tell me where they are, and if they will work by just copying them to my 50 devices ?

hardillb commented 7 years ago

As mentioned in the contribution guide, please use the Google Group or the Slack Team for general question.

The credentials are stored in a separate file stored next to the flow file. If the flow file is called raspberrypi.json the credentials will be encrypted and stored in raspberrypi_creds.json

hardillb commented 7 years ago

You should also make sure all the devices have the same credentialSecret value in their [userDir]/settings.json file so they can all decrypt the credentials.

TristanCP commented 7 years ago

Ok, thanks for the tip about credentialSecret. About the _creds.json file, I had it, I just misinterpreted the file name, I thought it was only related to Twitter credentials.

If this kind of deployment is described somewhere in the doc, I guess this issue can be closed, otherwise the doc could use some update because I think this is a basic use case.