Skip to content

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.

  1. Explicit flag: -c /path/to/microbase.conf or --config /path/to/microbase.conf
  2. Working directory: ./microbase.conf
  3. OS standard system path:
    • Linux / macOS: /etc/microbase/microbase.conf
    • Windows: %ProgramData%\microbase\microbase.conf
  4. OS Environment Variables always take precedence over file values.
Terminal window
sudo ./microbase init-config
sudo chown root:microbase /etc/microbase/microbase.conf
sudo chmod 640 /etc/microbase/microbase.conf

On 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).

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

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 PUT endpoints return 409 CONFIG_MANAGED.
  • The Admin UI automatically displays a Managed via microbase.conf badge and switches the section to read-only.