Skip to content

Management Server ​

The management server (apps/management) is the Bun/Elysia HTTP API that powers the dashboard and public API.

What it does ​

The management server handles user authentication (Better Auth with email/password, SSO, OAuth), organization and network CRUD, API key management, the REST API consumed by the dashboard, OAuth 2.0 device authorization for CLI login, SSH auth browser flows, and communication with the control plane via its internal admin API.

Running with Docker ​

bash
docker compose up -d management

The management image is built from deploy/Dockerfile.management. It uses oven/bun:1 for building and oven/bun:1-slim at runtime. The workspace's full package.json graph is copied for correct lockfile resolution.

Running manually ​

bash
bun run management:start

Configuration ​

VariableDefaultDescription
DATABASE_URL-PostgreSQL connection string (required)
BETTER_AUTH_SECRET-Auth signing secret, 32+ chars (required)
DASHBOARD_URLhttp://localhost:5173Dashboard origin for CORS and OAuth
MANAGEMENT_URLhttp://localhost:3000Public management API URL used by clients and auth redirects
BETTER_AUTH_COOKIE_DOMAIN-Shared parent domain for auth cookies when dashboard and management use different subdomains; inferred for matching *.localhost URLs
PORTMANAGEMENT_URL portLocal bind port override; Portless injects this automatically
HOST127.0.0.1Local bind host override; Portless injects this automatically
CONTROL_PLANE_URLhttp://localhost:8080Control plane URL (admin API derived on port 9091)
TUNNET_SERVICE_SECRET-Internal API shared secret (must match control plane)

Released under the AGPL-3.0 License.