Persistence Configuration

The shipped configuration enables wallet2-persistence, so wallets, keys, DIDs, and credentials are persisted to a SQL database (SQLite by default) and survive restarts. This page covers the wallet2-persistence.conf settings. If you remove wallet2-persistence from _features.conf, the Wallet API v2 falls back to keeping all data in memory, which is lost on restart.

File Location

waltid-services/waltid-wallet-api2/config/wallet2-persistence.conf

Configuration Options

PropertyTypeDefaultDescription
jdbcUrlStringjdbc:sqlite:wallet2.dbJDBC connection URL.
driverClassNameStringorg.sqlite.JDBCJDBC driver class.
usernameString""Database username (PostgreSQL).
passwordString""Database password (PostgreSQL).
maximumPoolSizeInt5Maximum connection pool size.
minimumIdleInt1Minimum idle connections.

SQLite

# wallet2-persistence.conf
jdbcUrl = "jdbc:sqlite:data/wallet2.db"
driverClassName = "org.sqlite.JDBC"

PostgreSQL

PostgreSQL is not yet supported.

# wallet2-persistence.conf
jdbcUrl = "jdbc:postgresql://localhost:5432/wallet2"
driverClassName = "org.postgresql.Driver"
username = "wallet"
password = "secret"
maximumPoolSize = 10
minimumIdle = 1

Enabling persistence requires listing wallet2-persistence in _features.conf, then restarting the service.

Set jdbcUrl (and the other options) directly in wallet2-persistence.conf. When running via Docker, mount your edited config directory into the container so these values take effect.

Last updated on July 13, 2026