Closed beta — join the waiting list

Environment Variables

Configure secrets and runtime settings for your deployments.

Auto-injected variables

Hatch automatically injects these environment variables into every deployment:

PORTThe port your application should listen on
NODE_ENVSet to production for production deploys
HATCH_APP_NAMEThe name of your deployed project
HATCH_DEPLOY_URLThe full URL of the current deployment
HATCH_REGIONThe deployment region (e.g. eu-west)

Setting custom variables

Set environment variables using the CLI:

# Set a variable
hatch env set API_KEY=sk-my-secret --project my-app

# Set multiple variables
hatch env set DB_HOST=db.example.com DB_PORT=5432 --project my-app

# List all variables
hatch env list --project my-app

# Remove a variable
hatch env remove API_KEY --project my-app

Secrets

Environment variables are encrypted at rest and only decrypted during build and at runtime. They are never exposed in logs or the dashboard UI after being set. Variable values are write-only — you can update or delete them, but not read them back.

Hatch mascot