Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cloud server deploy

One process, N+1 ports: the admin console plus one sync listener per room. Give every room its own port and keep the admin bind on loopback unless a reverse proxy terminates TLS in front.

Services

  • Linux: contrib/hakocloudserver.service (hardened systemd unit — NoNewPrivileges, ProtectSystem=strict, PrivateTmp, ReadWritePaths scoped to the rooms dir).
  • Windows: --install-service [--service-name NAME] (requires absolute --config; auto-starts at boot), --uninstall-service. Stopping the service drains cleanly; NSSM remains a valid fallback.

Direct TLS for the admin console: --tls-cert fullchain.pem --tls-key privkey.pem (session cookies flip Secure automatically; HSTS follows). The sync plane stays ws:// behind a reverse proxy, or terminate there too. Half a TLS pair refuses to boot — deliberate.

Security posture

  • Secrets live in the config file or token_file, never in argv/env; room keys and hub tokens never cross into logs or API responses.
  • Never bind the console to 0.0.0.0 without TLS — the server logs a loud warning when it sees that combination.
  • Sync traffic is plaintext ws://: terminate TLS at a reverse proxy (or run the hub on a trusted LAN) and rotate group API keys after any network you don’t control sees them.
  • Public probes (/api/health, /api/setup/status) expose room names plus one setup bit — names are handshake-visible on the sync plane anyway.

Troubleshooting

SymptomLikely causeFix
Refuses to boot naming a roomBad name, missing secret, duplicate name/bind, or legacy single-db keys mixed inRead the named reason; declare [[rooms]] cleanly
Client connects, room stays emptyWrong room_name/room_key — rejected at handshake, nothing storedMatch the pair exactly
Console shows no admin prompt but login failsDifferent room: each room has its own usersCreate the admin in the room you log into
Rejected peer’s data appears anywayCheck you are looking at the right room’s console (sessions bind one room)Re-login to the intended room and compare
Sync port unreachable from other hosts despite the process listeningInbound firewall on the hub hostAllow the room’s sync bind port; on DENY-by-default hosts with terminal RETURN rules, insert the ACCEPT before the chain’s RETURN — an ACCEPT appended after it is never evaluated
Build from source fails inside a C library build scriptA wedged ccache intercepting the compilerRun the build with CCACHE_DISABLE=1