Job kinds
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Almost everything the panel does on a server is a job kind: a named, whitelisted
action such as site.create, stack.deploy or ssl.issue. The control plane validates
the fields, builds a fixed mz argv and sends it to the server’s agent, which runs it in
its native engine. The control plane holds about 390 kinds in 46 domains.
Authoritative, always-current list: GET /v1/api/operations → job_kinds[] (type,
level, scope, min_tier, rbac_group, fields). The schema of one kind is at
GET /v1/api/job-kinds/{type} (MCP: jobs_schema {type}). For the dispatch, poll and
stream lifecycle, see Jobs.
How a kind becomes a command
Section titled “How a kind becomes a command”- Validate. The body
{type, …fields}is checked against the kind’s schema (domain format, enums, ranges). Unknown keys are rejected for API tokens. You can’t send a raw command. - Build the argv. Each kind builds a fixed
mzargv. Usually it mirrors the kind (ssl.issue→ssl issue <domain> --json), but not always:site.list→sites --json, andstack.deploy→stack create <name> --compose-b64 … --json, where the API base64-encodes the compose file for you. - Gate. The token’s risk class for the kind, the user’s RBAC group and the plan tier are checked before anything reaches the box.
- Dispatch. The agent runs the argv natively, shelling out only to public tools
(nginx, docker, wp-cli, certbot, systemctl, …), never to
mzitself. Output streams back, ending with an exit code.
The control plane stores the job row and its log lines. The real state lives on the box
(nginx vhosts, /etc/mz, databases, containers) and is read back through the inventory
cache and read jobs.
Domain map
Section titled “Domain map”| Domain | What it does | Panel location |
|---|---|---|
site | Create (wordpress, static, php, nodejs, python, go), clone, delete, info, stats, logs, env, enable/disable, restart, limits, isolation, push/pull/link; Laravel scheduler/queue (site.laravel, site.laravel-status) and allowlisted artisan commands (site.artisan) | Server Sites, per-site shell |
app | Single-container Docker apps: create, build, update, releases, rollback, previews, env, domains, db-attach, logs | Server Apps, /apps |
stack | Docker Compose stacks: deploy, update, build, pull, up/down, restart, adopt, releases, rollback, previews, env | Server Apps, /apps |
route | Path routing: send <domain>/<path> to another app or stack (Pro) | App/stack drawer |
deploy | Git-deploy pipelines for sites: init, run, rollback, PR previews (Pro) | Per-site deploy |
docker, container, image, volume, network | Container lifecycle (start/stop/restart/pause, logs, stats, inspect, remove), engine df/prune, update check; image, volume and network management | Server Apps → Resources |
db | MariaDB/MySQL databases and users, grants, dumps, import, tuning, remote access | Server Databases |
pg | PostgreSQL databases, tables, VACUUM, expose/unexpose, pgvector, tuning | Server Databases |
mongo | MongoDB databases, collections, compact, export/import | Server Databases |
pgadmin, mongoexpress | The on-box admin UIs | Server Databases |
php | Versions, default, per-site switch, extensions, php.ini / FPM config, restart | Server PHP |
ssl | Issue, renew, delete, auto-renew, HTTPS redirect | Server DNS & TLS |
dns | Lookups and the authoritative BIND9 zones/records on the box | Server DNS & TLS |
mail | Mail stack install, domains, mailboxes, aliases, groups, shared mailboxes, forwarding, relay, spam/AV, queue, delivery log, sign-in portals | /mail |
cron | Managed cron jobs and the WP-Cron dispatcher | Server Cron |
daemon, service | Supervisor daemons; systemd service control and logs | Server Services |
security, waf | UFW, Fail2ban, SSH policy, ClamAV, file and WordPress integrity, ModSecurity | Server Security |
user, users | OS users, SSH keys, sudo, lock, key audit | Server Users |
wp, cache | WordPress updates, tools, cache, Redis, image optimization, content, SEO; Redis config | Per-site WordPress pages |
ai, litellm, rag, mcp | AI on the VPS: models, LiteLLM keys and usage, RAG and MCP servers (Pro) | Server AI |
system, updates, livepatch | Timezone, hostname, reboot, reboot window, cache clear; OS updates; Ubuntu Livepatch | Server Settings, OS updates |
storage, quota, plan, tuning | Disk usage and cleanup, disk quotas, resource-limit plans, stack retuning | Server Storage, Settings |
extension | Server add-ons (apt, repo, docker): install, remove, update | Server Extensions |
lb | Load-balancer desired state on a node | /load-balancers |
migrate | Migrate-in from cPanel and other panels | /tools |
server, logs, metrics | Host status and facts, log tails, metric snapshots (read-only) | Monitoring |
console | The box’s local single-server web console (owner/admin only; on/login never via tokens) | Server Settings |
Backups are not job kinds you dispatch. Backup runs and restores use the dedicated
backup_* / backups_* operations, so they can carry sealed destination credentials.
See Backups and restore.
Risk classes
Section titled “Risk classes”Each kind has a token risk class:
- read: kinds that only read (
*.list,*.status,*.info,*.logs, …). Some exceptions look like reads but reveal secrets or change state:site.env-get,stack.getand*.optimizeare operate. - operate: the default for mutations (about 240 kinds).
- full: provisioning and replacement, such as
migrate.*,extension.install/remove,mail.install/uninstall,php.install/uninstall,updates.apply,waf.enable/disable,plan.*,lb.*anddocker.remove. Every kind that needs an opt-in scope is also full. - opt-in scope: destructive kinds additionally need a scope (
sites:delete,data:delete,backups:restore,system:admin,files:write). The mapping is in Tokens, levels & scopes. - never:
docker.exec,wp.login-url,site.wp-admin-passwd,db.pma,db.pma-admin,console.on,console.login,mail.webmail-login,mail.webmail-update,mail.apikey-*,app.env-syncandstack.env-sync. These are dashboard-only (403 not_exposed).
RBAC groups
Section titled “RBAC groups”A team member’s role must hold the kind’s capability group. The group comes from the kind’s prefix:
| Group | Prefixes |
|---|---|
content | site, wp, cache |
infra | php, ssl, dns, db, app, stack, route, cron, mail, extension, docker, ai, litellm, rag, mcp |
sysadmin | service, daemon, security, storage, updates, system, user, migrate, and every other prefix (pg, mongo, container, image, volume, network, waf, quota, plan, tuning, lb, deploy, console, livepatch, …) |
observe | metrics.*, server.* and read-only polls |
siteops | A narrow per-site group: ssl.issue, ssl.renew, ssl.delete, ssl.auto-renew, ssl.https-redirect, php.switch |
Plan gates
Section titled “Plan gates”Over-plan kinds are refused at the API with 403 tier_required before anything reaches
the box:
- Pro:
app.preview-create,app.adopt,app.env-sync;stack.adopt,stack.preview-create,stack.env-sync;site.link,site.push,site.pull;deploy.*;route.*;rag.*;mcp.*. - Per extension:
extension.installandextension.updatefollow the tier of the extension being installed. - Every plan, with the Docker apps & stacks quota:
app.create,app.build,app.rebuild,app.rollback,app.env-set,app.db-attach;stack.deploy,stack.build,stack.update,stack.rebuild,stack.rollback,stack.env-set,stack.pull,stack.auto-update. Creating a new app or stack (a new name on that server) over the plan’s shared quota (Free 3, Plus 5 per server, Pro and Max unlimited, across all servers) is refused with402 app_limit.app.buildwitharchiveordbneeds agent 0.2.144 or newer (409 agent_update_required). - Every plan: everything else, including per-site resource limits,
plan.*andlitellm.*. - Free plan, through API tokens: after the organization’s 30-day automation trial,
every kind above level read answers
402 automation_trial_endedwhen sent through MCP or/v1/api(reads still work; the dashboard is not affected). Plus and up are never limited.
Gotchas
Section titled “Gotchas”- Exit 127 means the agent on that box has no native handler for the kind, usually
because the agent is old. Update it (
agent_update) and retry. - Secrets are masked. Credential flags (
--pass,--password, registry and git tokens) are masked in the stored arguments and the audit log. Kinds that print a credential (such asapp.db-attach) stream it live but never store it. - Some kinds are never queued for an offline agent (env writes, credential-bearing
kinds). They answer
409 server_offline. Everything else waits up to 24 hours. - Cross-org jobs answer 404, not 403.
Related
Section titled “Related”- Jobs: dispatch, poll, stream
- The mz CLI and mz command catalog: the on-box view of the same engine.
- Tokens, levels & scopes