Persistence Configuration
wallet2-persistence.conf configures SQL persistence for Wallet API v2 wallets, keys, DIDs, and credentials.
The shipped configuration enables wallet2-persistence, so wallet data persists to SQLite by default and survives restarts. If you remove wallet2-persistence from _features.conf, the service keeps all data in memory and loses it on restart.
File Location
waltid-services/waltid-wallet-api2/config/wallet2-persistence.conf
Fields
jdbcUrl
String — JDBC connection URL.
- SQLite — Defaults to
jdbc:sqlite:wallet2.db. - PostgreSQL — Supported with
jdbc:postgresql://...URLs.
driverClassName
String — JDBC driver class.
- SQLite — Defaults to
org.sqlite.JDBC. - PostgreSQL — Use
org.postgresql.Driver.
username
String — Database username.
This is only relevant for database engines that require credentials, such as PostgreSQL. Defaults to an empty string.
password
String — Database password.
This is only relevant for database engines that require credentials, such as PostgreSQL. Defaults to an empty string.
maximumPoolSize
Int — Maximum database connection pool size.
Defaults to 5.
minimumIdle
Int — Minimum idle database connections.
Defaults to 1.
SQLite
# wallet2-persistence.conf
jdbcUrl = "jdbc:sqlite:data/wallet2.db"
driverClassName = "org.sqlite.JDBC"
PostgreSQL
# 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.
