Skip to content

Storage

Configure the storage backend for Chronicle Server.

TypeDescription
MongoDBMongoDB (default)
PostgreSqlPostgreSQL
MsSqlMicrosoft SQL Server
SqliteSQLite (embedded, file-based)
InMemoryIn-memory (ephemeral, non-durable)
{
"storage": {
"type": "MongoDB",
"connectionDetails": "mongodb://localhost:27017"
}
}
{
"storage": {
"type": "PostgreSql",
"connectionDetails": "Host=localhost;Port=5432;Database=chronicle;Username=chronicle;Password=secret"
}
}
{
"storage": {
"type": "MsSql",
"connectionDetails": "Server=localhost;Database=chronicle;User Id=chronicle;Password=secret;TrustServerCertificate=True"
}
}
{
"storage": {
"type": "Sqlite",
"connectionDetails": "Data Source=/data/chronicle.db"
}
}

The in-memory backend keeps every event sequence, observer, read-model sink, and system record in process memory. There is no connection string, and connectionDetails is ignored.

{
"storage": {
"type": "InMemory"
}
}

When you host Chronicle programmatically, select the in-memory backend with the WithInMemory() builder extension instead of configuration:

siloBuilder.AddChronicleToSilo(chronicle => chronicle.WithInMemory());
PropertyTypeRequiredDescription
typestringYesStorage type: MongoDB, PostgreSql, MsSql, Sqlite, or InMemory
connectionDetailsstringConditionalConnection string for the chosen storage backend. Required for all backends except InMemory, which ignores it