# Configuration reference

Required secrets, endpoint settings and supported tool profiles.

Canonical page: https://ontlgy.io/docs/operate/configuration/

For the supplied Compose installation (the `docker-compose/` directory of [`ontlgy-deployments`](https://github.com/ontlgy/ontlgy-deployments)), set values in `.env` beside `docker-compose.yaml`. The app and worker use the same installation secrets. Do not paste an expanded `docker compose config` into a ticket: it can contain credentials.

## Compose settings

| Variable | Default / requirement | Purpose |
| --- | --- | --- |
| `POSTGRES_PASSWORD` | Required | Control database password; generate letters/digits with `openssl rand -hex 24` |
| `NEO4J_PASSWORD` | Required | Graph database password; generate separately |
| `ONTLGY_PUBLIC_URL` | Required; example uses `http://localhost:8080` | Address users and GitHub use to reach the app |
| `ONTLGY_SECRET_KEY` | Required; base64 for exactly 32 bytes | Encrypts stored integration/provider credentials |
| `ONTLGY_SESSION_SECRET` | Required; at least 32 characters | Signs web form/session-related tokens |
| `ONTLGY_IMAGE_TAG` | Pinned `sha-` tag the deployment files were validated against | Published `appsmithvivonk/ontlgy` image tag for the app and worker; see [Docker Hub](https://hub.docker.com/r/appsmithvivonk/ontlgy/tags) |
| `ONTLGY_PORT` | `8080` | Published host port; does not change the container's port |
| `ONTLGY_TRUST_PROXY` | `false` | Trust forwarded client addresses behind a trusted reverse proxy |
| `ONTLGY_TOOLS` | `lean` | `lean` exposes 11 tools; `full` exposes 19 |
| `ONTLGY_SESSION_MEMORY` | `false` | Enables capture from enrolled agents or workflows and private recall on images with session memory |
| `GOOGLE_API_KEY` | Optional | App credential for structured session-memory extraction. With no key, accepted turns stay queued and existing eligible packages can still be recalled. |
| `GITHUB_API_URL` | `https://api.github.com` | GitHub API base; override is primarily used in tests |

Generate the application secrets independently:

```bash
openssl rand -base64 32
```

Keep `.env` protected and backed up securely. Changing the encryption key in place is not a supported credential-rotation procedure; existing encrypted credentials depend on it.

## Apply changes

Compose reads `.env` when services are created. A simple restart does not necessarily apply a changed container environment.

```bash
docker compose up -d --force-recreate app worker
```

If you change the host port, update `ONTLGY_PUBLIC_URL`, the proxy target if applicable, and agent endpoints. Reload MCP clients after changing the tool profile.

## Session memory

On an app image that includes session memory, pass the optional settings to the app service. Use a local Compose override when your deployment file omits them.

```yaml
services:
  app:
    environment:
      ONTLGY_SESSION_MEMORY: "true"
      GOOGLE_API_KEY: ${GOOGLE_API_KEY:-}
```

Set the provider key in your protected deployment environment. In **Memories → Capture & activity**, the owner can enroll a dedicated API key for an indexed repository and inspect the source’s receipts. Adapters submit bounded completed turns to `POST /api/session-memory/events`.

## Kubernetes settings

The Helm chart and the plain manifests use the same settings under different names. The credentials are generated for you into a Secret (Helm) or by `create-secret.sh`.

| Setting | Helm value | Plain manifests (`kubernetes/kustomization.yaml`) |
| --- | --- | --- |
| `ONTLGY_PUBLIC_URL` | `publicUrl` (required) | `ONTLGY_PUBLIC_URL` literal |
| `ONTLGY_TRUST_PROXY` | `trustProxy` | `ONTLGY_TRUST_PROXY` literal |
| `ONTLGY_TOOLS` | `toolProfile` | `ONTLGY_TOOLS` literal |
| Image tag | `image.tag` | `images[].newTag` |
| Secrets | `secrets.*`, or `secrets.existingSecret` | `ontlgy-secrets` Secret |
| Storage | `*.persistence.size` and `storageClass` | PVC sizes in the manifests |

The chart can also use a Postgres or Neo4j you already run; see its `values.yaml`. Apply a changed value with `helm upgrade` or `kubectl apply -k .`, which rolls the app and worker.

## Source-development settings

These apply to processes launched directly from source. They are not all automatically forwarded by the supplied Compose file.

| Variable | Default / requirement |
| --- | --- |
| `POSTGRES_URI` | Full connection string, or use `POSTGRES_PASSWORD` with the fields below |
| `POSTGRES_HOST` / `POSTGRES_USER` / `POSTGRES_DB` | `localhost` / `postgres` / `postgres` |
| `NEO4J_URI` / `NEO4J_USER` | `bolt://localhost:7687` / `neo4j` |
| `PORT` | App listen port, `8080` |
| `WORKSPACE_ROOT` | Worker clones directory, `/data/clones` |
| `LOG_LEVEL` | `info` |
| `APP_HEALTH_URL` | Worker health dependency; supplied by Compose |

Product installation uses the published image; running from source is only for developing ontlgy.

## Settings in the web app

Configure GitHub, selected repositories, document sources, personal API keys, users and AI providers in the app. Provider keys do not belong in the documentation build or the static website's environment.
