@slayzone/hub
v0.44.0
Published
SlayZone hub — headless server (DB, routers, auth, computer gateway)
Readme
@slayzone/hub (SlayZone hub)
Headless SlayZone hub: owns the SQLite DB, tRPC/REST routers, auth, and the computer gateway that computers dial into.
SLAYZONE_ROOT=~/slayzone-hub \
SLAYZONE_HUB_AUTH_SECRET=$(openssl rand -hex 32) slayzone-hubSLAYZONE_ROOT is the install anchor: all state (DB, artifacts, logs)
lives under <ROOT>/storage, and the DB filename is derived — not overridable.
Omit it and the hub anchors to its launch directory.
The web UI is served at / on the hub's address.
Reaching it from other machines
By default the hub listens on 127.0.0.1 and requires no login — the same hub the
desktop app runs. The hub itself serves plain http and never does TLS: to let other
machines in, put a TLS front end (Caddy, nginx, a cloud load balancer) in front of it
and tell the hub both addresses (host[:port], no scheme):
SLAYZONE_HUB_LISTEN_ADDRESS=0.0.0.0:8788 # where the hub listens
SLAYZONE_HUB_PUBLIC_ADDRESS=hub.example.com # how clients and computers reach it
SLAYZONE_HUB_REQUIRE_LOGIN=1
SLAYZONE_HUB_AUTH_SECRET=$(openssl rand -hex 32)A hub that other machines can reach (a listen address that is not loopback, or a public
address) refuses to start unless it requires login, has a public address and has
SLAYZONE_HUB_AUTH_SECRET in its environment — it never generates that key onto its own
disk. Clients dial the public address with https:// / wss:// (any host that is not
loopback); loopback is plain http:// / ws://.
Switches (0 or 1; anything else refuses to start), each also a boolean in
<ROOT>/hub.config.json (env wins):
| Variable | Default | |
| --- | --- | --- |
| SLAYZONE_HUB_REQUIRE_LOGIN | 0 | every client must sign in |
| SLAYZONE_HUB_ENABLE_PASSWORD | 1 | email + password sign-in |
| SLAYZONE_HUB_ENABLE_SSO | 0 | Entra sign-in (needs SLAYZONE_HUB_SSO_TENANT_ID, _CLIENT_ID, _CERT_PATH, _KEY_PATH and a public address; SLAYZONE_HUB_SSO_REQUIRE_MFA, default 1) |
| SLAYZONE_HUB_ENABLE_PROCESSES | 1 | hub-local processes |
| SLAYZONE_HUB_ENABLE_INTEGRATIONS | 1 | Linear / GitHub |
| SLAYZONE_HUB_ENABLE_TELEMETRY | 1 | third-party telemetry: 0 = no PostHog and no Convex (leaderboard, feedback) from the web UI or apps connected to this hub; its CSP blocks PostHog |
Today the hub validates and reports every switch (/health) and enforces
REQUIRE_LOGIN; enforcing the others follows.
GPL-3.0-only. Source: https://github.com/debuglebowski/slayzone
