Files
joshuaandClaude Opus 5.5 041461f2b5 Servers and the agent, backend (2.1.0): join, jobs, schedules, port list, stats, alerts
- Agent API /api/agent/v1: join with a one-time token, then poll, stats,
  report and export upload, all signed with the server's Ed25519 key.
- Jobs signed with a separate job key (HUB_JOB_SIGNING_KEY_FILE) when
  delivered, config sealed to the server; one at a time per server;
  missed when not picked up in their window.
- New install (licence, ports, preflight against the release's env
  template), Proxy done with public URL checks, scheduled / emergency
  (2FA, reason) / batch updates with email and banner, uninstall with
  an encrypted export first (the key is never stored), adopt and
  linking existing installs, purge after 30 days.
- Port list, install defaults, server configuration (encrypted), stats
  per minute / hour with roll-up, server alerts. contracts 1.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:12:28 +02:00

34 lines
1.6 KiB
Bash

# ─── Cross Events Hub — backend ────────────────────────────────────────────────
PORT=5200
DATABASE_URL=postgresql://postgres:password@localhost:5432/events_hub
# Where the Hub's dashboard runs (CORS, links in alert emails)
FRONTEND_URL=http://localhost:3200
# Signs admin login sessions. Long random string.
JWT_SECRET=change-me
# Encrypts install secrets and two-factor secrets. 32+ random characters; never change it
# once installs are registered (their secrets couldn't be read any more).
HUB_ENCRYPTION_KEY=change-me-to-32-or-more-random-characters
# Licence signing key (Ed25519, PEM). Create with `npm run generate-keys`. Keep the private
# key only on the Hub server and back it up: losing it means every install needs a new
# release with the new public key. Either a file path or the PEM itself (\n for newlines).
HUB_SIGNING_KEY_FILE=./keys/hub-signing-key.pem
# HUB_SIGNING_KEY=
# Job-signing key for server agents (2.1.0; Ed25519, separate from the licence key). Create with
# `npm run generate-keys -- --job`. Agents pin its public key when they join, so replacing it
# means every server has to join again.
HUB_JOB_SIGNING_KEY_FILE=./keys/hub-job-key.pem
# HUB_JOB_SIGNING_KEY=
# The Hub's address as servers reach it (shown in Servers → Add server).
HUB_PUBLIC_URL=https://hub.crosscode.co.za
# Behind a reverse proxy (nginx), so rate limits see real client IPs
TRUST_PROXY=1
# Alert emails: the SMTP server and the alert address are set on the Settings page.
# Background checks (alerts, heartbeat roll-up). false to switch off.
JOBS_ENABLED=true