Skip to main content

Database

Certeasy stores all ACME state (accounts, orders, challenges, certificates, audit logs) in a relational database.

Supported Drivers

DriverKeyNotes
SQLitesqliteDefault. No setup required. Recommended for single-node deployments. Do not supports multiple nodes
PostgreSQLpostgresRecommended for multi node deploymnent.
SQL ServersqlserverFor environments standardized on Microsoft SQL Server.

Configuration

database:
driver: postgres
dsn: "postgres://certeasy:secret@db01:5432/certeasy?sslmode=require"
ping-timeout-sec: 5
max-idle-conn: 5
max-conn: 10

SQLite (default)

If database is omitted entirely, Certeasy uses SQLite at %WORKDIR%/db.sqlite.

# Explicit SQLite config
database:
driver: sqlite
path: "C:\\ProgramData\\certeasy\\db.sqlite"

PostgreSQL

database:
driver: postgres
dsn: "postgres://certeasy:secret@db01:5432/certeasy?sslmode=require"

SQL Server

database:
driver: sqlserver
dsn: "sqlserver://certeasy:secret@sqlserver01:1433?database=certeasy"

Fields

FieldDefaultDescription
driversqliteDatabase driver: sqlite, postgres, sqlserver
dsnConnection string (PostgreSQL and SQL Server)
path%WORKDIR%/db.sqliteFile path (SQLite only)
ping-timeout-sec10Timeout for the startup connectivity check
max-idle-conn2 (SQLite), 5 (others)Maximum idle connections
max-conn10Maximum open connections

Migrations

Certeasy runs database migrations automatically at startup. Migrations are embedded in the binary — no external SQL files are needed. If the schema is already up to date, startup proceeds immediately.

Schema Reference

See Schema Reference for the full list of tables and their lifecycle.