Message Center Configuration
Message Center Configuration
A quick-reference index for configuring a Message Center instance. Follow the links for full details.
Authentication
| Setting | Where | Details |
|---|---|---|
NEXTAUTH_SECRET | Kubernetes Secret | Minimum 32 bytes. Generate: openssl rand -base64 32. Required. |
NEXTAUTH_URL | ConfigMap | Must match the exact HTTPS URL browsers use. Mismatches break sessions. |
| Session expiry | Built-in (8 hours) | Controlled by next-auth. Not configurable via env vars. |
See Environment Variables Reference for the full variable reference.
Database
| Setting | Default | Notes |
|---|---|---|
MONGODB_URI | mongodb://localhost:27018/core_admin | Include credentials in production |
MONGODB_DB | core_admin | Database name |
| Schema version | 9 (current) | Apply with make migrate before every deploy |
See MongoDB & Migrations for migration details.
Core and Proxy Integration
| Setting | Default | Notes |
|---|---|---|
CORE_API_URL | http://localhost:8080 | Use https:// in production to enable mTLS |
CORE_HEALTH_URL | http://127.0.0.1:8092/health | Plain HTTP health probe; must be reachable |
CORE_ADMIN_API_KEY | (required) | Secret — for /api/v1/admin/* and Aerospike endpoints |
PROXY_LOGIN_URL | https://127.0.0.1:8088/api/v1/user/login | Proxy service account login |
BFF_PROXY_EMAIL | (required) | Service account email — Secret |
BFF_PROXY_PASSWORD | (required) | Service account password — Secret |
mTLS Certificates
| File | Purpose |
|---|---|
CORE_TLS_CERT_FILE / PROXY_TLS_CERT_FILE | Client certificate |
CORE_TLS_KEY_FILE / PROXY_TLS_KEY_FILE | Private key (Secret) |
CORE_TLS_CA_FILE / PROXY_TLS_CA_FILE | CA certificate |
Certificates hot-reload without a pod restart when files change on disk.
See mTLS Certificates for the full setup and rotation guide.
Performance Tuning
| Variable | Default | When to change |
|---|---|---|
CORE_AGENT_CONNECTIONS | 32 | Lower if Core is overloaded; raise for high-throughput deployments |
CORE_BODY_TIMEOUT_MS | 60000 | Raise if standard API calls time out (high-latency network) |
CORE_UPLOAD_BODY_TIMEOUT_MS | 1800000 | Raise for very slow upload links |
CORE_MAX_RESPONSE_BYTES | 16777216 | 16 MB — raise only if standard list endpoints return PAYLOAD_TOO_LARGE |
UPLOAD_MAX_BYTES | 1073741824 | 1 GB — policy cap on recipient file uploads |
See Capacity Planning for sizing guidance.
Audit Retention
| Variable | Default | Notes |
|---|---|---|
AUDIT_RETENTION_DAYS | 90 | After changing, run make migrate to update the TTL index |
Set to 0 to disable automatic audit log expiry (records retained indefinitely).
Role Configuration (RBAC)
RBAC is enforced server-side. Roles are assigned per workspace via the Settings → Members page.
| Role | Who should have it |
|---|---|
author | Campaign creators — can create, submit, archive |
moderator | Reviewers — can approve/reject campaigns and sender revisions |
admin | Workspace owners — all author + moderator actions plus member management |
super_admin | System operators only — cross-workspace access, can delete campaigns |
The is_moderator flag on an author membership grants moderator-level permissions without full role promotion.
For the full permission matrix see Environment Variables Reference and the user guide Roles & Permissions.
Optional Features
| Feature | Variable | Notes |
|---|---|---|
| Grafana embed | GRAFANA_PUBLIC_URL | Full dashboard URL; Grafana needs GF_SECURITY_ALLOW_EMBEDDING=true |
| Aerospike diagnostics | ADMIN_DIAGNOSTICS_ENABLED=true | Enables /diagnostics/admin panel |
| CORE URL in trigger snippets | NEXT_PUBLIC_CORE_URL | Shown to users in trigger-mode campaign API examples |
Configuration Index
For detailed documentation by area:
- Architecture Overview — service topology
- Prerequisites — before you start
- Installation —
make setupand first run - mTLS Certificates — certificate setup and rotation
- MongoDB & Migrations — schema and migration history
- Seeding & Bootstrap — super admin setup
- Kubernetes Deployment — production k8s manifests
- Environment Variables Reference — full env var reference
- Monitoring & Alerts — log sentinels and alert rules
- Backups & Recovery — backup and restore
- Troubleshooting Runbooks — incident response
- Upgrade Procedure — safe upgrade sequence
- Capacity Planning — performance tuning
- Security Hardening — production security