Environment Variables
Complete reference of all environment variables.
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)Environment Variables
Complete reference of all environment variables.
OAuth Setup
Google Workspace OAuth configuration guide.
Session Management
Session policies and timeout configuration.
Security Settings
MFA and security settings.
For production deployment, you must configure:
[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"| Category | Purpose |
|---|---|
| Environment Variables | Complete reference of all options |
| OAuth Setup | Google Workspace authentication |
| Session Management | Session timeout and policies |
| Security Settings | MFA enforcement, timeouts |
| Email Notifications | Postmark email configuration |
In development mode (DEV_MODE=true), Rack Gateway:
APP_SECRET_KEY if missingFor production, you must explicitly set:
APP_SECRET_KEY (secure random value)COOKIE_SECURE=true (or use HTTPS)Some settings can be configured via the web admin UI and stored in the database:
| Setting | Environment Variable | Database Setting |
|---|---|---|
| Session timeout | RGW_SETTING_SESSION_TIMEOUT_MINUTES | session_timeout_minutes |
| Require MFA | RGW_SETTING_MFA_REQUIRE_ALL_USERS | mfa_require_all_users |
| Step-up window | RGW_SETTING_MFA_STEP_UP_WINDOW_MINUTES | mfa_step_up_window_minutes |
| Trusted device TTL | RGW_SETTING_MFA_TRUSTED_DEVICE_TTL_DAYS | mfa_trusted_device_ttl_days |
Precedence: Database values take priority over environment variables when set.