Environment variables
Every environment variable read by the server node's and router's standalone (container) entrypoints.
Embedded use, calling open or serve/route from code, takes options directly and reads no env at all. Everything below maps to a field on OpenOptions, ServeOptions, or RouteOptions, as read by serving/main.ts and router/main.ts respectively.
Server node
Read by serving/main.ts, via the helpers in serving/config.ts.
| Variable | Type | Default | Maps to |
|---|---|---|---|
LAKEFRONT_POSTGRES |
string (URL or DSN) | — required, throws if unset | OpenOptions.postgres: accepts a standard postgres://user:pass@host/db URL or the keyword/value form. |
LAKEFRONT_DATA |
string | — required, throws if unset | OpenOptions.data |
LAKEFRONT_NAMESPACE |
string | "lakefront" |
OpenOptions.namespace |
LAKEFRONT_S3_ENDPOINT |
string | unset (no S3 config) | OpenOptions.s3.endpoint: setting this makes LAKEFRONT_S3_KEY_ID and LAKEFRONT_S3_SECRET required |
LAKEFRONT_S3_KEY_ID |
string | — required if LAKEFRONT_S3_ENDPOINT is set |
OpenOptions.s3.keyId |
LAKEFRONT_S3_SECRET |
string | — required if LAKEFRONT_S3_ENDPOINT is set |
OpenOptions.s3.secret |
LAKEFRONT_S3_SSL |
"true" / anything else |
false |
OpenOptions.s3.ssl |
LAKEFRONT_INLINING_ROW_LIMIT |
integer | unset (engine default 10_000 applies) |
OpenOptions.inliningRowLimit |
LAKEFRONT_CACHE |
string (path) | "/cache" |
OpenOptions.cache |
LAKEFRONT_CACHE_CAPACITY |
integer | 256 |
OpenOptions.cacheCapacity |
LAKEFRONT_POOL_SIZE |
integer | 24 |
OpenOptions.poolSize |
LAKEFRONT_WRITE_PATH |
"wal" / "lake" |
"wal" |
OpenOptions.writePath: unset, "", or "wal" all resolve to "wal"; anything else must be exactly "lake" or the entrypoint throws |
LAKEFRONT_FLUSH_INTERVAL_MS |
integer | unset (engine default 30_000 applies) |
OpenOptions.flushIntervalMs |
LAKEFRONT_INDEX_COLUMNS |
comma-separated string | unset (engine default ["id"] applies) |
OpenOptions.indexColumns: always includes "id"; the env value adds columns beyond it |
LAKEFRONT_AUTH |
"registry" / "none" |
unset (auth off) | ServeOptions.auth = { registry: true } when "registry"; throws if set to anything else besides "none" |
LAKEFRONT_AUTH_SECRET |
string | unset | ServeOptions.auth = { secret }: takes priority over LAKEFRONT_AUTH when both are set |
LAKEFRONT_NODE_ID |
string | `node-${process.pid}` |
ServeOptions.nodeId |
PORT |
integer | 8080 |
ServeOptions.port |
Write-path semantics (durability, group commit, the flusher) are covered under write paths. The full OpenOptions knob table, with the trade-offs behind each default, is in the engine reference.
Router
Read by router/main.ts.
| Variable | Type | Default | Maps to |
|---|---|---|---|
LAKEFRONT_NODES |
comma-separated id=url pairs |
— required, throws if empty | RouteOptions.nodes |
LAKEFRONT_HEDGE_MS |
integer | 250 |
RouteOptions.hedgeDelayMs |
PORT |
integer | 8080 |
RouteOptions.port |
Demo script
scripts/demo.ts reads one variable, as a fallback for its first CLI argument:
| Variable | Type | Default |
|---|---|---|
LAKEFRONT_ROUTER |
string (URL) | "http://127.0.0.1:58000" |
compose.yaml walkthrough
The full docker compose topology (which of these variables each service sets, and why the ports are non-default) is covered in the cluster guide.