Troubleshooting
Most problems are visible from the dashboard. Start with the server’s status and its
activity / job log, then work down this list. On the box itself, every panel action
maps to an mz … --json command you can run over SSH to see the raw result. That helps
when the dashboard only shows a failure summary.
Agent won’t come online
Section titled “Agent won’t come online”The agent dials outbound to wss://ws.mzpanel.com:443, and the VPS opens no inbound
ports. If a server stays offline after install:
-
Check that the service is running. On the VPS:
Terminal window systemctl status mzagentjournalctl -u mzagent -f -
Check outbound HTTPS (443). The VPS must reach
ws.mzpanel.comandapi.mzpanel.comon port 443. A firewall or egress proxy that blocks outbound 443 keeps the agent stuck reconnecting (exponential backoff up to 60 s). Test it:Terminal window curl -fsS https://api.mzpanel.com/health -
Check the token. The install token is valid for 1 hour. If the install was slow, or retried after expiry, generate a fresh Add server command and run it again. Once registered, the agent uses a long-lived token. If the server was removed from the fleet in the dashboard, that token stops working and you must enrol the box again.
-
Plan quota. The quota is checked when you add a server: adding one over the plan’s VPS quota fails with
402 server_limit. Upgrade, or buy avps-slotadd-on. Servers that are already connected are never cut off. See Plans & pricing.
Job stuck or failed
Section titled “Job stuck or failed”Operations run as jobs dispatched to the agent over the WebSocket. See Jobs for the full lifecycle.
- Stuck
queued: the agent is offline. Durable jobs wait and run automatically when it reconnects. After 24 hours they are failed withexpired_offlineinstead of running late. Fix connectivity (above). Don’t dispatch the job again, or it will run twice. 409 server_offlineon dispatch: this kind is never queued (env writes and kinds that carry credentials). Retry once the server is online.- Failed: open the job’s log in the dashboard. The result includes the exit code and the error, and the streamed output shows what the engine reported. Re-run after fixing the cause (a busy package manager, low disk, a service that’s down).
- Exit code 127: the agent on that box has no native handler for the job kind,
because it is an older agent. Update the agent (server Settings, or the
agent_updateoperation), wait for it to reconnect, then retry. - Timed out: every job has a time budget (600 s by default; provisioning and backups get longer). Retry, and if it keeps timing out, check server load and disk space.
SSL issuance fails
Section titled “SSL issuance fails”SSL uses Let’s Encrypt through the agent (ssl.issue / ssl.renew jobs). Common causes:
- DNS not pointing at the server. The domain’s A/AAAA record must resolve to the VPS for the HTTP-01 challenge. Check that the record has propagated before retrying.
- Port 80 blocked. HTTP-01 needs inbound port 80 reachable on the VPS during validation.
- Rate limits. Let’s Encrypt limits repeated attempts for the same domain. Wait before retrying a domain that has failed several times.
- Wildcard / DNS-01. Wildcard certificates use DNS-01 and need a DNS provider
connected at Advanced → DNS providers (
/connect/dns) whose zone covers the domain. They are available on every plan.
Backup errors
Section titled “Backup errors”Backups run as archive jobs that produce a .tar.gz and a manifest, pushed to the job’s
destination. Restores, existence checks and deletes are the matching restore, verify and
delete jobs.
- A run fails immediately with “server offline”: the agent isn’t connected. Bring the server online (see above), then run the job again.
- Local or disk failures: usually disk space on the VPS while the archive is staged. Check free space and prune old snapshots.
- Offsite destination fails: check the destination credentials and that the remote (S3, R2, B2, Google Drive) is reachable. Object-storage destinations need the Plus plan. Server-to-server (peer) destinations are not supported yet.
- Encrypted backups: advanced (encrypted) jobs seal each archive with a per-server passphrase. You must keep that passphrase to restore. Download it from the backup settings; without it an encrypted archive cannot be recovered.
- A restore stalls or reports missing: the daily existence check flags snapshots whose archive is no longer at the destination. If a restore stalls, open the job log for the exit code and confirm the archive still exists at the destination.
API and MCP errors
Section titled “API and MCP errors”Errors an automation or AI agent meets, by error.code. The full table, with the
recommended reaction for each, is in the
REST API quickstart.
| Code | Usual cause | Fix |
|---|---|---|
unauthorized (401) | Token missing, mistyped, expired or revoked | Mint a new token at /developer and send Authorization: Bearer mzmcp_… |
access_level (403) | read token on an operate call, or operate on a full one | Use a token with the level in details.required_level |
scope_required (403) | The operation needs an opt-in scope | Mint a token with details.required_scope. Scopes can’t be added to an existing token |
fleet_wide (403) | The token has a server allowlist, and the operation spans servers | Use a token without an allowlist |
tier_required (403) | The feature needs a higher plan | Upgrade, or skip the feature |
not_exposed (403) | The route or job kind is dashboard-only (billing, 2FA, terminal, login links, …) | Do it in the dashboard |
not_found (404) | Wrong id, or the resource is outside the token’s allowlist | Use ids from servers_list, and check whoami → server_scope |
bad_request (400) | Unknown or invalid body keys | Read details, jobs_schema or GET /v1/api/job-kinds/{type} |
rate_limited (429) | Over the per-token budget (Free 60 · Plus 120 · Pro 300 · Max 600 per minute) | Wait for the Retry-After seconds |
app_limit (402) | Creating a new Docker app or stack over the plan’s shared Docker apps & stacks quota (Free 3, Plus 5 per server; details.used, details.limit, details.tier) | Delete an app or stack, add a server slot (Plus) or upgrade. Redeploying an existing name still works |
automation_trial_ended (402) | A write (any operation above level read) through MCP or /v1/api on the Free plan after its 30-day automation trial (details.required_tier: "plus", details.trial_ended_at) | Don’t retry. Upgrade to Plus, or make the change in the dashboard. Reads keep working |
agent_update_required (409) | Deploying from an upload or with db, or an SMTP relay password (mail.send-set relayPass, mail.routes-smtp pass: 0.2.157), or another sealed credential (mailbox, DB and IMAP-import passwords, the Cloudflare sending token, a Resend / SES key: 0.2.161), needs a newer agent (details.current, details.required) | Run agent_update on the server, then retry |
server_key_missing (409) | A job that carries a sealed password or key went to a server whose agent has not published its encryption key yet | Wait for the agent to reconnect (or restart mzagent on the box), then retry |
bad_upload (400) | apps_deploy got an unknown, expired or already used uploadId, or the upload’s curl hasn’t run yet | Call apps_source_upload again and run its curl before apps_deploy |
domain_required (400) | A new app needs a domain and no instant URL is available (or domain: null was sent) | Pass domain with a hostname that points at the server |
direct_upload_unavailable (503) | Direct uploads to the server aren’t available | Deploy from a Git repository instead (source: {git: {url}}) |
no_placement (409) | apps_fleet_deploy / apps_fleet_source_upload found no server that fits (details.candidates[].reason per server) | Relax placement, free resources, update the agent, or pin placement.serverId |
ambiguous_app (409) | The app name exists on several servers | Pass placement.serverId, or use the per-server apps_deploy |
placement_conflict (409) | The app already runs on another server than the one the upload went to | apps_fleet_source_upload with the same name, run its curl, deploy again |
tunnel_required (409) | The action needs a Cloudflare Tunnel on the server: a tunnel hostname route, or a source upload to a homelab box | Create one with servers_tunnel_create (Cloudflare Tunnel), or deploy from Git |
cf_tunnel_scope (403) | The Cloudflare token of the DNS connection lacks Account → Cloudflare Tunnel: Edit | Add the permission to the token in the Cloudflare dashboard, then retry |
MCP tools missing from the client? tools/list shows only what the token’s level and
scopes allow. Check allowed_for_this_token in GET /v1/api/operations. See
Connect your AI client.
Still stuck?
Section titled “Still stuck?”Use the in-dashboard Assistant (the Ask AI button in the top bar) to get help or escalate to a human. The drawer keeps your conversation history and can hand off to support. When you report an issue, include the server ID and the job ID from the activity log; they tie directly to the audit record. See Security model.
Related
Section titled “Related”- The mz CLI: driving and debugging the box from the command line.
- Jobs: dispatch, poll, stream
- Plans & pricing: VPS quota and plan-gated features.
- Security model: tokens, the audit log and the ID trail.