Platform
Secrets
Configure your Backend with Sensitive Data
Secrets are key-value pairs similar to Environment Variables but used to store sensitive data in a secure way.
Secrets should be used for two purposes:
-
to avoid placing sensitive information in your configuration file in plain sight
-
as placeholders for values that might differ between environments
Add Secrets
When using secrets, they need to be set in both local and cloud instances.
Nhost Local
The Nhost CLI looks up for a .secrets
file at the root of your project directory. A typical file looks like the following:
Terminal
Nhost Cloud
The secret values for your cloud instance can be set by navigating to your project’s Settings -> Secrets.
Reference Secrets
nhost/nhost.toml