Skip to main content

Environment Variables

Environment Variables are key-value pairs configured outside your source code. They are used to store environment-specific values such as API keys.

You can manage your project's Environment Variables in Nhost Dashboard under Variables. When you define a new variable, you can set one value for production and one for development.

Environment Variables

When an Environment Variable is changed, you must deploy your project again using the GitHub integration for the changes to take effect.

Environment Variables are available in:

  • Hasura
  • Serverless Functions

System Environment Variables

System Environment Variables are automatically available in production and during development. The following system Environment Variables are available:


Example values:

NHOST_JWT_SECRET={"type": "HS256", "key": "vumpbe2w2mgaqj5yqfp7dvxu6kywtvsgb68ejpdaqxerea8

Development Environment Variables

When developing locally using the CLI, Environment Variables set in .env.development are available in your local environment. There are two ways to manage them:

  1. Edit the .env.development file manually.
  2. Add development Environment Variables in the Nhost Dashboard and use nhost env pull to sync them. This way, your team members will also have access to the same Environment Variables.