> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyzecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Secrets and environment variables

> Store runtime configuration outside your source code.

Environment variables configure apps without rebuilding them.

## Goal

Keep secrets safe and make deployments portable.

## When to use

Use environment variables for database URLs, API keys, feature flags, and service credentials.

## Example

```json theme={"system"}
{
  "envVars": {
    "NODE_ENV": "production",
    "DATABASE_URL": "postgresql://user:pass@host:5432/db"
  }
}
```

## Rules

* Do not commit secrets.
* Use clear variable names.
* Rotate leaked keys immediately.
* Keep production and development values separate.

## Next steps

<CardGroup cols={2}>
  <Card title="Manage secrets" icon="key" href="/en/guides/manage-secrets">
    Update app environment variables.
  </Card>

  <Card title="App environment API" icon="book-open" href="/api-reference/apps#set-environment-variables">
    View the endpoint reference.
  </Card>
</CardGroup>
