CortexDB Docs
Operations

Operations Overview

Where every CortexDB knob lives — config file, env var, or CLI flag — and how to navigate this section.

CortexDB is a single Rust binary with roughly 100 environment variables, 10 CLI flags, and a TOML configuration file. That sounds like a lot. In practice, most operators touch fewer than ten knobs — the rest exist for cluster tuning, regulated-industry deployments, or A/B experiments.

This section is structured so you can stop reading at the level of detail you need:

If you want to…Read
Copy-paste a known-good config for your domainProfiles & Presets
Understand the rules (file vs env vs CLI, what overrides what)Configuration
Tune embeddings (model, dims, batch, cost)Embeddings
Pick or swap an answer LLMLLM & Answer Generation
Make recall faster, cheaper, or more accurateRecall Tuning
Tune storage, blob backends, or persistenceStorage & Cluster
Lock it down for SOC2/HIPAA/GDPRSecurity & Compliance
Reproduce the benchmark numbersBenchmarking

The three places config lives

CortexDB reads configuration from three sources, applied in this order (each layer overrides the previous):

  Lowest      1. Compiled defaults        Hardcoded sane production values
   ↑          2. <data_dir>/cortex.toml   Persisted, version-controllable source of truth
   ↓          3. Environment variables    Per-process overrides (benchmarks, A/B, hotfixes)
  Highest     4. CLI flags                Cluster topology only — no overlap with the above

Things that should be the same across every restart go in cortex.toml (HNSW shape, WAL sync mode, retention policy, audit). Things that should change between runs go in env vars (model choice, recall weights, scheduler on/off). Topology is a CLI concern because it changes the binary's role, not its behavior.

What's actually tunable

Always touch

  • An embedding provider — without one you're on mock embeddings and recall is nonsense. The server pins the embedding provider to the data dir on first boot, and GET /v1/admin/ready reports degraded: true while on mock. See Self-hosting defaults and Embeddings.
  • cortex.toml's [storage] data_path — defaults to /data/cortex, which is wrong unless that's a real volume you mounted.

Touch on day one

  • Embedding modelCORTEX_EMBEDDING_MODEL + CORTEX_EMBEDDING_DIMS.
  • Answer modelCORTEX_ANSWER_PROVIDER + CORTEX_ANSWER_MODEL.
  • Scheduler[scheduler] in cortex.toml, or CORTEX_SCHEDULER_DISABLE=1. Background compaction & methylation are on by default; disable for benchmarks.

The answer-model default is a cloud value

The image bakes CORTEX_ANSWER_PROVIDER=anthropic / CORTEX_ANSWER_MODEL=claude-opus-4-6 as the cloud default. Self-hosted, set the CORTEX_ANSWER_* group to your own provider — /v1/answer is disabled until you do. See LLM & Answer.

Touch only with a reason — recall weights and pool sizes (CORTEX_GRAPH_RETRIEVAL_TOP_K, CORTEX_SALIENCE_WEIGHT, CORTEX_MULTIHOP_*), HNSW shape ([engine] hnsw_m / hnsw_ef_construction / hnsw_ef_search; defaults M=16, ef_construction=200, ef_search=100).

Don't touch unless debugging the recall pipeline — the A/B feature flags (CORTEX_MS_COUNT_RELEVANCE_ENABLE, CORTEX_FACT_EVENT_PROMOTION_ENABLE, CORTEX_FACT_VALIDITY_FILTER, …). See Recall Tuning — several switches the v1 docs list are not read by the server.

Clustering is experimental / not operational

All the --node-id, --rpc-addr, --gossip-addr, --seed-nodes flags exist, but clustering is experimental and not operational in the current release — nodes behave as independent databases. Single-node is the supported deployment.

A note on what's hard-coded

About 25 retrieval and ranking constants live in the coordinator as const declarations, not env vars — e.g. RRF_K = 60.0 (the reciprocal-rank-fusion smoothing constant), RETRIEVAL_TOP_K = 40 / RETRIEVAL_TOP_K_MS = 160, RERANK_POOL = 25. A handful that move the needle on real workloads have env-var overrides (CORTEX_GRAPH_RETRIEVAL_TOP_K, CORTEX_MULTIHOP_QUERY_COUNT, CORTEX_MULTIHOP_MAX_QUERY_FANOUT); the rest are intentionally constants.

Confirming what actually loaded

There is no GET /v1/admin/config endpoint (it returns 404). To confirm an env var took effect, read the boot-time config_lint log lines (~85 of them — the real "what loaded" surface) or GET /v1/admin/metrics?format=json (its storage / vector_indexes blocks). The TOML file has ~12 enumerated top-level sections (cluster, storage, engine, network, llm, governance, scheduler, blob_store, content_processors, security, compliance, deployment).

Each page that follows takes one subsystem and walks every knob: name → default → type & range → what it controls → when to change it → example. For a 30-second answer, jump to Profiles & Presets.

On this page