Configuration (microbase.conf)
Microbase uses a single file standard — microbase.conf — plus OS environment variables (for Docker, Kubernetes, and systemd). Legacy .env files are not auto-loaded.
Lookup Order
Section titled “Lookup Order”- Explicit flag:
-c /path/to/microbase.confor--config /path/to/microbase.conf - Working directory:
./microbase.conf - OS standard system path:
- Linux / macOS:
/etc/microbase/microbase.conf - Windows:
%ProgramData%\microbase\microbase.conf
- Linux / macOS:
- OS Environment Variables always take precedence over file values.
Initializing System Config
Section titled “Initializing System Config”sudo ./microbase init-configsudo chown root:microbase /etc/microbase/microbase.confsudo chmod 640 /etc/microbase/microbase.confOn Linux/macOS, Microbase checks file permissions at startup and emits a WARN if group-write or world-read/write bits are set (0600 and 0640 are accepted cleanly).
Core Variables
Section titled “Core Variables”| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL |
Yes | — | PostgreSQL connection URI |
JWT_SECRET |
Recommended | Auto-generated | Signing key for JWT tokens (openssl rand -hex 32) |
ENCRYPTION_KEY |
Recommended | Auto-generated | 32-byte hex key for AES-256-GCM encryption at rest |
HOST / PORT |
No | 0.0.0.0 / 3000 |
Listen host and port |
CORS_ORIGINS |
Prod | * |
Comma-separated allowed origins |
DISABLE_ADMIN_UI |
No | false |
Disable embedded /_/ Admin UI |
DEV |
No | false |
Enable debug logging and terminal dev mail/OTP boxes |
ALLOW_PRIVATE_WEBHOOKS |
No | false |
Allow private/LAN webhook targets (dev only) |
DATA_DIR |
No | ./storage |
Local file storage directory |
HOOKS_DIR |
No | ./mb_hooks |
JavaScript hooks directory |
MIGRATIONS_DIR |
No | ./mb_migrations |
SQL/JSON migrations directory |
Config-First Secrets Locking
Section titled “Config-First Secrets Locking”When you configure DATABASE_URL, REDIS_URL, S3_*, SMTP_*, or OAUTH_* in microbase.conf (or OS env):
- Secrets are never persisted to PostgreSQL.
- The corresponding Admin API
PUTendpoints return409 CONFIG_MANAGED. - The Admin UI automatically displays a
Managed via microbase.confbadge and switches the section to read-only.