go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
7.46k stars 986 forks source link

Enable option to use single command to create or renew cert #2099

Closed bluepuma77 closed 5 months ago

bluepuma77 commented 5 months ago

Welcome

How do you use lego?

Binary

Detailed Description

Just setting up ansible to create LetsEncrypt TLS certs for a list of domains and their wildcards. I was going back and forth to find the single command to "create if not exist or renew if almost expired". Google Bard and ChatGPT both recommended to use lego ... run --renew. Sadly it was just an AI hallucination and it seems that option does not exist with lego.

certbot seems to be offering an option with certbot certonly ... --keep-until-expiring (post), but certbot not as advanced as lego with the integration of DNS providers.

It would be awesome to have such a run --keep-until-expiring option for go-acme lego, too 🙂

bluepuma77 commented 5 months ago

Sorry, searched again, similar to https://github.com/go-acme/lego/issues/216 and https://github.com/go-acme/lego/issues/290, seems to be on the to-do list for a long time.