Skip to content

H2

H2 is the default and ships with the platform. No extra config required.

Default location

  • File: <repo>/dirigible/h2/DefaultDB
  • JDBC URL: jdbc:h2:file:./target/dirigible/h2/DefaultDB;LOCK_TIMEOUT=10000
  • Repository root: DIRIGIBLE_REPOSITORY_LOCAL_ROOT_FOLDER (defaults to ./target/).

The system DB lives next to it as SystemDB.

When to use it

  • Evaluation, local dev, demos.
  • Integration tests (the CI matrix runs H2 alongside PostgreSQL 16 and MSSQL 2022).

When not to use it

  • Multi-pod deployments - H2 is file-local; there is no replication path.
  • Production workloads requiring concurrent writers across nodes.

Switching off H2

Set the standard DIRIGIBLE_DATASOURCE_DEFAULT_* env vars:

bash
DIRIGIBLE_DATASOURCE_DEFAULT_DRIVER=org.postgresql.Driver
DIRIGIBLE_DATASOURCE_DEFAULT_URL=jdbc:postgresql://db:5432/dirigible
DIRIGIBLE_DATASOURCE_DEFAULT_USERNAME=dirigible
DIRIGIBLE_DATASOURCE_DEFAULT_PASSWORD=...

Then run mvn clean (or remove the old H2 file) before the next startup - the file-backed H2 survives across restarts and can confuse a freshly switched data source.

See also

Released under the EPL-2.0 License.