MongoDB Configuration
All tiCrypt backend services use MongoDB as their database. Each of the ten services connects to its own database within the MongoDB instance.
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.
Connection can be configured 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"
}
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 but is not recommended for production.