Servers
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Servers (/servers) is the home of your fleet: one card per VPS, each with live
CPU, RAM and disk usage, OS, site and Docker counts, and an online/offline badge that
updates in real time. It’s also the single entry point for connecting a new server.
Available on all plans. The number of servers you can connect is your plan’s VPS
quota (Free 1, Plus 3, Pro 10, Max 25) plus any Extra server slot add-ons
($3/slot/month, $2.50 for every slot from 10 slots; Plus and up). See Tiers & quotas.
Add a server, step by step
Section titled “Add a server, step by step”- Click Add server (top-right of the toolbar) to open the composer drawer.
- Give the server a name, which is how it shows in your fleet (you can rename it later).
- Pick how the agent gets installed:
- Run a command: you SSH into the VPS yourself and paste a one-liner.
- Install over SSH: you give MZPanel the host, port, user and a password or private key, and the control plane connects once and installs for you.
- Optionally start from a template (a saved install blueprint, see Server templates) or use the install composer to choose the stack: pick a preset (WordPress & PHP, Docker & Apps, Database server, App runtime) or toggle individual components (Nginx, PHP and versions, WP-CLI, MariaDB, PostgreSQL, Redis, Docker, Node.js, Supervisor, phpMyAdmin, Firewall and Fail2ban), plus timezone, swap file, automatic security updates and SSH hardening.
- Finish:
- Run a command: click Generate install command, copy the one-liner, SSH into the VPS as root and run it. The install token is valid for 1 hour.
- Install over SSH: click Connect & install and watch the install steps stream live (connect, download the agent, register, start the service).
- The new card appears and flips to Running within seconds of the agent’s first heartbeat. The stack you picked is then provisioned in the background.
What else you can do
Section titled “What else you can do”- Search by name, hostname or IP.
- Filter by status (All / Running / Stopped) or by tag (one tag, or Untagged).
- Rename in place: hover a card and click the pencil next to its name.
- Copy the IP: click the IP under the server name.
- Tag a server: click the tag pill on a card to assign, clear or create a tag (color and icon). See Notes & tags.
- Open a server: click a card to enter the server shell (Sites, Apps, Databases, PHP, Cron, Monitoring and more).
- Update the agent: when a new agent release is out, open the Agent update panel from the server switcher or the update notice. Each server has an update policy (pinned, manual, security or auto) or inherits the workspace default.
- Delete a server: Settings > Danger zone > Remove from account (type the server
name or IP to confirm). The control plane
sends the agent an
uninstallmessage and the agent removes itself (see below).
Each card also shows OS, Load avg, Sites and Docker counts, and per-metric CPU / RAM / Disk bars that turn amber over 60% and red over 85%, plus hostname, architecture and uptime in the footer.
Deleting a server
Section titled “Deleting a server”Deleting a server removes it from your account and tells its agent to uninstall
itself. The agent stops and disables mzagent.service and removes
/usr/local/bin/mzagent, /usr/local/bin/mz, /etc/mzagent and /opt/mzpanel.
Sites, apps, databases, mail and files on the box are not touched. An agent that
was offline at the time uninstalls itself the next time it tries to connect (the
control plane answers 410 Gone). See Install the agent
for the manual commands.
How it works
Section titled “How it works”The page loads once from GET /v1/servers, a single call that returns every managed
server in your org with its latest heartbeat snapshot (lastMetrics) and its site and
Docker counts (folded in server-side from the agent-pushed inventory cache, so there’s
no per-card fetch). After that, the cards stay live over a Server-Sent Events stream
(GET /v1/servers/stream): heartbeats push fresh CPU/RAM/disk/load/uptime values and
online/offline transitions without polling.
Adding a server uses one of two routes:
| Method | Route | What happens |
|---|---|---|
| Run a command | POST /v1/servers | Mints a 1-hour install token and returns a curl … | sudo INSTALL_TOKEN=… SERVER_NAME=… bash one-liner |
| Install over SSH | POST /v1/servers/install-ssh | The control plane SSHes into the box, runs the same installer, and streams output over GET /v1/servers/install-ssh/{runId}/stream |
Either way the installer downloads one binary (mzagent, with /usr/local/bin/mz
linked to it), registers with the control plane (swapping the one-time token for a
long-lived agent token) and starts the mzagent service. Agentless “Lite” (SSH-only)
boxes are not shown on this page. They live in the Terminal’s New session
picker and a management drawer. See Agentless servers.
Automate it
Section titled “Automate it”REST (https://api.mzpanel.com, Authorization: Bearer mzmcp_…) and MCP
(https://mcp.mzpanel.com) are on every plan (on Free, writes are a 30-day trial,
then read-only). MCP tool names are the operation ids
with . replaced by _.
| Task | MCP tool | REST | Notes |
|---|---|---|---|
| List servers | servers_list | GET /v1/servers | Returns UUIDs. Registry tools take the UUID as id; the hand-written tools (sites_list, docker_ps, …) take server as a name or id |
| Rename, change labels | servers_update | PATCH /v1/servers/{id} | |
| Count what is on a server (sites, apps, databases, PHP, certificates, cron, users, extensions, pending updates) | servers_counts | GET /v1/servers/{id}/counts | One read of the cached inventory; servers_inventory for the rows |
| Add a server (install token + one-liner) | servers_create | POST /v1/servers | Level full + opt-in scope servers:enroll |
| List / revoke install tokens | install_tokens_list, install_tokens_revoke | GET /v1/install-tokens, DELETE /v1/install-tokens/{id} | Revoke needs servers:enroll |
| Provision the base stack | servers_provision, servers_provision_get, servers_provision_remediate | POST/GET /v1/servers/{id}/provision, POST /v1/servers/{id}/provision/remediate | Level full |
| Read inventory | servers_inventory, servers_inventory_refresh | GET /v1/servers/{id}/inventory/{kind} | Cached agent push; refresh asks the agent to re-push |
| Metrics | metrics_get, servers_metrics_history, servers_traffic_history | GET /v1/servers/{id}/metrics/history | |
| Public IP | servers_ip_get, servers_ip_set | GET/PATCH /v1/servers/{id}/ip | |
| Agent updates | agent_release, agent_update, agent_update_fleet, agent_policy_get, agent_policy_set, agent_rollout | /v1/servers/{id}/agent/*, /v1/servers/agent/* | Policy: pinned, manual, security, auto |
| Fleet roll-ups | servers_sites_all, servers_docker_all, servers_stacks_all, servers_domains_all, servers_mail_all | GET /v1/servers/sites/all and siblings | One query over the inventory cache |
| Delete a server | servers_delete | DELETE /v1/servers/{id} | Level full + opt-in scope servers:delete; triggers the agent self-uninstall |
Typical AI workflow to add a box: call servers_create with
{ "name": "web-1", "install_config": { "components": ["docker"] } } (the returned
oneLiner provisions those components on first connect),
give the returned one-liner to the person (or run it yourself over SSH), poll
servers_list until the server is online, then servers_provision_get to follow the
stack install. See For AI agents and the
API reference.
Gotchas & troubleshooting
Section titled “Gotchas & troubleshooting”402 server_limit. Adding a server (one-liner, SSH install or agentless) when you already have as many as your quota plus extra slots returns{ "error": { "code": "server_limit", "details": { "limit": N, "used": N } } }. Servers already connected are never cut off.- A card stuck on “Installing”. A server shows Installing while
install.shis still running. The badge is time-guarded, so a failed or stuck install falls back to Stopped after about 30 minutes. Re-run the installer if it never comes online. - Metrics show ”—” or 0%. The bars come from the agent’s heartbeat. Until the first heartbeat lands (or on an older agent that omits a field) you see ”—” rather than a made-up value.
- Counts read 0 for a brand-new box. Site and Docker counts come from the inventory cache. A server that has never connected contributes no cache.
- Install token expired. Tokens are valid for 1 hour. Click Add server again to mint a fresh one.
- “Install over SSH” is refused. The control plane won’t connect to a loopback or private/reserved address. Use the box’s public host or IP.
Related
Section titled “Related”- Getting started: connect your first VPS.
- Install the agent: both install paths, provisioning, update policy and uninstall.
- Agentless servers: SSH-only boxes with a zero-knowledge vault.
- Tiers & quotas: how many servers each plan allows.