Skip to main content
Version: 0.4 (Latest)

DuckDB as LakeXpress DB

Like SQLite, DuckDB needs no server: the LakeXpress DB is a single file. DuckDB can only be used as the LakeXpress DB, not as a source database.

1. Add it to the credentials file​

There is nothing to create beforehand: LakeXpress creates the file, and any missing folder in its path, on first use.

{
"lxdb_duckdb": {
"ds_type": "duckdb",
"auth_mode": "filesystem",
"info": {
"filepath": "/var/lib/lakexpress/lakexpress_log.duckdb"
}
}
}
ParameterRequiredDescription
ds_typeYesMust be "duckdb"
auth_modeYesMust be "filesystem"
filepathYesPath to the DuckDB file. In-memory mode (:memory:) is not supported: the run history must persist between runs.

Use an absolute path. A relative path is resolved against the directory LakeXpress is run from, so running it from another directory would create a new, empty LakeXpress DB there.

2. Create the LakeXpress tables​

./LakeXpress lxdb init -a credentials.json --lxdb_auth_id lxdb_duckdb

When to use DuckDB​

Good for: trying LakeXpress, development, single-user setups without a database server.

Avoid for: several users or machines sharing configurations, syncs running in parallel.

Troubleshooting​

Unable to open database file: The user running LakeXpress cannot write to the file or to its folder. Check the permissions of the path in filepath, and the free disk space.

Database is locked: Another process has the file open, for example another LakeXpress run or a DuckDB client. Close it and run the command again.

Copyright © 2026 Architecture & Performance.