caddy_config_delete
Delete Caddy config nodes at a specified JSON path, including parent nodes and descendants. Requires confirmation; a root delete unloads the entire config and resets the admin endpoint.
Instructions
Delete config at a JSON path. Removes the config node at the specified path. Deleting a parent node also deletes every descendant -- e.g. deleting 'apps/http/servers/srv0' removes that server and all of its routes. Requires confirm=true. Any path that addresses the config ROOT ('', '/', 'config', '/config/', slash-only variants of those, or any of those followed by a lone '...' segment) addresses the ENTIRE config and unloads it: every app and server goes, and so does the 'admin' block, after which Caddy re-binds its admin endpoint to its default address (localhost:2019, or $CADDY_ADMIN in Caddy's environment). If CADDY_ADMIN_URL points anywhere else, neither this server nor caddy_revert can reach Caddy afterwards. A root delete is snapshotted first, so caddy_revert can restore it while Caddy is still reachable; no other path is snapshotted. To REPLACE the config rather than unload it, use caddy_load.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Config path to delete (e.g., 'apps/http/servers/srv0/routes/0') | |
| confirm | No | Must be true to actually delete the config node (safety) |