⛭ Cluster / Replication
Run the system as an active/passive cluster — the active node mirrors its data to a read-only standby you can promote.
The Cluster / Replication page (under Settings, built-in superuser only) lets you run this system as an active / passive cluster. The active node publishes its data and settings to a passive standby every hour; the passive only receives and imports them and stays read-only — a warm standby you can promote if the active is ever lost. Each tenant picks its own partner, so a single server can be active for one tenant and passive for another.
.env (session secret, superuser login) is never replicated.Pairing two servers
- On the passive (standby) server, for this tenant: set the role to Passive, tick Accept pushes, click Generate pairing key, and copy the key (it is shown once). Save.
- On the active (live) server, same tenant: set the role to Active, enter the passive’s IP and port (and, only if several domains share that IP on IIS, its domain for the Host header — otherwise leave it blank), paste the pairing key, and tick Replicate automatically. Save.
- Click Test connection, then Push now to seed the first copy. Replication then runs every hour on its own.
Push now and switching automation off
- Push now sends an immediate copy — it works even while automatic replication is off, so you can verify a pairing before enabling it.
- Replicate automatically is the on/off switch for the hourly push; turning it off keeps the pairing but stops the schedule (use Push now manually).
- The newest few hourly backup zips are mirrored to the passive too, so the standby holds real rollback points. Re-sync backups re-sends them (e.g. after rebuilding the passive).
Promotion (manual failover)
A passive replica is read-only for everyone except the built-in superuser. If the active node is lost, promote the passive: change its role from Passive to Active (or Off) and save — that lifts read-only. Then point your users at it. When the old active returns, make the promoted node the active and the recovered node passive *first*, so a stale copy can’t overwrite the current data.