Frontend for the RustFS Operator Console (login, dashboard, tenant management). Built with Next.js and designed to run in Kubernetes next to the console backend.
pnpm install
pnpm devOpen http://localhost:3000. The app calls the console API at http://localhost:9090 in dev only if you set the env below; by default it uses relative /api/v1 (see Deployment).
Run the operator console HTTP API (e.g. CONSOLE_COOKIE_SECURE=false cargo run -- console, default port 9090 for local HTTP-only browser testing). Then either:
- Use same-origin: e.g. put frontend and backend behind one dev server that proxies
/api/v1to the backend, and run the frontend withNEXT_PUBLIC_API_BASE_URL=(empty or/api/v1), or - Use different ports: run frontend on 3000, backend on 9090, set
NEXT_PUBLIC_API_BASE_URL=http://localhost:9090/api/v1, and setCORS_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000on the backend.
Login uses a Kubernetes ServiceAccount bearer token. For a local e2e cluster,
generate one with kubectl -n rustfs-system create token rustfs-operator-console --duration=24h
and paste the printed token into the login form. After login, the backend stores
it in an encrypted session cookie.
pnpm buildStatic output is in out/. The default API base URL is /api/v1 (relative), so the same build works when the app is served under the same host as the API (e.g. Ingress with / → frontend and /api → backend).
The default rustfs/operator image embeds this static frontend and the Rust
Console API. Enable the Console and Ingress in the Helm chart; the Console
service serves both / and /api/v1 from one pod.
Do not set NEXT_PUBLIC_API_BASE_URL (or set it to /api/v1). The browser
will send requests to the same origin, so cookies and CORS work without extra
config. Production deployments should serve the host over HTTPS because Console
session cookies are Secure by default.
The standalone console-web/Dockerfile remains available for legacy split
frontend deployments that intentionally use a separate frontend image.
If the frontend is served from a different host than the API, set at build time:
NEXT_PUBLIC_API_BASE_URL=https://api.example.com/api/v1 pnpm buildThen configure the backend with CORS_ALLOWED_ORIGINS and, for cross-site
frontend/API hosts, CONSOLE_COOKIE_SAME_SITE=None (see deploy README).
| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_BASE_PATH |
Base path for the app (e.g. /console) |
"" |
NEXT_PUBLIC_API_BASE_URL |
API base URL (relative or absolute) | "/api/v1" |