-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Lets Encrypt contact emails
Let's Encrypt sends certificate expiry notice emails if a contact email is provided during account creation. Unfortunately Trellis never did this up until now; if there was a problem with the cron renewal script, there was no easy way to get notified. This adds a new required `letsencrypt_contact_emails` variable which is passed to the acme-tiny script which it passes along to Let's Encrypt. Let's Encrypt sends emails 20 days, 10 days, and finally 1 day before expiry. Since Trellis tries to renew certificates 30 days before renewal (by default), these expiry notice emails should never be sent unless something has gone wrong.
- Loading branch information
1 parent
4392be7
commit 7224811
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7224811
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this new feature and the great error handling!
I'm not really sure, but doesn't this qualify as a "breaking" change (I checked the release-notes)? When I provisioned my servers (without the letsencrypt_contact_emails setting) I got a NGINX error, as the provisioning fails and does not finish. The tricky one is, that it only happens on staging/production (for me, as I don't use letsencrypt on my local machine).
7224811
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@schuhwerk 🤔 I didn't mark it as breaking because I added validation to let people know they need to define the variable and prevent the renewal script from actually failing. However, I can see one problem I never thought about until now: it seems like on failure it should reload Nginx. Maybe that was your issue?
If that's the problem, then I apologize as I should have caught it (or at least marked it as a breaking change). Can you try and confirm that's what happened? If you run
service nginx reload
(orservice nginx start
) then I assume things would be fixed?7224811
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swalkinshaw Thank you for your quick reply! Sorry, this was something I did wrong. Tried it again today and the problem didn't occur. Nginx wasn't stopped and the process halted properly without causing downtime. Sorry for the false alarm!