Skip to content

Configuration Reference

Leliel is configured entirely through environment variables. The server reads them at startup from the process environment. In local development, set them in a .env file and pass them to the Julia process. In Docker, pass them via docker-compose.yml.


Files

File Committed Purpose
.env.example Yes Template for all variables. Copy to .env to configure.
.env No Your actual values and secrets. Never commit.

Variables

Authentication

Variable Required Default Description
KNOWLEDGE_API_KEY Yes dev-key Pipeline token; grants write access to ingest and seed endpoints; also accepted on query and gravity endpoints
KNOWLEDGE_API_USER_KEY Yes dev-user-key User token; grants read access to query, analysis, and gravity endpoints

Both keys are accepted on query, analysis, and gravity endpoints. Only KNOWLEDGE_API_KEY is accepted on ingest, seed, and reinforce endpoints.

Server

Variable Required Default Description
PORT No 8080 Port HTTP.jl listens on

Storage

Variable Required Default Description
DUCKDB_PATH No ./leliel.duckdb Path to the DuckDB file for write-through durability and warm start; created on first boot if absent

DuckDB file is not committed

The file at DUCKDB_PATH is gitignored and excluded from the Docker image. When running via docker-compose, use a named volume or a bind-mount path outside the project directory to persist the store across container restarts. If the file is lost, warm start re-populates the in-memory store from nothing; all mass history is also lost.

Analysis worker

Variable Required Default Description
ANALYSIS_INTERVAL_SECONDS No 300 Seconds between analysis worker cycles; 0 disables the worker

The analysis worker recomputes source summaries, updates the SLEM mesh snapshot log, and writes the current SLEM value to store.slem (which gates the concurrent vs. serial walk path). Setting this to 0 disables background analysis; the mesh health endpoints will return stale values.

Walk pipeline

Variable Required Default Description
WALK_MODE No combined Walk pipeline mode; see table below
Value Description
combined Full pipeline: imaginary-time Chebyshev seed + unitary walk + ensemble Born. Recommended.
ground Imaginary-time seed only; returns the ground-state distribution.
unitary Uniform or context-seeded initial state + unitary walk + ensemble Born.
grover Unitary walk with oracle amplification and causal cone pre-projection. Amplitude is zeroed for spacelike nodes before each oracle iteration. Use when strong spatial locality is required.

Minimum configuration

The smallest environment needed to start the server and accept ingest:

KNOWLEDGE_API_KEY=your-pipeline-key
KNOWLEDGE_API_USER_KEY=your-user-key

All other variables use their documented defaults.


Data preservation

DuckDB file destruction

Deleting or overwriting the DUCKDB_PATH file permanently destroys all ingested records and mass history. The in-memory store is re-hydrated from DuckDB on warm start; without the file, the store starts empty. Back up the DuckDB file before any destructive operation on the storage path.