Skip to content

Development

gladsonsam edited this page Mar 30, 2026 · 5 revisions

Development

Server (Rust)

Requires PostgreSQL and DATABASE_URL if not using defaults.

cd server
cargo run

Runs migrations from server/migrations on startup.

Frontend (React + Vite)

cd frontend
npm install
npm run dev

Use the Vite dev server for UI work; point it at your API/WebSocket URLs as needed.

Agent

On Windows: cargo build / cargo run from agent/. From Linux, use cargo xwin for Windows release builds.

HTTP API and WebSockets (overview)

Path Purpose
GET /healthz Health; exempt from HTTPS enforcement when ENFORCE_HTTPS=true.
POST /api/login Dashboard login.
POST /api/logout Clear session.
GET /api/auth/status Session status.
GET /ws/agent Agent WebSocket (name, secret query params).
GET /ws/view Viewer WebSocket (needs session when UI_PASSWORD is set).
GET /api/... REST API — see server/src/api.rs in the repo for the full list.

When the dashboard password is set, /api/* (except auth endpoints) and /ws/view require a valid session cookie.

Troubleshooting

Symptom What to check
HTTP 426 / “HTTPS required” ENFORCE_HTTPS=false for direct HTTP, or fix the proxy so it sends X-Forwarded-Proto: https.
Login fails on plain HTTP COOKIE_SECURE=true in .env can break HTTP-only access.
Agents fail / 401 on /ws/agent Set AGENT_SECRET on the server; AGENT_PASSWORD on the agent must match. URL must include /ws/agent.
“UI_PASSWORD not configured” Set UI_PASSWORD (or insecure opt-in; not recommended).
Database errors DATABASE_URL, Postgres running, firewall, credentials.
Traefik issues Network, TRAEFIK_HOST, entrypoints, cert resolver names match Traefik config.

License

MIT — see the LICENSE file in the repository.

Home

Install and configure

Day to day

Integrations

Developers and security

Clone this wiki locally