Installation¶
Requirements¶
| Requirement | Version |
|---|---|
| Python | 3.12 or later |
| uv | latest |
| PostgreSQL | 12 or later (your existing database — TDB connects to it) |
TDB Enterprise does not require Docker to run. uv manages the Python environment and dependencies.
Install uv¶
Install TDB Enterprise¶
You will receive a copy of the tdb-enterprise source repository as part of your license. Clone or unzip it to a local directory, then install:
This installs all dependencies into .venv inside the project directory. The uv sync command is idempotent — safe to run on updates.
Verify the install:
Configure environment variables¶
TDB is configured entirely through environment variables. Create a .env file in the tdb-enterprise directory:
# --- Required ---
TDB_API_KEYS=your-secret-key-here # Comma-separated; used for the initial setup
# --- Required for JWT + OAuth ---
TDB_JWT_SECRET=<64-char hex> # Generate with: python -c "import secrets; print(secrets.token_hex(32))"
TDB_ADMIN_USER=admin
TDB_ADMIN_PASSWORD=<strong-password>
# --- Optional ---
TDB_LOG_LEVEL=INFO # DEBUG | INFO | WARNING | ERROR
TDB_LOG_FILE=tdb_audit.jsonl # Audit log output path
TDB_REGISTRY_DB=data/tdb_registry.db # Source registry SQLite path
TDB_DEFAULT_RATE_LIMIT=60 # Default requests per minute per API key
Never use the default dev key in production
The default TDB_API_KEYS value is dev-insecure-key-change-me. TDB prints a
warning on startup if it detects this key. Always set a strong key before exposing
TDB to any network.
Generate a secure JWT secret:
Start the server¶
You should see output similar to:
INFO: Started server process [12345]
INFO: Waiting for application startup.
INFO: tdb_startup version=0.4.0 dev_mode=False
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Verify TDB is running:
Running behind a reverse proxy¶
If you put TDB behind nginx, Caddy, or a load balancer, set TDB_SERVER_URL to the
public base URL. This is required for OAuth 2.1 discovery endpoints to return correct URLs:
Data directories¶
TDB writes two files on first startup (created automatically):
| Path | Contents |
|---|---|
data/tdb_registry.db |
SQLite registry of registered sources |
tdb_audit.jsonl |
NDJSON audit log — one entry per query |
Both paths are configurable via environment variables. Make sure the process has write access to these locations.