# Configuration

> Every Resta environment variable with its default, for Coolify and Docker Compose installs.

Source: https://resta.dev/docs/configuration · Updated 2026-11-01

**Resta is configured with environment variables on the compose stack; only the public URL is required, and Coolify sets that for you.** Everything else has a default. Variables go in `.env` for Docker Compose, or in the resource's environment on Coolify.

## Address and account

| Variable | Default | Meaning |
|---|---|---|
| `RESTA_PUBLIC_URL` | required (Coolify: `SERVICE_FQDN_GATEWAY`) | The URL people and apps use, e.g. `https://db.example.com`. Database URLs are built from it. |
| `RESTA_SITE_ADDRESS` | `:80` | Your domain, for Caddy to get a TLS certificate. Keep `:80` when another proxy terminates TLS. |
| `RESTA_HTTP_PORT`, `RESTA_HTTPS_PORT` | `80`, `443` | Host ports the gateway publishes. |
| `RESTA_ADMIN_EMAIL`, `RESTA_ADMIN_PASSWORD` | unset | Create the account on start. Used only if no account exists. Password at least 10 characters. |
| `RESTA_VERSION` | `latest` | Image tag for the api, node and dashboard images. |

## Secrets

Generate each with `openssl rand -hex 32`. Coolify generates them for you.

| Variable | Coolify | Meaning |
|---|---|---|
| `POSTGRES_PASSWORD` | `SERVICE_PASSWORD_POSTGRES` | Postgres password. |
| `RESTA_OPERATOR_TOKEN` | `SERVICE_PASSWORD_64_OPERATOR` | Operator routes, reachable only inside the stack. At least 32 characters. |
| `RESTA_NODE_ADMIN_TOKEN` | `SERVICE_PASSWORD_64_NODEADMIN` | API-to-node admin calls. At least 32 characters. |

The token signing key pair is not configured: the API generates it into the `keys` volume on first start. Deleting it invalidates every database token issued so far.

## Backups

| Variable | Default | Meaning |
|---|---|---|
| `RESTA_BACKUP_TARGET` | `file:///backups` | Where snapshots go: the `backups` volume, `s3://bucket/prefix`, or `off`. |
| `RESTA_BACKUP_INTERVAL_SECS` | `3600` | How often changed databases are snapshotted. The most a restore can lose. |
| `RESTA_BACKUP_KEEP` | `72` | Snapshots kept per database (72 hourly = 3 days). |
| `RESTA_S3_ENDPOINT` | unset | For S3-compatible stores other than AWS (R2, B2, MinIO). |
| `AWS_REGION` | `us-east-1` | Region; `auto` for Cloudflare R2. |
| `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` | unset | Bucket credentials. |

See [Backups and restore](https://resta.dev/docs/backups).

## Limits

| Variable | Default | Meaning |
|---|---|---|
| `RESTA_MAX_DATABASE_BYTES` | `1073741824` (1 GiB) | Size limit per database. Writes past it fail with `SQLITE_FULL`. |
| `RESTA_MAX_OPEN_DATABASES` | `10000` | Databases open at once. Idle ones close after 5 minutes; when full, the least recently used idle one closes. |
| `RESTA_MAX_TOKEN_TTL_SECS` | `2592000` (30 days) | Longest lifetime a database token can have. |
| `RESTA_QUERY_TIMEOUT_SECS` | `5` | Wall-clock limit per statement. |
| `RESTA_REQUEST_TIMEOUT_SECS` | `30` | Wall-clock limit per HTTP request. |
| `RESTA_MAX_CONCURRENT_REQUESTS` | `256` | Requests the node runs at once; more get `503`. |
