> For the complete documentation index, see [llms.txt](https://docs.alpha-security.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alpha-security.app/reference/environment-vars.md).

# Environment Variables

Complete reference for all environment variables. See also the [deployment guide](/deployment/environment.md) for practical setup instructions.

## Server

### Required

| Variable             | Description                                                                   |
| -------------------- | ----------------------------------------------------------------------------- |
| `ALPHA_DATABASE_URL` | PostgreSQL connection string (e.g. `postgres://al:pass@localhost:5432/alpha`) |
| `ALPHA_JWT_SECRET`   | Signing key for auth tokens. Minimum 16 characters.                           |

### Optional

| Variable                      | Default          | Description                                                                       |
| ----------------------------- | ---------------- | --------------------------------------------------------------------------------- |
| `NODE_ENV`                    | `development`    | `development`, `production`, or `test`                                            |
| `ALPHA_HOST`                  | `0.0.0.0`        | Server bind address                                                               |
| `ALPHA_PORT`                  | `8080`           | Server bind port                                                                  |
| `ALPHA_JWT_EXPIRES_IN`        | `8h`             | Auth token TTL (e.g. `1h`, `30m`, `7d`)                                           |
| `ALPHA_RETENTION_CHECK_HOURS` | `6`              | Interval for retention policy checks (hours)                                      |
| `ALPHA_TOTP_ISSUER`           | `Alpha`          | MFA issuer name shown in authenticator apps                                       |
| `ALPHA_TOTP_ENCRYPTION_KEY`   | -                | 32-byte hex (64 chars) for encrypting TOTP secrets. Required only if MFA is used. |
| `ALPHA_OBJECT_STORE`          | `fs`             | Artifact backend: `fs` or `s3`                                                    |
| `ALPHA_OBJECT_STORE_PATH`     | `./data/objects` | Local path when using `fs` backend                                                |
| `ALPHA_S3_ENDPOINT`           | -                | S3-compatible endpoint (required for `s3` backend)                                |
| `ALPHA_S3_ACCESS_KEY`         | -                | S3 access key                                                                     |
| `ALPHA_S3_SECRET_KEY`         | -                | S3 secret key                                                                     |

## Docker Compose

These are used by the Postgres container in `docker-compose.prod.yml`:

| Variable            | Description                                                                   |
| ------------------- | ----------------------------------------------------------------------------- |
| `POSTGRES_PASSWORD` | Postgres container password. Must match the password in `ALPHA_DATABASE_URL`. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.alpha-security.app/reference/environment-vars.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
