Server, embedding, extraction, and CLI/admin runtime variables.
| Variable | Required | Default | Description |
|---|
DATABASE_URL | non-Compose or external Postgres | | PostgreSQL connection string. Default Compose creates and wires its own database connection. |
OPENAI_API_KEY | conditional | | Required when OpenAI embeddings are used or OpenAI extraction is enabled. |
PORT | no | 3100 | HTTP/MCP server port. |
OAUTH_ENABLED | no | false | Enable OAuth authorization-code, PKCE, and Dynamic Client Registration routes for native remote MCP connectors. |
PUBLIC_BASE_URL | when OAuth enabled | | Public HTTPS origin for OAuth metadata and callback URLs. Example: https://postgram.example.com. |
LOG_LEVEL | no | info | Logger level (fatal/error/warn/info/debug). |
ENRICHMENT_POLL_INTERVAL_MS | no | 1000 | Enrichment worker polling interval. |
| Variable | Required | Default | Description |
|---|
EMBEDDING_PROVIDER | no | Compose chooses openai with OPENAI_API_KEY, otherwise ollama | openai or ollama. |
EMBEDDING_MODEL | no | per provider | Defaults: text-embedding-3-small (OpenAI), bge-m3 (Ollama). |
EMBEDDING_DIMENSIONS | no | per provider | Must match active embedding_models entry. |
EMBEDDING_BASE_URL | when ollama | OLLAMA_BASE_URL fallback | Embedding host (can be different from LLM host). |
EMBEDDING_API_KEY | no | | Optional bearer token for embedding endpoint. |
| Variable | Required | Default | Description |
|---|
EXTRACTION_ENABLED | no | false | Toggle extraction pass. |
EXTRACTION_MEMORY_MODE | no | embed_only | Controls graph extraction for type=memory: embed_only embeds memories without graph/entity extraction, extract_durable extracts only durable memories, and extract_all extracts durable memory plus session context. |
EXTRACTION_PROVIDER | no | openai | openai, anthropic, ollama, openai-compatible. |
EXTRACTION_MODEL | no | per provider | Controls model used by extraction worker. |
EXTRACTION_AUTO_CREATE_ENTITIES | no | false | Auto-create entity stubs referenced by extracted text. |
EXTRACTION_AUTO_CREATE_TYPES | no | person,project,interaction | Allowed entity types for auto-create. |
EXTRACTION_AUTO_CREATE_MIN_CONFIDENCE | no | 0.7 | Min confidence threshold for auto-create. |
EXTRACTION_SEMANTIC_NEIGHBORS_ENABLED | no | false | Enable semantic-neighbor graph pass. |
EXTRACTION_SEMANTIC_NEIGHBORS_MAX | no | 10 | Max neighbors per entity. |
EXTRACTION_SEMANTIC_NEIGHBORS_MIN_SIMILARITY | no | 0.65 | Similarity threshold for semantic neighbor links. |
EXTRACTION_BASE_URL | when compatible provider | | OpenAI-compatible base URL including /v1 if needed. |
EXTRACTION_API_KEY | no | | Optional bearer token for compatible extraction endpoint. |
ANTHROPIC_API_KEY | when anthropic | | Anthropic API key. |
OLLAMA_BASE_URL | no | http://localhost:11434 outside Compose; http://host.docker.internal:11434 in Compose | Ollama endpoint. |
LLM_REQUEST_TIMEOUT_MS | no | 120000 | Per-call timeout in milliseconds. |
| Variable | Required | Description |
|---|
PGM_API_URL | yes | API URL used by pgm. |
PGM_API_KEY | yes | API key for user operations. |
DATABASE_URL or PGM_DATABASE_URL | admin | DB access for pgm-admin. |
PGM_BACKUP_PASSPHRASE | when encrypt | Passphrase for encrypted backups. |
- For Docker + host-hosted Ollama, prefer
http://host.docker.internal:11434.
- Memory entities remain searchable through embeddings even when
EXTRACTION_MEMORY_MODE=embed_only.
- The semantic-neighbor feature creates edges with
source='semantic-neighbor'.
PUBLIC_BASE_URL should not include /mcp; ChatGPT and Claude connector URLs
use ${PUBLIC_BASE_URL}/mcp.