caddy_load
Atomically replace the entire Caddy configuration with a JSON config or Caddyfile, ensuring safe large-scale changes. Requires explicit confirmation and snapshots the prior config for easy rollback.
Instructions
Replace the entire Caddy configuration atomically. Accepts a JSON config object, or a Caddyfile string with format='caddyfile'. This is the safest way to make large config changes. Has a 60-second timeout to allow for TLS provisioning. Requires confirm=true: this DISCARDS the entire running config, including servers and routes not present in the supplied config. The prior config is snapshotted first and can be restored with caddy_revert.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Full config — JSON object or Caddyfile text string | |
| format | No | Config format: 'json' (default) or 'caddyfile' | json |
| confirm | No | Must be true to replace the running configuration (safety) |