Configuration¶
fbadmin is configured with command-line options, environment variables and, optionally, a configuration file
(fbadmin.toml, see Running as a service): command-line options win over
environment variables, which win over the file.
Command line¶
fbadmin [serve] [--config PATH] [--host HOST] [--port PORT] [--no-browser] [--reload]
[--log-level {critical,error,warning,info,debug}] [--log-format {text,json}] [--log-file PATH]
[--server-mode] [--ssl-certfile PEM --ssl-keyfile PEM] [--proxy-headers] [--forwarded-allow-ips IPS]
fbadmin-desktop [--port PORT] [--browser] [--log-level LEVEL]
Environment variables¶
| Variable | Default | Meaning |
|---|---|---|
FBADMIN_DATA_DIR |
~/.fbadmin |
Data directory (servers.json, mode 0600) |
FBADMIN_HOST / FBADMIN_PORT |
127.0.0.1 / 5050 |
Bind address |
FBADMIN_CONFIG |
<data dir>/fbadmin.toml when it exists |
Configuration file (format) |
FBADMIN_OPEN_BROWSER |
1 |
0: do not open a browser window at start (--no-browser) |
FBADMIN_SSL_CERTFILE / FBADMIN_SSL_KEYFILE |
Serve HTTPS with these PEM files (--ssl-certfile, --ssl-keyfile) |
|
FBADMIN_PROXY_HEADERS / FBADMIN_FORWARDED_ALLOW_IPS |
0 / 127.0.0.1 |
Trust X-Forwarded-* from these proxies (--proxy-headers) |
FBADMIN_ADMIN_FILE |
Server mode: a one-time file with the first administrator (username=, password= lines), deleted once an account exists (Security) |
|
FBADMIN_SHUTDOWN_TIMEOUT |
10 |
Seconds a stop (SIGTERM, Ctrl+C, service stop) waits for running requests |
FBADMIN_MAX_ROWS |
1000 |
Default row limit per query result |
FBADMIN_MCP_WRITES |
0 |
1: the MCP tool run_sql may commit changes when the assistant asks for read_only: false (otherwise MCP SQL is always read-only; MCP) |
FBADMIN_SESSION_IDLE_TIMEOUT |
3600 |
Seconds before an idle Query Tool connection is closed |
FBADMIN_LOG_LEVEL |
info |
Same as --log-level |
FBADMIN_LOG_FORMAT |
text |
json for structured logs (same as --log-format) |
FBADMIN_ACCESS_LOG |
1 |
0 turns off the per-request log |
FBADMIN_RATE_LIMIT |
0 (off) |
API requests per minute per client IP (token bucket, same burst) |
FBADMIN_RATE_LIMIT_TRUST_PROXY |
0 |
1: identify clients by X-Forwarded-For (only behind a trusted proxy) |
FBADMIN_MAX_REQUEST_BYTES |
33554432 (32 MiB) |
Maximum request body; larger requests get HTTP 413. 0 = unlimited. Uploads streamed to disk (restore from an upload, data import files) are exempt |
FBADMIN_MAX_REQUEST_SIZE |
16777216 (16 MiB) |
Server mode only: maximum body of API requests, checked by the security layer (see Security). Uploads streamed to disk are exempt |
FBADMIN_MAX_UPLOAD_BYTES |
0 (no limit) |
Maximum size of a restore upload or a data import file. Without a limit, the free space in the data directory bounds them |
FBADMIN_UPLOAD_FREE_MARGIN |
268435456 (256 MiB) |
Free space to keep in the data directory: an upload that would leave less is refused before it starts (HTTP 507), and stopped if the disk fills while it runs |
FBADMIN_DISCONNECT_ON_CLOSE |
15 |
Seconds after the last fbadmin browser tab closed before everything is disconnected (a reload comes back in time); 0 turns it off |
FBADMIN_META_POOL_SIZE |
3 |
Metadata connections per database (see below) |
FBADMIN_DRIVER |
auto |
Database driver for server connections: auto (native firebird-driver when a Firebird 4+ client library is available, else pure-Python firebirdsql), native or firebirdsql. Overrides the setting in the UI (see Drivers) |
FBADMIN_FBCLIENT |
Path of libfbclient for the native driver (default: the embedded engine's, else the system library path). Overrides the setting in the UI |
|
FBADMIN_UPDATE_CHECK |
ask |
off forbids the opt-in update check (see Privacy) |
FBADMIN_SERVERS_FILE |
unset | YAML/JSON file of Firebird servers to register at startup; see Deployment |
FBADMIN_KUBERNETES |
auto | off turns off the Kubernetes page; on also uses $KUBECONFIG / ~/.kube/config. Auto: the pod's service account |
FBADMIN_KUBECONFIG / FBADMIN_KUBE_CONTEXT |
unset | Kubeconfig file (and context) for the Kubernetes page |
FBADMIN_K8S_NAMESPACES |
own namespace | Namespaces with Firebird clusters, comma-separated; * for all |
FBADMIN_AUDIT_SYSLOG / FBADMIN_AUDIT_WEBHOOK |
unset | Forward the audit log to syslog (udp://, tcp://, tls://host:port) or a webhook |
FBADMIN_BACKUP_KEY |
unset | Backup encryption keys (fbk1:…, comma-separated; the first encrypts), see Backup encryption |
FBADMIN_REPLICATION_CONF |
unset | Server mode: the replication.conf files the replica setup may write |
FBADMIN_MIGRATIONS_ROOT |
unset | Server mode: migration directories on the fbadmin host must be inside it |
FBADMIN_PLUGINS |
on | off loads no plugins: a safe mode for troubleshooting, also used when generating the API types |
Logging¶
Text logs look like 2026-10-18 20:01:02,345 INFO fbadmin.access: GET /api/servers 200 3.1ms.
With --log-format json every line is one JSON object:
{"ts": "2026-10-18T20:01:02.345+00:00", "level": "info", "logger": "fbadmin.access",
"msg": "GET /api/servers 200 3.1ms", "method": "GET", "path": "/api/servers",
"status": 200, "duration_ms": 3.1, "client": "10.0.0.7"}
Requests for static assets are logged at debug level, server errors (5xx) at error.
Query text and parameters are never logged.
The log goes to standard error. --log-file PATH (FBADMIN_LOG_FILE) also writes it to a file, in the same
format; a relative path is in the data directory. The file is rotated when it reaches FBADMIN_LOG_MAX_BYTES
(default 10 MiB), keeping FBADMIN_LOG_BACKUPS old files (default 5: fbadmin.log.1 … fbadmin.log.5).
Request limits¶
The rate limiter and the body size limit are generic and apply to every API request
(login throttling in server mode is separate). A rejected request gets HTTP 429 with a
Retry-After header (/api/health is never throttled, so probes keep working), or HTTP 413, and a JSON body with code rate_limited or
request_too_large. The UI polls a few endpoints every few seconds per open tab, so keep
the rate limit well above 60 requests per minute per user.
Metadata connections¶
The object explorer, dashboards, DDL and the data grid share a small pool of
connections per database (FBADMIN_META_POOL_SIZE). The first connection is used
whenever it is free; extra ones open only while it is busy (a slow DDL extraction, a big
MON$ query) and close again after two idle minutes. Every Query Tool tab has its own
connection, separate from the pool.
Database driver¶
The Database driver setting (user menu → Database driver…, administrators only in server mode) chooses the driver for every server connection (object explorer, Query Tool, create/drop database and the Services API):
- Automatic (default):
firebird-driveron top of the Firebird client library when a Firebird 4 or newer client is available, otherwise the pure-Pythonfirebirdsql. The panel and the startup log say which one is in use and why; - Native: always
firebird-driver(refused when it cannot be used); - Pure Python: always
firebirdsql, no native library.
firebird-driver is installed with fbadmin (Python 3.11+); the client library comes with the
desktop app and the Docker image, or from a Firebird installation or your distribution's
libfbclient2 (Firebird 4 from Debian 13 and Ubuntu 25.04 on). The setting is stored in
driver.json in the data directory. FBADMIN_DRIVER and FBADMIN_FBCLIENT override it:
FBADMIN_FBCLIENT=/opt/firebird/lib/libfbclient.so fbadmin # Automatic with this client library
FBADMIN_DRIVER=firebirdsql fbadmin # always the pure-Python driver
The event monitor stays on firebirdsql. See Drivers for the selection
rules, the fallback, the per-feature table and the benchmarks.