Gateway will not pair with the cloud
Gateway will not pair with the cloud
Symptom
You installed the gateway agent and started the service, but the Gateways page still shows the gateway as Offline or Pending after more than two minutes. No heartbeat has landed.
Likely causes
- The cloud base URL in the gateway config is wrong (typo, HTTP vs HTTPS, wrong port).
- The one-time pairing token has expired (default lifetime is 15 minutes).
- Outbound firewall blocks the gateway from reaching the cloud on 443 (or 8090 for self-hosted dev).
- Host clock is more than 5 minutes off — token signatures fail validation.
- The same hardware was already paired under a different name; duplicate claim is rejected.
Fix
Re-run pairing from the web UI
- In the NovaVMS web UI, open Gateways.
- Click Add gateway. Copy the new pairing token and cloud URL.
- On the gateway host, paste both into the config (or use the one-line bootstrap command printed by the dialog).
- Restart the gateway service.
If the cloud URL is wrong
- Check the host can reach the cloud:
curl -sI https://<cloud-host>/healthzshould return 200. - For self-hosted dev, confirm the port matches
SERVER_ADDRin the cloud.env(default 8090, not 8080).
If the clock is skewed
- On the gateway host, run
timedatectl(Linux) and confirm System clock synchronized: yes. - If NTP is not running, install
chronyorsystemd-timesyncdand wait 60 seconds for the first sync.
If the gateway is a duplicate
- On the Gateways page, delete the stale record for this hardware.
- Generate a fresh pairing token and run the bootstrap command again.
Verify
- The Gateways page shows a green dot within 60 seconds of restart.
- The gateway’s Last heartbeat timestamp is under 30 seconds ago.
- The gateway’s host, version, and interface IPs populate in the detail panel.
If none of this worked
- Collect the gateway log:
sudo journalctl -u novavms-gateway -n 500 --no-pager. - Capture the clock status:
timedatectlanddate -u. - Test outbound reach:
curl -vI https://<cloud-host>/healthz. - Attach all three to a support ticket.
- See also: Camera does not appear in ONVIF discovery.