Managing the Caddy Container
DNS Setup (AWS)
This section covers common Caddy operations for day-to-day management.
Viewing Logs
Use this to: Check certificate status, diagnose issues, or verify Caddy is working.
On the VM:
docker logs -f caddyThe -f flag streams logs in real-time (press Ctrl+C to exit). Look for messages about certificate issuance, renewals, or errors.
Restarting Caddy
Use this to: Apply configuration changes (e.g., after editing the Caddyfile) or restart after an issue.
On the VM:
docker restart caddyWhat happens:
Caddy stops and starts
Configuration changes (like a domain update) take effect
Caddy re-checks certificate status
Expected result: docker ps | grep caddy shows the container as Up within a few seconds.
Stopping Caddy
Use this to: Temporarily disable HTTPS without removing the container (e.g., for maintenance).
On the VM:
What happens:
Caddy stops, but the container remains
The Hivel UI is accessible via HTTP on port 3000 only
Certificates and configuration persist
To restart: docker restart caddy
Removing Caddy Entirely
Use this to: Completely remove the Caddy reverse proxy.
On the VM:
What happens:
The Caddy container is deleted
HTTPS is no longer available
The Hivel application remains reachable directly on port 3000 over HTTP
To reinstall: Follow Option A or Option B setup steps.
Certificate Management
Certificates are stored in the caddy_data Docker volume and persist across:
Container restarts
Caddy upgrades
VM reboots
This means renewals happen automatically without re-issuing from scratch. You don't need to manage certificates manually.
Common Scenarios
"I edited the Caddyfile and want to apply changes:"
"Something's wrong with certificates:"
Look for error messages. If needed, see Troubleshooting.
"I want to temporarily disable HTTPS for testing:"
The UI is accessible on http://<vm-public-ip>:3000. Restart when done: docker restart caddy
"I'm removing the deployment:"
This removes Caddy but leaves certificates in caddy_data volume if you need them later.
Last updated