Bỏ qua để đến nội dung
Agent binary (mzagent) The on-VPS Go agent — installed by the one-liner, run by systemd. There is no customer-facing site CLI.

Agent binary (mzagent)

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

The on-VPS component is mzagent, a single static Go binary. It connects back to the control plane over WebSocket and runs all operations natively (its own embedded Go engine).

mzagent is placed by the install one-liner (see Getting started) and runs as a systemd service, mzagent.service. You don’t normally invoke it directly:

Terminal window
# Service status / logs
systemctl status mzagent
journalctl -u mzagent -f

The agent’s config (server ID and long-lived agent token) lives at /etc/mzagent/config.json (mode 0600, root-owned). The on-VPS registry — the source of truth for sites, jobs, and other on-box state — lives under /etc/mz and is read and written by the agent’s native engine.

mzagent exposes a small set of operational subcommands. The ones you might touch are below; the rest are used internally by the daemon and by on-box self-heal jobs.

SubcommandPurpose
mzagent registerExchange a one-time install token for a long-lived agent token and write the config. Run by the install one-liner.
mzagent runStart the daemon loop: dial WSS, send hello, then heartbeat. This is what mzagent.service runs.
mzagent self-updateDownload, verify (SHA256 + signature), and atomically swap the running binary, then optionally restart. The manual counterpart to the control-plane-commanded update.
mzagent versionPrint version and build info.
Terminal window
mzagent version
mzagent self-update --url <https-asset> --sha256 <hex> --restart

The binary also has a couple of internal entrypoints — mzagent engine <kind> (print an inventory collector’s JSON for debugging) and mzagent x … / mzagent cron-exec … (used by the box’s own cron/systemd self-heal jobs so they keep running even if the control plane is unreachable). These are implementation details, not a user-facing CLI surface.