Reference

Configuration

Environment variables, email delivery, rate limiting, and per-realm settings.

Environment Variables

Set these in your .env file or pass them as Docker environment variables.

Variable Default Description
DATABASE_URL required PostgreSQL connection string
PORT 3000 Server port
NODE_ENV development Environment mode (development or production)
ADMIN_API_KEY required in production API key for admin endpoints
ADMIN_USER admin Initial admin username
ADMIN_PASSWORD none Initial admin password (first start only). There is no default: unset outside production, a random password is printed once in the log; admin and placeholders are refused, and production requires 12+ characters
WEBHOOK_SECRET_KEY required in production Key (32+ bytes) from which the AES-256-GCM key for every secret stored encrypted is derived. Rotate it with WEBHOOK_SECRET_KEY_PREVIOUS; never just replace it
WEBHOOK_ENCRYPTION_SALT required in production 16-byte salt for deriving the encryption key (rotate with WEBHOOK_ENCRYPTION_SALT_PREVIOUS)
THROTTLE_TTL 60000 Rate limit window in milliseconds
THROTTLE_LIMIT 100 Max requests per window
BASE_URL http://localhost:3000 Public-facing URL for redirects and emails

Example .env

.env
# Database
DATABASE_URL=postgresql://idenplane:idenplane@localhost:5432/idenplane

# Server
PORT=3000
NODE_ENV=production
BASE_URL=https://auth.example.com

# Admin
ADMIN_API_KEY=your-secure-api-key-here
ADMIN_USER=admin
ADMIN_PASSWORD=change-me-to-a-strong-password

# Encryption at rest (openssl rand -hex 32 / openssl rand -hex 16)
WEBHOOK_SECRET_KEY=your-32-byte-hex-key
WEBHOOK_ENCRYPTION_SALT=your-16-byte-hex-salt

# Rate Limiting
THROTTLE_TTL=60000
THROTTLE_LIMIT=100

Base URL

The BASE_URL must be set to your server's public-facing URL. It is used in:

  • OAuth callback URLs (identity brokering, device flow)
  • Links in outbound emails (verification, password reset)
  • The token issuer (iss) and OIDC Discovery issuer field
  • SAML metadata endpoints

When using a reverse proxy or load balancer, set BASE_URL to the external URL (e.g., https://auth.example.com), not the internal container address.

Rate Limiting

Idenplane includes a coarse, in-memory flood guard per client IP and per container (brute-force lockout and per-realm rate limits are separate realm settings). Controlled by two variables:

THROTTLE_TTL

Default: 60000 (1 minute)

The rolling time window in milliseconds.

THROTTLE_LIMIT

Default: 100

Maximum requests allowed per window.

For production with a reverse proxy, you may also want to configure rate limiting at the proxy level (Nginx, Cloudflare, etc.).

Email

Email delivery is configured per-realm through the Admin Console, not via environment variables — each realm (tenant) picks its own provider from SMTP, Resend, SendGrid, Mailgun, or Postmark.

How to configure:

  1. Open the Admin Console at /console
  2. Navigate to your realm
  3. Go to the Email tab
  4. Pick a provider and enter its settings — SMTP host/port/credentials, or an API key for Resend/SendGrid/Mailgun/Postmark
  5. Use Send a Test Email to verify

Email is used for email verification, password reset, and other user-facing flows.