Upgrading Modern Control
Short runbook for moving an existing installation to a newer release. Pair with DEPLOYMENT.md for first-time topology.
Before you upgrade
- Note dashboard version (
dashboard/package.json) and agent folder (kit-addons/modern_darkrp_control). - Confirm backups: PostgreSQL dump + copy of
garrysmod/data/modern_darkrp_control/config.json(contains the live agent secret after pairing). - Schedule a short maintenance window if the game server must restart for the addon.
Dashboard (panel)
- Pull or unpack the new release on the panel host.
- Install dependencies:
cd dashboard && npm ci. - Apply schema:
npx prisma migrate deploy. - Build:
npm run build. - Restart the process (
systemctl restart moderndarkrp-dashboardor equivalent). - Check
GET /api/healthandGET /api/health/ready→ 200. - Log in and confirm Servers shows the expected ONLINE/DEGRADED badge.
Game agent (GMod)
- Stop or changelevel the game server only when ready — Lua addons do not hot-reload.
- Replace
garrysmod/addons/modern_darkrp_controlwith the release copy. Do not deletegarrysmod/data/modern_darkrp_control/config.jsonunless you intend to re-pair. - Start the game server (or changelevel).
- In console:
mdrp_status— expect a matching agent version and a recent successful heartbeat. - In the dashboard: Overview / Tactical Map / Commands should refresh within ~10–15s.
Re-pairing (only if credentials are lost)
- Owner: Servers → Reissue pairing (or license host transfer).
- Paste the new pairing
configJsononto the game host. - Restart GMod; wait for ONLINE. Do not keep an old
secretalongside a newpairingToken.
Rollback
- Redeploy the previous dashboard build and run
npx prisma migrate deployonly if that release’s migrations are compatible (never invent reverse migrations). - Restore the previous addon folder; keep the same
config.jsonif the secret was not rotated during the upgrade. - Verify health and heartbeat as above.
Compatibility notes
- Panel and agent in the same release train are supported; mixed major versions are not.
- Secret rotation uses an overlap window — finish updating
config.jsonbefore the previous secret expires. - Demo / mock dashboard mode never substitutes for a live paired agent after upgrade.