From 591266c758e61e4129a794d09741dced8cd7eff8 Mon Sep 17 00:00:00 2001 From: Joshua Oosthuizen Date: Tue, 17 Nov 2026 13:18:49 +0200 Subject: [PATCH] Docs: upgrading to 2.1 (job key, ports, servers), changelog Co-Authored-By: Claude Opus 5.5 --- deployment.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/deployment.md b/deployment.md index a312c3f..8458991 100644 --- a/deployment.md +++ b/deployment.md @@ -393,6 +393,32 @@ address, AI per church). The migrations carry everything over, but one thing has its certificate (step 5), add it to `FRONTEND_URL` only if you move the dashboard to it, and keep `events-hub.crosscode.co.za` working: installs point at it (`HUB_URL`) until they're updated. +### Upgrading to 2.1 (servers and the agent) + +2.1 adds servers: an agent on each server polls the Hub for signed jobs (installs, scheduled +updates, adopts, uninstalls) and sends its stats (crosscode-platform `docs/AGENT-1.0-PLAN.md`). The +migration only adds tables. The Hub never connects to a server, so nothing new is opened in frp +or FASTPANEL: agents reach the Hub on its normal address. + +1. **A job-signing key**, separate from the licence key: in `backend/`, + `npm run generate-keys -- --job` → `keys/hub-job-key.pem`. Back it up with the licence key. + In `.env`: `HUB_JOB_SIGNING_KEY_FILE=./keys/hub-job-key.pem` and `HUB_PUBLIC_URL=https://hub.crosscode.co.za` + (the address servers use; it goes in the Add server command). Agents pin the job key when they + join: replacing it later means every server joins again. +2. **Deploy** as usual: `bash scripts/deploy.sh v2.1.0`. +3. **Servers → Ports & defaults:** the port range (match `allow_ports` in frps.ini), the central + server's IP (to check a new install's DNS), and the install defaults (`HUB_URL` is filled in). + Mark ports used by tunnels written by hand as taken. +4. **On the central server** first: check `frps.ini` has `proxy_bind_addr = 127.0.0.1` (and that + every FASTPANEL site still answers after restarting frps), then Servers → Add server → + Central, and run the command it shows as root. +5. **Each church server:** Add server → Church, run the command, then on its page set its + configuration: `TRUST_PROXY` (`loopback` behind frp) and the database (`DB_HOST`, `DB_PORT`, + `DB_ADMIN_URL`, or nothing for the local PostgreSQL). +6. **Existing installs:** Servers → Installs → Link existing (server, folder name, its two ports). + Installs still on 2.1.x from `hope-events` then get a **Move onto the monorepo** (an `adopt` job, + planned like an update, at least 4 hours ahead with notice to the church). + --- ## Troubleshooting