Skip to content

Configuration

Rack Gateway is configured primarily through environment variables. This section covers all configuration options grouped by concern.

Rack Gateway uses mise for environment variable management:

  • mise.toml - Project defaults (committed to git)
  • mise.local.toml - Local overrides (gitignored)

For production deployment, you must configure:

mise.local.toml
[env]
GOOGLE_CLIENT_ID = "your-client-id.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET = "your-client-secret"
GOOGLE_ALLOWED_DOMAIN = "your-company.com"

See OAuth Setup for detailed instructions.

[env]
DATABASE_URL = "postgres://user:pass@host:5432/rack_gateway?sslmode=require"

Or using individual variables:

[env]
PGHOST = "your-db-host"
PGPORT = "5432"
PGUSER = "rack_gateway"
PGPASSWORD = "your-password"
PGDATABASE = "rack_gateway"
[env]
APP_SECRET_KEY = "your-32-byte-random-key" # Generate with: openssl rand -hex 32
[env]
RACK_HOST = "https://api.rack.convox.cloud"
RACK_TOKEN = "your-rack-api-token"
RACK_ALIAS = "production"
CategoryPurpose
Environment VariablesComplete reference of all options
OAuth SetupGoogle Workspace authentication
Session ManagementSession timeout and policies
Security SettingsMFA enforcement, timeouts
Email NotificationsPostmark email configuration

In development mode (DEV_MODE=true), Rack Gateway:

  • Uses non-secure cookies (no HTTPS required)
  • Auto-generates APP_SECRET_KEY if missing
  • Logs emails to stdout instead of sending
  • Connects to mock services on localhost

For production, you must explicitly set:

  • APP_SECRET_KEY (secure random value)
  • COOKIE_SECURE=true (or use HTTPS)
  • OAuth credentials (real Google Workspace)
  • Database URL (real PostgreSQL)
  • Rack credentials (real Convox rack)

Some settings can be configured via the web admin UI and stored in the database:

SettingEnvironment VariableDatabase Setting
Session timeoutRGW_SETTING_SESSION_TIMEOUT_MINUTESsession_timeout_minutes
Require MFARGW_SETTING_MFA_REQUIRE_ALL_USERSmfa_require_all_users
Step-up windowRGW_SETTING_MFA_STEP_UP_WINDOW_MINUTESmfa_step_up_window_minutes
Trusted device TTLRGW_SETTING_MFA_TRUSTED_DEVICE_TTL_DAYSmfa_trusted_device_ttl_days

Precedence: Database values take priority over environment variables when set.