mirror of
https://github.com/therootcompany/greenlock.js.git
synced 2025-11-05 22:22:47 +00:00
Default renewal settings lead to "too many certificates already issued" #22
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm running into an issue with the 90 min renewal which results in recurring errors:
When I used
npx greenlock add --subject my.domain.com --altnames my.domain.com, the following was auto-populated in mygreenlock.d/config.json:After some debudding, I noticed this check for
renewAtin@root/greenlock/certificates.js:312:The problem is that
renewAtis always1. Even if I remove"renewAt": 1line fromconfig.json, greenlock still defaults to1and the manager overwrites the file to update it back to1. As a result, this line@root/greenlock/certificates.js:61:seems to always evaluate to
falsebecause of this comparison inC._isStalein@root/greenlock/certificates.js:263:So
C._isStalealways returnstrue, even if the cert is brand new! (On a side note, doesn't this render_renewOffsetchecks useless since the code is never reached?)Is there any way to bypass this
renewAtfuss? I'd much rather letC._renewableAtcontinue the flow and do the proper check againstpems.expiresAt + renewOffset.Thanks!
Do you happen to have
greenlock.d/config.jsonon a read-only volume?Or did you perhaps start the process as the
rootuser and then change to a different user (i.e.www-dataorhttpd)?I would suggest that you run:
or perhaps:
The
config.jsonfile is not intended to be edited by hand and its permissions are kept secure, so if you accidentally run annpxcommand asroot, it will lock the permissions toroot.Thanks for your quick reply. I'm running the app in Docker with
greenlock-store-fs, and only the certs directory is mapped as a volume to the host. I supposegreenlock.ddirectory should also be a volume as well? Does Greenlock updaterenewAtinconfig.jsonafter it orders a new cert?You're welcome. You just happened to catch me at a good time... twice.
Yep. Yep. Needs to be a writeable, persistent volume.
For most people I recommend using something simple and easy like Digital Ocean, Scaleway, or Vultr rather than complex tools like Docker that really require expert-level knowledge to use correctly - especially for small projects that don't need enterprise-level configuration, etc.
Got it, adding
greenlock.das a volume then; will test again after they "unban" the domain. I guess this was an oversight on my part; that said, would be great to mention this in the readme (i.e. must have a volume for both the certs and the config if using Docker). Thanks so much for your help!I'm re-opening this just as a test to see if notifications come through with the new SMTP settings (which was why I was on just now).
closing again, hoping to see an email come through to myself with notification