Chapter 14 of 15
Errors on Dashboard After Proxmox Community Update
Note: This only applies to 1.x versions before 1.4.2. It is not applicable to 2.0.
Symptom
After upgrading via Proxmox community scripts, the PatchMon dashboard shows errors like "network error" or similar. The UI loads but cannot talk to the backend.
Cause
This is caused by a stale VITE_API_URL variable in the frontend environment file (frontend/.env). The built frontend bakes in that URL and can no longer reach the backend at runtime.
Fix
-
Open the frontend env file:
sudo nano /opt/<your-domain>/frontend/.env -
Remove or comment out the line:
VITE_API_URL=... -
Change directory to the PatchMon install (where both
frontend/andbackend/live) and rebuild the frontend:cd /opt/<your-domain> npm run build -
Reload the page. The dashboard should work again.
Rule of thumb
- If
VITE_API_URLis set, it must matchCORS_ORIGINin the backend.env. If you build and deploy the frontend with several differentVITE_API_URLvalues (e.g. internal and external bundles served from the same backend), each of those origins must appear inCORS_ORIGIN, comma-separated with no spaces (e.g.CORS_ORIGIN=https://patchmon.example.com,https://patchmon.internal.lan). - Ideally, leave
VITE_API_URLunset and let the frontend use the current origin. The default build is correct for most deployments.
Not seeing the fix?
This issue is resolved in versions ≥ 1.4.2. If you're still on an older version, upgrading to the latest is the preferred fix.