Bỏ qua để đến nội dung
Servers Your whole VPS fleet on one page, with live CPU/RAM/disk per card, the one place to add a server, and the API/MCP calls to list, add, provision, update and remove servers.

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.

  1. Click Add server (top-right of the toolbar) to open the composer drawer.
  2. Give the server a name, which is how it shows in your fleet (you can rename it later).
  3. 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.
  4. 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.
  5. 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).
  6. 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.
  • 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 uninstall message 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 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.

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:

MethodRouteWhat happens
Run a commandPOST /v1/serversMints a 1-hour install token and returns a curl … | sudo INSTALL_TOKEN=… SERVER_NAME=… bash one-liner
Install over SSHPOST /v1/servers/install-sshThe 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.

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 _.

TaskMCP toolRESTNotes
List serversservers_listGET /v1/serversReturns 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 labelsservers_updatePATCH /v1/servers/{id}
Count what is on a server (sites, apps, databases, PHP, certificates, cron, users, extensions, pending updates)servers_countsGET /v1/servers/{id}/countsOne read of the cached inventory; servers_inventory for the rows
Add a server (install token + one-liner)servers_createPOST /v1/serversLevel full + opt-in scope servers:enroll
List / revoke install tokensinstall_tokens_list, install_tokens_revokeGET /v1/install-tokens, DELETE /v1/install-tokens/{id}Revoke needs servers:enroll
Provision the base stackservers_provision, servers_provision_get, servers_provision_remediatePOST/GET /v1/servers/{id}/provision, POST /v1/servers/{id}/provision/remediateLevel full
Read inventoryservers_inventory, servers_inventory_refreshGET /v1/servers/{id}/inventory/{kind}Cached agent push; refresh asks the agent to re-push
Metricsmetrics_get, servers_metrics_history, servers_traffic_historyGET /v1/servers/{id}/metrics/history
Public IPservers_ip_get, servers_ip_setGET/PATCH /v1/servers/{id}/ip
Agent updatesagent_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-upsservers_sites_all, servers_docker_all, servers_stacks_all, servers_domains_all, servers_mail_allGET /v1/servers/sites/all and siblingsOne query over the inventory cache
Delete a serverservers_deleteDELETE /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.

  • 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.sh is 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.