A Caddy v2 app that hooks into certificate lifecycle events and reports SSL status to a portal service.
- Subscribes to Caddy TLS events (
cert_obtained,cert_renewed,cert_expired) - Reports status to portal via SDK (
readyorfailed) - Async delivery with concurrency limiting (100 concurrent)
- Debug logging via Caddy's
{ debug }global option
xcaddy build --with github.com/LumeWeb/caddy-plugin-cert-webhookEnv vars only — no Caddyfile directives, no JSON fields:
| Variable | Required | Description |
|---|---|---|
PORTAL_URL |
Yes | Base URL of the portal service |
GATEWAY_SECRET |
Yes | Shared secret for authentication |
Enable the app in your Caddy JSON config:
{
"apps": {
"cert_webhook": {}
}
}{
debug
}Enables debug output for event data, webhook delivery, and config resolution.
| Caddy Event | Portal Status |
|---|---|
cert_obtained |
ready (or failed if error) |
cert_renewed |
ready (or failed if error) |
cert_expired |
failed |
- Webhook delivery failures are logged but do not block certificate operations
go test ./...
go vet ./...
go fmt ./...