Services:Best Practices: Difference between revisions
Appearance
Content added - troubleshooting guide: Best Practices for Adding Services (11 sections) |
Updated documentation from markdown files |
||
| Line 1: | Line 1: | ||
Best practices when adding hostnames to the Caddy reverse proxy. | |||
== General | == General == | ||
* Validate the Caddyfile before reload: <code>caddy validate --config /etc/caddy/Caddyfile</code> | |||
* Use clear subdomain names and document them in [[Services:Current Services]] | |||
* Back up <code>/etc/caddy/Caddyfile</code> before changes | |||
* | * Check <code>journalctl -u caddy</code> after adding a site | ||
* | * Use HTTPS for all public services (Caddy handles certificates automatically) | ||
* | * Test VPS backends with <code>curl</code> on <code>127.0.0.1</code> before testing the public URL | ||
== Checklist == | |||
* [ ] | * [ ] DNS A record points to <code>87.106.61.62</code> | ||
* [ ] | * [ ] Backend running and reachable from VPS (<code>127.0.0.1</code> or <code>10.8.0.2</code> via VPN) | ||
* [ ] | * [ ] Site block added to <code>/etc/caddy/Caddyfile</code> | ||
* [ ] | * [ ] <code>caddy validate</code> succeeds | ||
* [ ] | * [ ] <code>systemctl reload caddy</code> completed | ||
* [ ] | * [ ] <code>curl -I https://newservice.jb-vpn.uk</code> succeeds | ||
* [ ] Browser | * [ ] Browser test with valid certificate | ||
* [ ] | * [ ] Entry added to [[Services:Current Services]] | ||
== Security | == Security == | ||
* | * 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 == | |||
* [Step By Step Step-by-Step Process] | |||
* [ | * [Prerequisites Prerequisites] | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Documentation/Services]] | [[Category:Documentation/Services]] | ||
[[Category:Documentation/Services/Adding Services]] | [[Category:Documentation/Services/Adding Services]] | ||
Latest revision as of 14:04, 16 May 2026
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]