Services:Best Practices
Appearance
Best practices when adding hostnames to the Caddy reverse proxy.
General
[edit]- Validate the Caddyfile before reload:
caddy validate --config /etc/caddy/Caddyfile
- Use clear subdomain names and document them in Services:Current Services
- Back up
/etc/caddy/Caddyfilebefore changes
- Check
journalctl -u caddyafter adding a site
- Use HTTPS for all public services (Caddy handles certificates automatically)
- Test VPS backends with
curlon127.0.0.1before testing the public URL
Checklist
[edit]- [ ] DNS A record points to
87.106.61.62
- [ ] Backend running and reachable from VPS (
127.0.0.1or10.8.0.2via VPN)
- [ ] Site block added to
/etc/caddy/Caddyfile
- [ ]
caddy validatesucceeds
- [ ]
systemctl reload caddycompleted
- [ ]
curl -I https://newservice.jb-vpn.uksucceeds
- [ ] Browser test with valid certificate
- [ ] Entry added to Services:Current Services
Security
[edit]- Prefer VPN-backed NAS services over exposing the NAS to the internet
- Restrict sensitive admin UIs where possible (e.g. phpMyAdmin basic auth in Caddyfile)
- Keep OpenVPN and VPS packages updated
Related documentation
[edit]- [Step By Step Step-by-Step Process]
- [Prerequisites Prerequisites]