env.json
What is the purpose of env.json?
env.json is a four‑party contract between the Unit, Pepeunit, the User, and the Administrator of the Pepeunit instance:
- The Unit guarantees to all parties that it will use the values from env.json as the runtime values for the variables declared in env_example.json.
- Pepeunit guarantees to all parties that when environment variables are first set in env.json, it will generate all standard variables.
- Pepeunit guarantees to all parties that the Unit will be able to authorize itself for topics and connections in EMQX, and authorize itself in the Backend using
PU_AUTH_TOKEN. - Pepeunit guarantees to all parties the ability to modify env.json.
- Pepeunit guarantees to all parties that env.json will be stored in encrypted form.
- Pepeunit guarantees to all parties that only the creator of the Unit will have access to env.json.
- The Administrator guarantees to all parties that env.json will never be shared with anyone who is not a party to this contract.
Configuration files such as env.json or the Backend ENV are mechanisms for individualizing shared code for a particular device or application instance.
DANGER
Use only trusted Pepeunit instances. Make sure the Administrator of the Pepeunit instance fulfills their contractual obligations regarding env.json.
What are the main properties of env.json?
- env.json is a secret file and must not be shared with anyone.
- env.json allows convenient configuration and state updates of a Unit without fully updating the program files.
- env.json allows a Unit to know which Pepeunit instance it belongs to.
- env.json, through the
PU_AUTH_TOKENvariable, allows Pepeunit to perform authorization for a specific Unit.