Skip to main content

MongoDB Configuration

Last updated: July 31, 2026Latest Frontend Version: 2.17.4

All tiCrypt backend services use MongoDB as their database. Each of the ten services connects to its own database within the MongoDB instance.

Deployment

MongoDB installation and replica set initialization are handled by the Ansible playbook. See the Installation Guide for setup instructions.

Connection Configurationโ€‹

Each service's mongodb section defines how it connects to MongoDB. See the shared mongodb section in Service Configuration for the full parameter reference.

Configure the connection with individual parameters:

mongodb {
database = "ticrypt-auth"
hostname = "localhost"
port = 27017
user = "ticrypt"
password = "your-password"
}

Or with a single URI:

mongodb {
uri = "mongodb://ticrypt:your-password@localhost:27017/ticrypt-auth"
}
warning

Do not specify both the uri and individual connection parameters (hostname, port, user, password). Use one method or the other.

Replication Requirementsโ€‹

tiCrypt versions prior to 3.2.0 require a MongoDB replica set for transaction support. The replica set name is configurable and is set in /etc/mongod.conf:

replication:
replSetName: ticrypt

A single-node replica set is sufficient for testing. Use a minimum 3-node replica set for production deployments.