Skip to content

Configuration

All services read their configuration from one environment file (.env). This page documents every variable in that file. Required means the variable is empty in example.env and has no usable default.

Image versions are no longer configured here. They are pinned in docker-compose.yml and in the quadlets. See Versioning and compatibility and running a different image.

Host

Used by docker-compose.yml only.

Variable Default Meaning
GATEWAY_DATABASE_PG_DATA ./postgres/data Host path for the gateway database
RAG_DATABASE_PG_DATA ./postgres-rag/data Host path for the RAG database
RAG_TEMP_DATA ./temp_data Host path for temporary storage of uploaded files during ingestion, shared by api-gateway, ingestion and dlq-consumer
RAG_RABBIT_MQ_DATA ./rabbitmq-rag/data Host path for RabbitMQ data
WEB_GATEWAY_HOST_PORT 8000 Host port of the public API

Gateway database

Not to be confused with the DB_* variables!

Variable Default Meaning
POSTGRES_PASSWORD empty (required) Password of the gateway database
POSTGRES_USER empty (required) User of the gateway database
POSTGRES_DB empty (required) Database name

RAG Web (web-gateway)

RAG Web reads .NET configuration keys, where __ separates levels. Instead of environment variables, you can mount an appsettings.json at /app/appsettings.json (see web-gateway/example.appsettings.json).

Variable Default Meaning
ConnectionStrings__DefaultConnection points to gateway-database Connection string of the gateway database. Change it only for an external PostgreSQL
Valkey__ConnectionString valkey:6379 Valkey address (cache). Change it only for an external Valkey
ApiKeyAuthentication__LookupLength 12 Characters of an API key used as its lookup. Must match the key script
ApiKeyAuthentication__SaltLength 32 Salt length. Must match the key script
ApiKeyAuthentication__AbsoluteExpirationSeconds 300 How long a resolved API key stays cached
EndpointOptions__Base empty (required) Base URL of the OpenAI-compatible provider for chat completions and /v1/models. End it with /, for example https://provider.example/api/v1/. Without the slash, RAG Web drops the last path segment and the provider answers 404
EndpointOptions__Token empty (required) Token for that provider
EndpointOptions__ChatModelVersion empty Not used currently. Clients always choose the model per request
FilesOptions__Endpoint http://api-gateway:8000 Internal URL of RAG System
FilesOptions__Token empty (required) Bearer token RAG Web presents to RAG System. Use a long random value
Logging__LogLevel__Default Information Log level
Logging__LogLevel__Microsoft.AspNetCore Warning Log level of the web framework
Logging__LogLevel__Microsoft.EntityFrameworkCore Warning Log level of database access

RAG System

Read by api-gateway, ingestion, dlq-consumer and rag-database-migrations.

Variable Default Meaning
LOG_LEVEL INFO Log level
TEMP_UPLOAD_DIR /app/temp_data Container path for uploaded files. Leave it as is
HIDE_PROMPTS true Keeps prompts out of the logs, regardless of LOG_LEVEL
EMBEDDING_DIMENSION 4096 Embedding size. Only 4096 is supported currently
DB_USER empty (required) User of the RAG database
DB_PASSWORD empty (required) Password of the RAG database
DB_HOST rag-database Host of the RAG database
DB_PORT 5432 Port of the RAG database
DB_NAME rag-postgres Name of the RAG database
MB_USER empty (required) RabbitMQ user
MB_PASSWORD empty (required) RabbitMQ password
MB_HOST rabbitmq RabbitMQ host
MB_PORT 5672 RabbitMQ port
FILE_QUEUE_NAME empty (built-in name) Name of the file queue
DEAD_LETTER_QUEUE_NAME empty (built-in name) Name of the dead-letter queue
FILE_QUEUE_MAX_REQUEUE_ATTEMPTS empty (1) How often a failed file is requeued before it's marked FAILED
INGESTION_PREFETCH_COUNT empty (1) Files ingested concurrently. Values above 1 are unsupported currently

Default collection

Used when a request names no collection.

Variable Default Meaning
DEFAULT_TENANT_ID empty (random UUID per start) Tenant for direct calls to RAG System (impossible for client applications) that carry no tenant. Set a fixed UUID (version 4) for consistency
DEFAULT_APPLICATION_ID empty (1) Application number of the default collection
DEFAULT_INSTANCE_ID empty (1) Instance number of the default collection
DEFAULT_ENTITY_ID empty (1) Entity number of the default collection

Inference provider

Two OpenAI-compatible endpoints, for example KI:Connect: one for embeddings and one for the generation steps of retrieval and ingestion. Sharing the same provider is usually easiest.

Variable Default Meaning
DEFAULT_EMB_BASE_URL empty (required) Base URL of the provider used for embeddings
DEFAULT_EMB_MODEL_VERSION empty (required) Embedding model. It must return 4096-dimensional vectors
DEFAULT_EMB_TOKEN empty (required) Token for the embedding provider
DEFAULT_EMB_NODE_ID, DEFAULT_EMB_PORT empty Leave empty
DEFAULT_GEN_BASE_URL empty (required) Base URL of the provider used for generation
DEFAULT_GEN_MODEL_VERSION empty (required) Generation model. A vision-processing capable model is recommended (e.g. Mistral 4) because it is also used for OCR in ingestion
DEFAULT_GEN_TOKEN empty (required) Token for the generation provider
DEFAULT_GEN_NODE_ID, DEFAULT_GEN_PORT empty Leave empty

Set by the deployment files

Variable Set where Meaning
APP_RELEASE docker-compose.yml, quadlets Product release, reported as product by GET /version. Don't set it yourself