folkzone:troubleshooting:caddy_autosave_not_loading_config
Table of Contents
Caddy Autosave Not Loading Config
Caddy continues using old configuration after Caddyfile update.
Symptom
Updated Caddyfile but changes don't take effect. Caddy logs show errors pointing to old ports or configuration. Services show 502 Bad Gateway after proxy configuration changes.
Cause
Caddy maintains an autosave.json file that caches configuration. When you update the Caddyfile, Caddy may still use the cached autosave configuration instead of the new file.
Fix
Remove the autosave file and restart Caddy.
Steps:
1. Remove the autosave file:
```bash docker exec folkzone-wiki rm /config/caddy/autosave.json ```
2. Restart Caddy:
```bash docker compose restart caddy ```
3. Verify the new configuration loaded:
```bash docker compose logs –tail=10 caddy ```
Prevention
Remove autosave.json after manual Caddyfile changes. Use `caddy reload` instead of restart when possible.
See Also
folkzone/troubleshooting/caddy_autosave_not_loading_config.txt · Last modified: by 127.0.0.1
