Automatic SSL Certificate Renewal Notification Plugin for Caddy

Hello

I would like to propose a plugin idea for Caddy that automatically notifies users when their SSL certificates are about to expire. While Caddy already handles certificate renewal seamlessly; it would be beneficial for users to receive an email or a system notification alerting them ahead of time; allowing them to take preventive action if needed.

This plugin could include configuration options to customize notification frequency (e.g., 30 days, 15 days before expiration) & allow for multiple recipient email addresses.

It could be integrated with existing logging & notification systems; making it a useful addition for system administrators managing multiple domains. I have checked https://caddy.community/c/plugins/9- msbi documentation guide but still need help.

Is this something that could be implemented in Caddy as a plugin? :thinking:

Any thoughts on this idea? :innocent:

Thank you ! :slightly_smiling_face:

Howdy @kimon, welcome to the Caddy community.

My first thought is to look into GitHub - mholt/caddy-events-exec: Run commands on Caddy events. You might actually be able to utilise a script to do this, which Caddy would call when events like failed renewals occur, which could email you and tell you how much longer the cert has.

1 Like

What you should probably do instead is ingest Caddy’s logs and watch for errors. If Caddy fails to renew a cert, you’ll get an error. And it’ll keep retrying for a whole 30 days until the cert expires. (Renewals start after 2/3 the lifetime, i.e. after 60 days of the 90-day lifetime).

1 Like