Databases
A DuckDB database
Section titled “A DuckDB database”The authoring server and the locked server take one with --db:
serve my.duckdb # the builder on your database (loopback only)serve --dashboards dashboards/ --db my.duckdb # locked servingFrom SQL, attach more: ATTACH 'warehouse.duckdb' AS wh (READ_ONLY);
Other databases
Section titled “Other databases”DuckDB’s database extensions attach Postgres, MySQL and SQLite; queries run against them like local tables:
INSTALL postgres; LOAD postgres;ATTACH 'dbname=shop host=db.internal user=reader' AS shop (TYPE postgres, READ_ONLY);SELECT country ::XAXIS, count(*) ::BARCHART FROM shop.public.orders GROUP BY ALL ORDER BY 2 DESC;These run natively (CLI, servers), not in the browser. For a served dashboard prefer copying what it needs into the snapshot over querying the production database per viewer.
MotherDuck
Section titled “MotherDuck”ATTACH 'md:my_db'; with a motherduck_token in the environment. The token grants the whole database: give the locked server a read-only token, and keep it out of dashboards and URLs. The builder’s AI assistant is told an attached remote database exists but is never sent its data.