The agent
The agent is the only thing MZPanel installs on your VPS. It’s a single static Go binary that holds one outbound WebSocket to the control plane and runs work locally.
What it is
Section titled “What it is”- One process,
mzagent, managed by systemd (mzagent.service). - No runtime dependencies — it cross-compiles for amd64 and arm64.
- It carries a native engine: site, backup, database, Docker and every other
operation runs inside the agent itself. There is no separate implementation and no
Bash
mzscript — the panel and the command line share this one engine.
Two front-ends, one engine
Section titled “Two front-ends, one engine”Every command you run from the dashboard travels down the WebSocket, into the agent’s
native engine, and streams back. That exact engine also has a command-line
front-end: the same binary, symlinked as mz, runs your arguments locally.
- Web — click in the panel; the API dispatches a job to the agent.
- CLI — SSH into the box and type
mz site list,mz php list,mz cron add ….
Because both paths reuse the same dispatch, the CLI reaches everything the panel can
do — new features appear in mz the moment they ship. See The mz CLI.
Footprint & requirements
Section titled “Footprint & requirements”- Ubuntu 24.04 or 26.04 LTS, Debian 12 or 13, or AlmaLinux / Rocky Linux 9 or 10 (the RHEL family is beta: the core stack works, a few panel features report “not available on this OS”)
- 1 CPU / 1 GB RAM minimum
- Idles around ~15 MB RAM
- Only outbound HTTPS:443 required — no inbound ports, no domain on the VPS
How it connects
Section titled “How it connects”The agent dials outbound to wss://ws.mzpanel.com:443 and keeps one persistent
connection that carries a heartbeat, metrics, commands, and pushed events. NAT and
firewalls don’t matter because nothing connects to your VPS. See
Architecture.
Auto-updates
Section titled “Auto-updates”The agent can update itself: it downloads the new binary, checks its SHA-256
against the release, sanity-runs it, then does an atomic swap and restart. Rollouts
are staged (canary, then wider percentages) so a bad build never hits everyone at
once. You set the update policy (pinned, manual, security or auto) per server,
or let servers inherit the workspace default (MCP agent_policy_set).
The agent (0.2.158 and later) keeps its last 3 updates that passed probation in
/var/lib/mzagent/versions. To go back, run mzagent rollback --list and then
mzagent rollback (the previous version) or mzagent rollback --to <version> as root on
the server. The kept binary is checked again like a signed update before it is swapped
in, and the server returns to the newer build by itself if the older one can’t reach
MZPanel within 3 minutes. Pin the server’s update policy first so auto-update doesn’t
move it forward again.
Uninstall
Section titled “Uninstall”Deleting a server in the dashboard makes the agent uninstall itself: it removes
the mzagent service and binary, the mz link, /etc/mzagent and /opt/mzpanel.
Sites, apps, databases and files on the VPS are left untouched. See
Install the agent for details and the manual commands.
When the control plane is unreachable
Section titled “When the control plane is unreachable”The data plane keeps running: sites, apps, databases and mail don’t depend on the control plane. On top of that:
- Jobs queue for you. Actions sent while the agent is offline are delivered when it reconnects (they expire after 24 hours).
- Backups still run. The box keeps a copy of its backup jobs and runs overdue ones itself (see Backups).
- You can manage the box locally with MZPanel Local, a web
console the box serves itself (
mz console on).
Related
Section titled “Related”- Architecture — the two operating modes and data flow.
- The mz CLI — driving the same engine from the command line.
- Install the agent — the one-line install, update policy and uninstall.
- Security model — tokens, trust and isolation.