π This page is for engineering teams self-hosting their own Lightdash instance. If you want to connect your data warehouse, go to the Connect a project guide.
Lightdash requires a PostgreSQL database (version 12 or greater).
Configuration options for external database
configMap
Required pg extensions for external database
Lightdash requires the following extensions to be installed on the database:uuid-ossp- used for generating unique IDspgvector- required if you use an enterprise license key. Lightdash usespgvectorto store embeddings that power enterprise AI features (AI Analyst, AI agents, and related capabilities). Install it on your Postgres database before starting a licensed Lightdash instance β on managed services like AWS RDS, Google Cloud SQL, and Azure Database for PostgreSQL, enable thevectorextension in your instanceβs configuration, then runCREATE EXTENSION IF NOT EXISTS vector;in the Lightdash database.
Migrations
Migrations are ran automatically on starting the Lightdash server or workers. When upgrading Lightdash, migrations will be ran automatically. If a migration gets stuck β for example after an interrupted deploy:-
On Lightdash
1.123.0and later, an interrupted migrationβs lock expires on its own and another process takes over automatically. To inspect migration state, or release a lock that is genuinely stuck, run the built-inmigratecommand inside a Lightdash container (kubectl exec/docker compose exec):Do not edit theknex_migrations_locktable manually on these versions β it can release a lock that a live migration legitimately holds. The upgrade runbook covers how to readstatus, whenunlockrefuses, and what resumes on its own afterwards. -
On versions before
1.123.0, if migrations fail due to a pg_lock error, check for a table calledknex_migrations_lockto manually release the lock.