Skip to content

Gateway Flags

The gateway is configured via command-line flags or environment variables. Flags take precedence over env vars.

rep-gateway [flags]
FlagDefaultDescription
--modeproxyOperating mode: proxy or embedded
--upstreamlocalhost:80Upstream server address (proxy mode only)
--port8080Listen port
--static-dir/usr/share/nginx/htmlStatic file directory (embedded mode only)
--manifestPath to .rep.yaml manifest file
--env-filePath to .env file (env vars take precedence)
--strictfalseExit on guardrail warnings
--hot-reloadfalseEnable hot reload SSE endpoint
--hot-reload-modesignalDetection mode: file_watch, signal, poll
--watch-pathPath to watch for changes (file_watch mode)
--poll-interval30sConfig poll interval (poll mode)
--log-formatjsonLog format: json or text
--log-levelinfoLog level: debug, info, warn, error
--allowed-originsComma-separated CORS origins for /rep/session-key
--tls-certPath to TLS certificate
--tls-keyPath to TLS private key
--health-portSeparate port for health check endpoint

Every flag can be set via environment variable with the REP_GATEWAY_ prefix:

Terminal window
REP_GATEWAY_MODE=proxy
REP_GATEWAY_UPSTREAM=localhost:80
REP_GATEWAY_PORT=8080
REP_GATEWAY_STRICT=true
REP_GATEWAY_HOT_RELOAD=true
REP_GATEWAY_HOT_RELOAD_MODE=signal
REP_GATEWAY_LOG_FORMAT=json
REP_GATEWAY_LOG_LEVEL=info
REP_GATEWAY_ALLOWED_ORIGINS=https://app.example.com,https://staging.example.com
  1. Command-line flags (highest)
  2. Environment variables (REP_GATEWAY_*)
  3. Manifest file settings (lowest)
Terminal window
rep-gateway \
--mode proxy \
--upstream localhost:5173 \
--port 8080 \
--hot-reload
Terminal window
rep-gateway \
--mode embedded \
--static-dir /static \
--port 8080 \
--strict \
--log-format json \
--allowed-origins https://app.example.com
Terminal window
rep-gateway \
--mode proxy \
--upstream localhost:80 \
--port 8080 \
--strict \
--hot-reload \
--hot-reload-mode file_watch \
--watch-path /config \
--health-port 9090