Hostityourself/proxy/Caddyfile
Claude a9490da8a8
Fix Caddy startup: remove empty ACME_EMAIL that caused parse error
Caddy's email directive requires a non-empty argument. Since ACME_EMAIL
wasn't set, Caddy failed to parse the config. Email is optional for
Let's Encrypt — remove the directive entirely and document it as a
manual opt-in comment.
2026-03-20 12:49:39 +00:00

32 lines
1,018 B
Caddyfile

# HIY — Caddyfile
#
# Caddy automatically obtains a Let's Encrypt certificate for every domain it
# serves (HTTP-01 challenge). No Cloudflare or DNS API token required.
#
# Requirements:
# - Ports 80 and 443 must be publicly reachable (router port-forward to Pi)
# - DNS A record for {$DOMAIN_SUFFIX} must point to your public IP
# - Set ACME_EMAIL in infra/.env (Let's Encrypt needs a contact address)
#
# Local dev: set DOMAIN_SUFFIX=localhost in infra/.env — Caddy will use a
# self-signed cert automatically for localhost.
{
# Admin API — used by hiy-server to add/remove app routes dynamically.
admin 0.0.0.0:2019
# Uncomment and set your email for Let's Encrypt expiry notices:
# email you@example.com
}
# HIY dashboard — served at your root domain.
{$DOMAIN_SUFFIX} {
reverse_proxy server:3000
}
# Deployed apps are added here dynamically by hiy-server via the Caddy API.
# Each entry looks like:
#
# myapp.{$DOMAIN_SUFFIX} {
# reverse_proxy <container-ip>:<port>
# }