Configuration

FerrisKey is configured through environment variables. Every setting has a sensible default for local development — override only what you need.

Environment Variables

Admin

VariableDefaultDescription
ADMIN_USERNAMEadminInitial admin username
ADMIN_PASSWORDadminInitial admin password
ADMIN_EMAILadmin@localInitial admin email

Database

VariableDefaultDescription
DATABASE_HOSTlocalhostPostgreSQL host
DATABASE_PORT5432PostgreSQL port
DATABASE_NAMEferriskeyDatabase name
DATABASE_USERferriskeyDatabase user
DATABASE_PASSWORDferriskeyDatabase password
DATABASE_SCHEMApublicDatabase schema

Server

VariableDefaultDescription
SERVER_HOST0.0.0.0Bind address
SERVER_PORT3333HTTP port
SERVER_ROOT_PATHURL path prefix (for reverse proxies)
ALLOWED_ORIGINSComma-separated CORS origins
WEBAPP_URLFrontend URL (used for redirects)

TLS

VariableDefaultDescription
TLS_CERT_PATHPath to TLS certificate
TLS_KEY_PATHPath to TLS private key

Logging

VariableDefaultDescription
LOG_FILTERinfoLog level filter (trace, debug, info, warn, error)
LOG_JSONfalseOutput logs in JSON format

Deployment Examples

Docker Compose

Configure FerrisKey by setting environment variables in your docker-compose.yaml:

services:
  api:
    environment:
      - DATABASE_HOST=db
      - DATABASE_PORT=5432
      - DATABASE_NAME=ferriskey
      - DATABASE_USER=ferriskey
      - DATABASE_PASSWORD=a-strong-password
      - ADMIN_USERNAME=admin
      - ADMIN_PASSWORD=a-strong-admin-password
      - ADMIN_EMAIL=admin@yourorg.com
      - ALLOWED_ORIGINS=https://iam.yourorg.com
      - LOG_FILTER=info

Bare Metal

Set environment variables directly or use a .env file alongside the binary:

DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_NAME=ferriskey
DATABASE_USER=ferriskey
DATABASE_PASSWORD=a-strong-password
ADMIN_USERNAME=admin
ADMIN_PASSWORD=a-strong-admin-password
ADMIN_EMAIL=admin@yourorg.com
ALLOWED_ORIGINS=https://iam.yourorg.com
SERVER_PORT=3333
LOG_FILTER=info

Then run the API server:

./ferriskey-api

SMTP Configuration

Email delivery (magic links, password reset, email verification) is configured per-realm through the admin console. Navigate to Realm Settings → Email and configure:

  • SMTP Host and Port
  • From address
  • Authentication credentials (if required)
  • TLS/STARTTLS settings

No global SMTP

SMTP is configured at the realm level, not globally. Each realm can use a different mail provider.