Configuration
lumbungd starts with no settings at all. Each setting below is read from its environment variable when that is set and not empty; otherwise the default applies.
LUMBUNG_DATA_DIR=/srv/lumbung LUMBUNG_STATEMENT_TIMEOUT=10s lumbungdDurations use Go syntax (500ms, 30s, 5m). Sizes are bytes, or a number with KiB, MiB, GiB, TiB (powers of 1024) or KB, MB, GB, TB (powers of 1000).
| Variable | Kind | Default | What it does |
|---|---|---|---|
LUMBUNG_DATA_DIR |
string | ./data |
Folder for meta.db, branch files, snapshots, trash and generated secrets. Use a local disk. |
LUMBUNG_ADDR |
string | 127.0.0.1:4870 |
Address the HTTP server listens on. |
LUMBUNG_STATEMENT_TIMEOUT |
duration | 30s |
Longest a query or batch may run. Longer ones are cancelled with statement_timeout and the connection stays usable. |
LUMBUNG_BUSY_TIMEOUT |
duration | 5s |
How long a statement waits for a lock held by another connection before failing with busy. |
LUMBUNG_MAX_RESULT_ROWS |
integer | 10000 |
Most rows one statement may return. Past it the request fails with result_too_large; nothing partial is returned. |
LUMBUNG_MAX_RESULT_BYTES |
bytes | 16MiB |
Most bytes of values one request may return, counted across all its statements. |
LUMBUNG_MAX_REQUEST_BYTES |
bytes | 32MiB |
Largest JSON request body. |
LUMBUNG_MAX_PARAMS |
integer | 10000 |
Most bound parameters in one statement. |
LUMBUNG_MAX_VALUE_BYTES |
bytes | 16MiB |
Largest single string or blob a statement may create. |
LUMBUNG_MAX_SQL_BYTES |
bytes | 1MiB |
Longest statement text. |
LUMBUNG_MAX_BRANCH_BYTES |
bytes | 1GiB |
Largest a branch file may grow. Writes past it fail with branch_size_limit. |
LUMBUNG_MAX_INSTANCE_BYTES |
bytes | 10GiB |
Total size of all branch files. Writes that would pass it fail with instance_quota_exceeded. |
LUMBUNG_MIN_FREE_DISK |
bytes | 2GiB |
Creating a database, branch, snapshot or import is refused with HTTP 507 when the disk has less free space than this. |
LUMBUNG_MAX_DATABASES |
integer | 100 |
Most databases on the instance, counting ones in the trash. |
LUMBUNG_MAX_BRANCHES |
integer | 50 |
Most branches in one database. |
LUMBUNG_TRASH_RETENTION |
duration | 168h |
How long a deleted database stays in the trash, restorable, before its files are removed. |
LUMBUNG_MAX_IMPORT_BYTES |
bytes | 1GiB |
Largest .db file or SQL dump an import accepts. The branch size limit also applies. |
LUMBUNG_IMPORT_TIMEOUT |
duration | 10m |
Longest an import may run, in place of the statement timeout. |
LUMBUNG_SERVICE_TOKEN |
string | none | An instance admin token for the dashboard. When unset, lumbungd generates one on first start and writes it to secrets/service-token in the data folder, mode 600. |
LUMBUNG_RATE_LIMIT |
integer | 50 |
Requests per second each token may make, on average. Past it the API answers rate_limited. |
LUMBUNG_RATE_BURST |
integer | 100 |
Requests a token may make at once before the rate limit applies. |
LUMBUNG_AUTH_FAILURES_PER_MINUTE |
integer | 20 |
Failed authentications allowed per client address per minute. |
LUMBUNG_CLIENT_IP_HEADER |
string | none | Header holding the real client address when lumbungd runs behind a proxy, such as X-Forwarded-For or CF-Connecting-IP. Only trusted when the connection comes from LUMBUNG_TRUSTED_PROXIES. Empty uses the connection’s address. |
LUMBUNG_TRUSTED_PROXIES |
string | 127.0.0.1/32,::1/128 |
Comma-separated networks whose connections may set the client IP header. |
LUMBUNG_SLOW_QUERY |
duration | 1s |
Queries slower than this go to the branch’s slow-query log (the newest 50 are kept). |
LUMBUNG_STATS_RETENTION |
duration | 48h |
How long per-minute branch stats are kept. |
LUMBUNG_AUDIT_MAX_ROWS |
integer | 100000 |
Most audit log entries kept; the oldest are dropped first. |
LUMBUNG_READERS_PER_BRANCH |
integer | 4 |
Read-only connections kept per open branch, next to its one writer. |
LUMBUNG_MAX_OPEN_BRANCHES |
integer | 64 |
Most branches with open connections at once. The least recently used idle branch is closed to make room. |
LUMBUNG_IDLE_CONN_TIMEOUT |
duration | 5m |
A branch unused this long has its connections closed. |
LUMBUNG_CONN_MAX_MEMORY |
bytes | 128MiB |
Memory ceiling for each SQLite connection. A statement that needs more fails instead of growing the process. |