Delete protection
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Delete protection marks a server, site, Docker app or compose stack as “don’t destroy this by accident”. While it is on, MZPanel refuses every destructive action on it — from the dashboard, the REST API and MCP alike — and says why. Everyday work (restart, deploy, rebuild, rollback, backups, settings, SSL) keeps working. It is on every plan.
Use it for production: a client’s live shop, the database server, the box that runs your
mail. It is a guard against mistakes, not a security boundary — someone with root on the
server can still run mz site delete over SSH.
Turn it on or off
Section titled “Turn it on or off”- Turn on: click the lock on the item’s card — a server card on
/servers, a site row on/sites, a stack card or a standalone app card on/apps(also in the app’s drawer). The lock closes and turns green. Anyone who can edit the item can protect it. - Turn off: click the green lock › Remove protection. Only the workspace owner or an admin can, in the dashboard, after confirming their identity. API tokens and AI agents can never remove protection.
Protecting a server covers everything on it: its sites, apps, stacks and databases show a lighter lock (“Protected by its server”) and can’t be deleted or overwritten either.
What is refused
Section titled “What is refused”| On | Refused |
|---|---|
| A site | delete, clone over it (overwrite / into a subfolder), push to it from staging, pull into it, migrate onto it, purge original images, restore a backup over it |
| A Docker app or stack | delete, restore a backup over it |
| A server | removing it from MZPanel, dropping or importing over a database, removing an extension, uninstalling mail or a PHP version, removing a mail domain, removing containers or volumes, Docker system prune, deleting a Qdrant collection or an OS user — plus everything above for anything on it |
A refused action answers 423 resource_protected with the item and the reason; nothing
runs on the server. Moving an item to another server is allowed: the protection moves
with it.
Automate it
Section titled “Automate it”| Tool / route | Use |
|---|---|
protection_list · GET /v1/protection | what is protected (kind, serverId, ref, note) |
protection_set · PUT /v1/protection | protect {kind: server|site|app|stack, serverId, ref?, note?} (idempotent) |
There is deliberately no tool to remove protection. An agent that gets
resource_protected should stop and tell the user, not look for another way to delete the
item.