Docs / Configuration

Configuration Reference

Maree-DB is configured via maree-db.toml. The default location is /etc/mareedb/maree-db.toml on Linux, or the directory specified by --config on startup.

Minimal Configuration

# maree-db.toml - minimal production configuration [server] host = "0.0.0.0" [storage] data_dir = "/var/lib/mareedb/data" wal_dir = "/var/lib/mareedb/wal" [auth] admin_password = "your_secure_password_here" tls_cert = "/etc/mareedb/tls/cert.pem" tls_key = "/etc/mareedb/tls/key.pem" [licence] key = "MAREE-XXXX-XXXX-XXXX-XXXX"

Full Configuration Reference

[server] - Network Ports

SettingTypeDefaultDescription
hostString"127.0.0.1"Bind address. Use "0.0.0.0" to listen on all interfaces.
port_mysqlInteger3306MySQL wire protocol port.
port_pgInteger5432PostgreSQL wire protocol port.
port_redisInteger6379Redis RESP3 protocol port.
port_tdsInteger1433Reserved for the MS-TDS (SQL Server) wire protocol, which is in final development - the port does not accept connections yet.
port_restInteger8080REST/HTTP API port.
max_connectionsInteger1000Maximum concurrent connections across all protocols.

[storage] - Data Directories

SettingTypeDefaultDescription
data_dirPath"/var/lib/mareedb/data"Main data directory for database pages.
wal_dirPath"/var/lib/mareedb/wal"Transaction durability log directory. Can be on a separate disk for performance.
temp_dirPathsystem tempTemporary files for sorting and query spill.
max_wal_size_mbInteger1024Maximum transaction log size (MB) before a checkpoint is triggered.
checkpoint_interval_secInteger300Seconds between automatic checkpoints.

[auth] - Authentication & TLS

SettingTypeDefaultDescription
admin_passwordStringRequiredPassword for the built-in admin user. Change on first start.
tls_certPathauto-generatedPath to TLS certificate (.pem). Auto-generates self-signed on first start.
tls_keyPathauto-generatedPath to TLS private key (.pem).
tls_requiredBooleanfalseRequire TLS for all connections. Recommended for production.

[licence] - Licence

SettingTypeDefaultDescription
keyString(none)Licence key. Not required for the Community tier.
tierStringautoOverride licence tier (community/sme_free/professional/enterprise). Auto-detected from key.

[health_check] - Health Monitoring

SettingTypeDefaultDescription
enabledBooleantrueEnable health check subsystem.
on_bootBooleantrueRun health check on every server startup before accepting connections.
on_scheduleString(none)Cron expression for scheduled checks. E.g. "0 3 * * *" for 3 AM daily.
notify_emailString(none)Email address for failure alerts.
fail_actionString"warn""warn" = start and log the failure. "block" = refuse to start (exit code 78).
timeout_secondsInteger300Maximum time for a single health check run.

[email] - SMTP for Health Alerts

[email] smtp_host = "smtp.example.com" smtp_port = 587 smtp_username = "alerts@example.com" smtp_password = "${SMTP_PASSWORD}" # Supports env var interpolation smtp_from = "mareedb@example.com" smtp_tls = true

Example: Full Production Config

[server] host = "0.0.0.0" port_mysql = 3306 port_pg = 5432 port_redis = 6379 port_tds = 1433 # reserved - TDS listener in final development port_rest = 8080 max_connections = 10000 [storage] data_dir = "/nvme/mareedb/data" wal_dir = "/nvme/mareedb/wal" [auth] admin_password = "${MAREEDB_ADMIN_PASSWORD}" tls_cert = "/etc/mareedb/tls/fullchain.pem" tls_key = "/etc/mareedb/tls/privkey.pem" tls_required = true [licence] key = "${MAREEDB_LICENCE_KEY}" [health_check] enabled = true on_boot = true on_schedule = "0 3 * * *" notify_email = "dba@company.com" fail_action = "warn" timeout_seconds = 300 [email] smtp_host = "smtp.company.com" smtp_port = 587 smtp_username = "mareedb-alerts@company.com" smtp_password = "${SMTP_PASSWORD}" smtp_tls = true