---
title: "DB"
description: "Choose the database the walt.id Wallet API uses for persistence and set its connection string, with an example configuration file."
stack: "Community Stack (open source) — version 1.2.1"
stack_version: "1.2.1"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/community-stack/wallet/configurations/config-files/db
generated: 2026-11-11
---
# DB

DB configuration describes which database should be used for data persistence and the connection string required to
connect to the database.

## Example
```hocon [db.conf]
dataSource {
# -- jdbcUrl --
# postgres: "jdbc:postgresql://127.0.0.1:5432/postgres"
# sqlite: "jdbc:sqlite:data/wallet.db"
# mssql: "jdbc:sqlserver://localhost:1433;databaseName=master"
jdbcUrl = "jdbc:postgresql://127.0.0.1:5432/postgres"

        # -- driverClassName --
        # postgres: "org.postgresql.Driver"
        # sqlite: "org.sqlite.JDBC"
        # mssql: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
        driverClassName = "org.postgresql.Driver"
                          username = "postgres" # leave empty for sqlite
                          password = "postgres" # leave empty for sqlite
                          transactionIsolation = "TRANSACTION_SERIALIZABLE"

maximumPoolSize = 16
minimumIdle = 4
maxLifetime = 60000
autoCommit = false
           dataSource {
           journalMode = WAL
           fullColumnNames = false
           }
}
recreateDatabaseOnStart = false
```
