asd caddy — reverse proxy controlDirect control of the Caddy process and its routes. asd starts/stops Caddy on its own when needed; you reach for this group for restarts, troubleshooting, and one-off route operations.
Caddy is stateful — see internals/caddy-state
for why stop (not kill) matters. The wrong way to stop Caddy
drops every active route at once.
| Command | What it does |
|---|---|
asd caddy start |
Start Caddy. Restores saved route state from caddy-state.json if present. |
asd caddy stop |
Stop Caddy. Snapshots the live config to caddy-state.json first. |
asd caddy restart |
Stop + start, preserving state. |
| Command | What it does |
|---|---|
asd caddy routes |
Generate routes from manifests and apply them to a running Caddy. (Subset of asd net apply.) |
asd caddy clear-routes |
Remove all routes from Caddy. Destructive — services become unreachable until next apply. |
| Command | What it does |
|---|---|
asd caddy config |
Print Caddy's current JSON config (verbatim from the admin API). |
asd caddy list |
List Caddy servers + their routes in a readable summary. |
| Command | What it does |
|---|---|
asd caddy server-add |
Add a Caddy server (listener) — e.g. to add an HTTPS listener on a custom port. |
asd caddy sync-auth |
Sync basicauth password hashes with the current credentials (rotate the project-wide password without restarting). |
| Goal | Command |
|---|---|
| First-time start | asd caddy start (asd does this automatically on asd up / asd net apply) |
Pick up a caddyfile change without rebooting |
asd caddy routes |
| Clean shutdown | asd caddy stop |
| See what's currently active | asd caddy list |
| Debug a routing mismatch | asd caddy config \| jq '.apps.http.servers' |
| Rotate the project basicauth password | Set new value in env, then asd caddy sync-auth |
Never kill or pkill Caddy. You'll lose every route that
was added at runtime by asd net apply (the manifest file isn't
the full picture — runtime apply adds more). Use asd caddy stop.
Port changes go through stop/start. Editing
ASD_CADDY_ADMIN_PORT in .env and re-running asd caddy start
while Caddy is already running can leave you with no Caddy at all.
Procedure: asd caddy stop (state saved) → edit .env →
asd caddy start (state restored on new port) → asd net apply.
clear-routes is the nuclear button. It removes every route,
including system routes for the dashboard / hub / shared dev
tools. After running it, the next asd net apply puts them back.
internals/caddy-state — full explanation of the stateful-daemon model.cli/net — the higher-level wrapper that talks to Caddy on your behalf.reference/net-manifest — the caddy.* fields that translate to Caddy config.