Skip to content

Deployment

Rack Gateway can be deployed using Docker, Convox, or any container orchestration platform. This section covers deployment options, infrastructure setup, and production best practices.

Rack Gateway follows a single-tenant, per-rack deployment model:

AspectDescription
One gateway per rackEach Convox rack has its own gateway instance
No multi-tenancyGateway manages exactly one rack
Shared databaseGateway uses its own PostgreSQL database
Private networkRecommended: Deploy behind Tailscale/VPN

Before deploying, ensure you have:

  • PostgreSQL 14+ - Database for users, tokens, audit logs
  • Google Workspace - OAuth provider for authentication
  • Domain name - For gateway API and web UI
  • Tailscale - Private network access
  • Postmark - Email notifications
  • Slack - Real-time notifications
  • S3 bucket - WORM storage for audit anchoring
  1. Set up infrastructure

    Create PostgreSQL database and S3 bucket (if using audit anchoring).

  2. Configure OAuth

    Create Google OAuth client with correct redirect URIs.

  3. Set environment variables

    Configure all required environment variables for your deployment method.

  4. Deploy

    Choose Docker for testing, Convox for production.

  5. Verify

    Check health endpoints and log in to web UI.

  6. Harden

    Follow the production checklist for security hardening.

All deployments use the same environment variables. Key categories:

CategoryVariablesPurpose
CoreAPP_SECRET_KEY, DOMAINSecurity and routing
OAuthGOOGLE_CLIENT_*, GOOGLE_ALLOWED_DOMAINAuthentication
DatabaseDATABASE_URL, DB_*PostgreSQL connection
RackRACK_TOKEN, RACK_HOSTConvox connectivity
EmailPOSTMARK_*Email notifications
AuditAUDIT_*, S3 settingsAudit log anchoring

See Environment Variables for the complete reference.

PlatformUse CaseGuide
DockerDevelopment, testingDocker Deployment
ConvoxProduction deploymentsConvox Deployment
KubernetesCustom orchestrationUse Docker image directly
LevelSetupWhen to Use
StandardPublic gateway + OAuthInternal tools, low-risk
PrivateTailscale + OAuthSensitive infrastructure
MaximumPrivate + MFA + Audit anchoringCompliance requirements
ComponentPurposeSizing
PostgreSQLUser data, audit logs10GB minimum, scale with logs
Gateway containerAPI server256MB RAM, 0.25 CPU minimum
Web containerStatic SPA64MB RAM, minimal CPU
ComponentPurposeGuide
S3 WORM bucketAudit anchoringS3 WORM Storage
KMS keyEncryption at restAWS Infrastructure
TailscalePrivate networkingPrivate Network

Key production requirements:

  • Strong APP_SECRET_KEY (256-bit random)
  • HTTPS with valid certificates
  • Database backups configured
  • Audit log retention set (LOG_RETENTION_DAYS)
  • Admin users configured
  • MFA policies enforced
  • Monitoring and alerting enabled