Docs: upgrading to 2.1 (job key, ports, servers), changelog

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 13:18:49 +02:00
co-authored by Claude Opus 5.5
parent c8359c77e9
commit 591266c758
+26
View File
@@ -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