The locked server
The locked server is a thread pool inside a DuckDB process. A short SQL script starts it:
LOAD '/opt/anofox/anofox_visualization.duckdb_extension';ATTACH '/data/warehouse.duckdb' AS warehouse (READ_ONLY);CREATE VIEW sales AS FROM warehouse.sales;SELECT anofox_serve_dashboards('/etc/anofox/dashboards', 8080, '{ "bind": "127.0.0.1", "hosts": ["dash.example.com"], "threads": 16, "duckdb_threads": 4, "memory_limit": "2GB", "cache_mb": 256, "timeout_ms": 10000}');What makes it safe to share
Section titled “What makes it safe to share”- Readers get the real client but send no SQL: a request names a dashboard, a panel and its variables (
POST /api/panel); the server runs the panel’s own SQL. - Queries run on a private read-only snapshot of the session, in a locked-down DuckDB: no file or network access, configuration locked.
- Login and row / column policies decide who sees which rows.
- Limits on threads, memory, rows, time and request size, a
Hostallow-list, a strict CSP.
Running it
Section titled “Running it”| How | Details | |
|---|---|---|
| One process | systemd unit, run-locked.sh |
deployment.md § 2 |
| Container | deploy/Dockerfile (debian-slim, tini, unprivileged) |
§ Container |
| Reverse proxy | TLS, authentication headers, Host (nginx, Caddy, Traefik) |
§ 3 |
| Several replicas | behind a load balancer; one writer for state and write-back | § 4 |
| Fresh data | refresh on a schedule, anofox_serve_refresh(port), or a Quack source (prototype) |
§ 5 |
| New dashboards | swap the folder, anofox_serve_reload(port) |
§ 5a |
| Limits and sizing | memory, threads, measured throughput | § 6–7 |
| Monitoring | /healthz, Prometheus /metrics, structured logs |
§ 8 |
Also on the locked server: per-viewer state (::SUBMIT), shared write-back (::SAVE), saved views, notes, scheduled reports and alerts by mail / Slack / Teams / webhook, and Ask (off by default).
Server-rendered pages only
Section titled “Server-rendered pages only”serve --dashboards <dir> renders SVG pages on the server with no data API at all — for readers who need no interaction. Details.