Configuration Reference

Maree-DB is configured via maree-db.toml. By default it is read from /etc/mareedb/maree-db.toml. Override with --config /path/to/file.toml.

[server]

KeyTypeDefaultDescription
data_dirstring"/var/lib/mareedb"Directory where all data files, WAL, and snapshots are stored.
log_levelstring"info"Log verbosity: trace, debug, info, warn, error.
log_filestring""Path to log file. Empty string logs to stdout.
max_connectionsinteger1000Maximum simultaneous client connections across all wire protocols.
thread_pool_sizeinteger0Worker thread count. 0 = auto (one per logical CPU).
temp_dirstring"/tmp/mareedb"Temporary files (sort spills, large query intermediates).
profilestring"standard"Server profile: iot, standard, performance, enterprise.

[storage]

KeyTypeDefaultDescription
enginestring"hybrid"Storage engine: btree (OLTP), lsm (write-heavy), column (analytics), hybrid (automatic selection).
page_sizeinteger16384Page size in bytes. Must be a power of 2 between 4096 and 65536. Set at database creation and immutable thereafter.
wal_syncstring"full"WAL sync mode: full (fsync on each commit), buffered (OS-buffered, higher throughput, small crash window), none (benchmark only, not safe).
wal_segment_size_mbinteger64WAL segment file size in megabytes before rotation.
checkpoint_interval_secsinteger300Seconds between automatic WAL checkpoints.
compressionstring"lz4"Data page compression: none, lz4.
encryptionboolfalseEnable AES-256-GCM encryption at rest. Requires encryption_key_path.
encryption_key_pathstring""Path to a 32-byte binary key file for encryption at rest. Generated with maree-db-cli keygen.

[wire]

KeyTypeDefaultDescription
mysql_portinteger3306MySQL 8.0 wire protocol port. Set to 0 to disable.
pg_portinteger5432PostgreSQL FE/BE protocol v3 port. Set to 0 to disable.
mssql_portinteger1433MS-TDS 7.4 (SQL Server) protocol port. Set to 0 to disable.
redis_portinteger6379Redis RESP3 protocol port. Set to 0 to disable.
rest_portinteger8080HTTP REST API port. Set to 0 to disable.
bind_addressstring"0.0.0.0"Network address to bind all wire protocols. Use "127.0.0.1" for localhost-only.
tls_certstring""Path to PEM-encoded TLS certificate. Required to enable TLS.
tls_keystring""Path to PEM-encoded TLS private key.
tls_min_versionstring"1.3"Minimum TLS version: "1.2" or "1.3". TLS 1.0 and 1.1 are permanently disabled.

[security]

KeyTypeDefaultDescription
require_tlsboolfalseReject all connections that do not use TLS. Recommended for production.
fortress_lockbooltrueEnable Fortress Lock kernel-level security monitoring. Requires Linux.
fortress_lock_sensitivitystring"medium"Fortress Lock anomaly detection sensitivity: low, medium, high.
lockdown_webhookstring""URL to POST a JSON payload when Fortress Lock triggers lockdown.
max_failed_loginsinteger5Failed login attempts before the account is temporarily locked (10 minutes).
password_min_lengthinteger12Minimum password length enforced at account creation.

[tamperlock]

KeyTypeDefaultDescription
enabledbooltrueEnable TamperLock cryptographic integrity chain on all committed transactions.
signing_keystring""Path to Ed25519 private key for signing forensic audit reports. Generated with maree-db-cli keygen --type ed25519. If empty, auto-generated on first start.
verify_on_startbooltrueVerify the entire chain integrity on server startup. Adds a few seconds on very large databases.
retention_daysinteger2555Number of days to retain chain history (default: 7 years). Chain older than this is archived, not deleted.

[cache]

KeyTypeDefaultDescription
buffer_pool_mbinteger0Buffer pool size in MB. 0 = auto (50% of available RAM). Increasing this is the single most impactful tuning parameter.
query_cache_mbinteger256Query result cache size in MB. Results of identical read queries are cached until data changes.
connection_pool_sizeinteger100Internal connection pool for cross-model query planning.

[cluster]

KeyTypeDefaultDescription
enabledboolfalseEnable clustering mode. Requires Enterprise licence.
node_idstring""Unique node identifier within the cluster. Auto-generated from hostname if empty.
peersarray[]List of peer node addresses: ["192.168.1.2:7001", "192.168.1.3:7001"].
consensus_portinteger7001Port for inter-node consensus protocol communication.
bft_modeboolfalseEnable Byzantine fault tolerant consensus. Requires minimum 7 nodes (tolerates 2 Byzantine faults). Uses standard CFT consensus for 3-node clusters.
auto_discoverboolfalseEnable automatic peer discovery via mDNS on the local subnet.
replication_factorinteger3Number of replicas to maintain for each data partition.

[compliance]

KeyTypeDefaultDescription
gdpr_enabledboolfalseEnable GDPR compliance functions (mareedb_gdpr_erase, mareedb_gdpr_report, etc.) and PII column tagging.
hipaa_enabledboolfalseEnable HIPAA audit trail and mareedb_hipaa_access_report function.
pci_enabledboolfalseEnable PCI-DSS tokenisation (mareedb_pci_tokenise, mareedb_pci_detokenise).
data_residencystring""Declared data residency region for APP 8 (Australian Privacy Act) reporting. Example: "AU-TAS".
audit_log_pathstring""Path to write compliance audit log. Empty = disabled. All compliance function calls are always logged to TamperLock regardless.

[metrics]

KeyTypeDefaultDescription
enabledbooltrueEnable Prometheus-compatible metrics endpoint.
portinteger9090Port for the /metrics HTTP endpoint.
bind_addressstring"127.0.0.1"Metrics endpoint bind address. Defaults to localhost for security.

Full Configuration Example

A complete maree-db.toml for a production single-node Professional deployment:

/etc/mareedb/maree-db.toml
[server]
data_dir = "/var/lib/mareedb"
log_level = "info"
log_file = "/var/log/mareedb/server.log"
max_connections = 500
profile = "performance"
[storage]
engine = "hybrid"
page_size = 16384
wal_sync = "full"
compression = "lz4"
encryption = true
encryption_key_path = "/etc/mareedb/keys/data.key"
[wire]
bind_address = "0.0.0.0"
mysql_port = 3306
pg_port = 5432
redis_port = 6379
rest_port = 8080
tls_cert = "/etc/mareedb/tls/cert.pem"
tls_key = "/etc/mareedb/tls/key.pem"
tls_min_version = "1.3"
[security]
require_tls = true
fortress_lock = true
fortress_lock_sensitivity = "high"
lockdown_webhook = "https://alerts.example.com/mareedb-lockdown"
max_failed_logins = 3
[tamperlock]
enabled = true
signing_key = "/etc/mareedb/keys/tamperlock.ed25519"
retention_days = 2555
[cache]
buffer_pool_mb = 0 # auto: 50% of RAM
query_cache_mb = 512
[compliance]
gdpr_enabled = true
audit_log_path = "/var/log/mareedb/compliance.log"
[metrics]
enabled = true
port = 9090
bind_address = "127.0.0.1"