When to use
Use environment variables for:- Database URLs (
DATABASE_URL) - External service API keys
- Session and webhook secrets
- Feature flags and per-environment configuration
Rules the API enforces
The API rejects reserved keys likeNODE_ENV, PORT, PATH, HOME, and prefixes like HYZE_, DOCKER_, AWS_. Prefer application names: APP_ENV, DATABASE_URL, and similar.
PUT /api/apps/:appId/env merges the variables you send into the existing environment — it doesn’t replace everything.
Common sense
- Never commit secrets to version control
- Use clear, descriptive variable names
- Rotate leaked keys immediately
- Keep production and development values separate
Changed a variable? Restart
Variables are injected when the process starts. After updating values used during boot, restart the app.Next steps
Manage secrets
Update app environment variables.
Env endpoint
Reference for
PUT /api/apps/:appId/env.
