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
[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
| Setting | Type | Default | Description |
| host | String | "127.0.0.1" | Bind address. Use "0.0.0.0" to listen on all interfaces. |
| port_mysql | Integer | 3306 | MySQL wire protocol port. |
| port_pg | Integer | 5432 | PostgreSQL wire protocol port. |
| port_redis | Integer | 6379 | Redis RESP3 protocol port. |
| port_tds | Integer | 1433 | Reserved for the MS-TDS (SQL Server) wire protocol, which is in final development - the port does not accept connections yet. |
| port_rest | Integer | 8080 | REST/HTTP API port. |
| max_connections | Integer | 1000 | Maximum concurrent connections across all protocols. |
[storage] - Data Directories
| Setting | Type | Default | Description |
| data_dir | Path | "/var/lib/mareedb/data" | Main data directory for database pages. |
| wal_dir | Path | "/var/lib/mareedb/wal" | Transaction durability log directory. Can be on a separate disk for performance. |
| temp_dir | Path | system temp | Temporary files for sorting and query spill. |
| max_wal_size_mb | Integer | 1024 | Maximum transaction log size (MB) before a checkpoint is triggered. |
| checkpoint_interval_sec | Integer | 300 | Seconds between automatic checkpoints. |
[auth] - Authentication & TLS
| Setting | Type | Default | Description |
| admin_password | String | Required | Password for the built-in admin user. Change on first start. |
| tls_cert | Path | auto-generated | Path to TLS certificate (.pem). Auto-generates self-signed on first start. |
| tls_key | Path | auto-generated | Path to TLS private key (.pem). |
| tls_required | Boolean | false | Require TLS for all connections. Recommended for production. |
[licence] - Licence
| Setting | Type | Default | Description |
| key | String | (none) | Licence key. Not required for the Community tier. |
| tier | String | auto | Override licence tier (community/sme_free/professional/enterprise). Auto-detected from key. |
[health_check] - Health Monitoring
| Setting | Type | Default | Description |
| enabled | Boolean | true | Enable health check subsystem. |
| on_boot | Boolean | true | Run health check on every server startup before accepting connections. |
| on_schedule | String | (none) | Cron expression for scheduled checks. E.g. "0 3 * * *" for 3 AM daily. |
| notify_email | String | (none) | Email address for failure alerts. |
| fail_action | String | "warn" | "warn" = start and log the failure. "block" = refuse to start (exit code 78). |
| timeout_seconds | Integer | 300 | Maximum 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}"
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