# Configuration

> The engine's settings: environment variables of its functions and their defaults.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://run.docs.sypnia.com/self-hosting/configuration/

For agents: Run engine configuration env vars: SYPNIA_RUN_DATABASE_URL (Secrets Manager), SYPNIA_RUN_BUCKET, SYPNIA_RUN_APPS_DOMAIN, SYPNIA_RUN_BUILD_TIMEOUT (1800), SYPNIA_RUN_MAX_CONCURRENT_BUILDS (4), SYPNIA_RUN_DEPLOY_RETENTION (30 days, last 10 per env kept), SYPNIA_RUN_LOG_RETENTION (30), SYPNIA_RUN_TELEMETRY_URL, SYPNIA_RUN_ADMIN_KEYS (SSM path, hashed); API keys via engine keys create --scope.

The stack sets these on the engine's functions; change them with a stack update.

| Variable                           | Default                    | Meaning                                                                                              |
| ---------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------- |
| `SYPNIA_RUN_DATABASE_URL`          | the stack's RDS            | Postgres connection string, from Secrets Manager                                                     |
| `SYPNIA_RUN_BUCKET`                | the stack's bucket         | Artifacts and static files                                                                           |
| `SYPNIA_RUN_APPS_DOMAIN`           | none                       | Wildcard domain for app addresses                                                                    |
| `SYPNIA_RUN_BUILD_TIMEOUT`         | `1800`                     | Seconds before a build is stopped                                                                    |
| `SYPNIA_RUN_MAX_CONCURRENT_BUILDS` | `4`                        | Builds at once; the rest wait                                                                        |
| `SYPNIA_RUN_DEPLOY_RETENTION`      | `30`                       | Days to keep deploys not pointed to by any environment (the last 10 per environment are always kept) |
| `SYPNIA_RUN_LOG_RETENTION`         | `30`                       | Days of app logs in CloudWatch                                                                       |
| `SYPNIA_RUN_TELEMETRY_URL`         | none                       | A Sypnia Telemetry endpoint to forward logs and releases                                             |
| `SYPNIA_RUN_ADMIN_KEYS`            | the one created at install | Parameter Store path of the engine's API keys (hashed)                                               |

API keys of a self-hosted engine are created with `npx @sypnia/run engine keys create --scope run:deploy` and shown once.
