Environment Variables
Configure your Backend
Environment Variables are key-value pairs used to store configuration settings and parameters, influencing the behavior and settings of your services at runtime.
Here is how you would access an environment variable, MY_NHOST_CONFIG
, from a function:
functions/print-env.ts
Variables created are available to all services, including Run Services and Functions
Adding Environment Variables
Project Dashboard -> Settings -> Environment Variables
System Environment Variables
System environment variables are generated and managed by Nhost. The following variables are available:
NHOST_ADMIN_SECRET
NHOST_WEBHOOK_SECRET
NHOST_SUBDOMAIN
NHOST_REGION
NHOST_HASURA_URL
NHOST_AUTH_URL
NHOST_GRAPHQL_URL
NHOST_STORAGE_URL
NHOST_FUNCTIONS_URL
NHOST_JWT_SECRET
NHOST_ADMIN_SECRET
, NHOST_WEBHOOK_SECRET
and NHOST_JWT_SECRET
are populated with values from their corresponding secrets.
Example values:
Was this page helpful?