Skip to content

Deploy in production ​

The simplest and safest way to run ReliaForge in production is a single container serving both the backend API and the built console on one origin, behind a reverse proxy that authenticates operators.

Build the frontend once and point RELIAFORGE_CONSOLE_DIR at the dist/ directory:

bash
npm ci && npm run build
RELIAFORGE_CONSOLE_DIR=/srv/reliaforge/console reliaforge

One container then serves SPA routes, /api/v1 endpoints, plugin UI bundles, SSE log streams, and WebSocket terminals on the same origin, avoiding CORS headaches. See deploy/Dockerfile in reliaforge-plugins for a ready-to-build multi-stage image.

Option 2: Separate static web server ​

If you prefer serving dist/ from Nginx or Caddy separately:

  1. Return index.html for unknown client-side routes (SPA fallback).
  2. Proxy /api/v1 to the backend on the same origin.
  3. Disable proxy response buffering on SSE log routes (X-Accel-Buffering: no / proxy_buffering off) and forward Upgrade + Connection headers for WebSocket terminals.

Never place upstream API tokens or proxy secrets in VITE_* build variables; they are compiled into public browser bundles.

Reverse proxy authentication checklist ​

When RELIAFORGE_AUTH_MODE=proxy is set:

  1. Restrict RELIAFORGE_TRUSTED_PROXIES to the exact CIDR of your reverse proxy or ingress gateway.
  2. Inject the authenticated operator header (default X-ReliaForge-User) and the shared secret header (X-ReliaForge-Proxy-Secret) at the proxy layer, stripping any client-supplied copies first.
  3. Ensure the proxy preserves its direct TCP peer address to the backend and forwards WebSocket upgrade requests with the same auth headers.
  4. Set RELIAFORGE_TRUSTED_ORIGINS only if browsers connect from an origin other than the backend's own host.

If any required production auth setting is missing, reliaforge refuses to start.

Read-only demo build ​

bash
npm run build:demo

Generates the static hash-routed bundle published at demo.reliaforge.dev. It runs entirely on preset JSON fixtures with no backend or write actions. For frontend development commands, see reliaforge-frontend.

Review the security model before exposing an instance outside a private network.

Released under the MIT License.