Detailed setup¶
TL;DR
- A step-by-step walk through a production-like instance, each step linking to its reference page.
- The order: data and database, secret key, network, sign-in, models, telemetry, backups.
- Every step is optional; skip the ones your instance does not need.
1. Data directory and database¶
- Keep
EXACTDOCS_DATA_DIRon a volume. It holds the SQLite database, the generated secret key,known_hosts, fetch caches andjobs.sqlite. - For several server processes, move the database to PostgreSQL with
EXACTDOCS_DATABASE_URL=postgresql://user:password@host:5432/exactdocs(see PostgreSQL). Every process still has a data directory of its own.
Reference: Storage and database.
2. Secret key¶
- Generate one with
openssl rand -base64 32and setEXACTDOCS_SECRET_KEY, so the key lives outside the data volume. - On PostgreSQL this is required, with the same value in every process.
- Without the key, the stored credentials cannot be read.
Reference: The secret key.
3. Network¶
EXACTDOCS_ALLOWED_HOSTS: the public host names.EXACTDOCS_FORWARDED_ALLOW_IPS: the reverse proxy's own address, and nothing wider.EXACTDOCS_PUBLIC_URL: the URL people use, without a path.EXACTDOCS_HTTPS_PROXY,EXACTDOCS_NO_PROXYandEXACTDOCS_CA_BUNDLE(or the standard variables) when the only way out is a forward proxy.
Reference: Security, Outbound connections; how-to: Behind a reverse proxy, Behind a corporate proxy.
4. Sign-in¶
- Put the providers in a TOML file named by
EXACTDOCS_CONFIG_FILE, as[auth.providers.<name>]tables, and their client secrets in the environment or aclient_secret_file. - Register
<public_url>/api/v1/auth/<name>/callbackat each provider. - Decide who gets in (
allowed_groups, orallow_any_user = true) and who is an admin (admin_groups). - Optionally limit who may create libraries with
[auth.library_creation].
Reference: Sign-in and access; a complete example is in Getting started.
5. Models¶
- Configure provider profiles and the
embedding,reranker,llmandjudgeroles (an-aior-localimage, or theexactdocs[ai]extra). - Choose the default mode with
EXACTDOCS_AI__MODE, for examplehybrid. - Set
[ai.budgets]before you let models spend.
Reference: Search and AI settings; how it works: Search and AI models; which setup to pick: Recommended defaults.
6. Telemetry and metrics¶
EXACTDOCS_TELEMETRY=otlpwithOTEL_EXPORTER_OTLP_ENDPOINTexports traces and metrics.EXACTDOCS_METRICS=trueserves/metrics; addEXACTDOCS_METRICS_TOKENwhen the port is reachable beyond a network you trust.
Reference: Observability and usage counts; what each exports: Observability.
7. Probes, backups and upgrades¶
- Point liveness at
/healthzand readiness at/readyz(Health checks). - Back up with
exactdocs backupon SQLite, orpg_dumpon PostgreSQL, and keep the secret key apart (Backup and restore). - Read Upgrading before the first upgrade.