Plain "lego" with config file: option to force renew one or more certs
Author: candlerbCreated Jun 16, 2026Updated Jun 16, 2026
Labelsarea/cliproposalno-decision
Welcome
- Yes, I'm using a binary release or the library within the two latest releases.
- Yes, I've searched for similar issues on GitHub and didn't find any.
Detailed Description
Using plain lego command (not lego run) with a config file is convenient. However, if you then want to force renewal of one or more of the certs within that file, I cannot see any simple way to do so.
There is currently no lego --renew-force. If you use lego run --renew-force then you are required to duplicate all of the settings from the config file on the command line too (e.g. domains, challenge, challenge options... etc)
Ideas:
- New flag
lego --renew-force --allcould force renewal of all domains in the config file (simple but minimal flexibility) - New flag
lego --renew-force --cert.name foo --cert.name barcould force renewal of domains under the given keys in the YAML. e.g. it would only renew two of the certs in this config:
certificates:
foo:
domains:
- example.com
bar:
domains:
- example.org
baz:
domains:
- example.net
- other.example.netEffective version of lego
v5.2.2
How do you use lego?
Binary
In which context are you using lego?
Personal and professional use
Supporting the Maintainers
- Yes, I find this project useful, and I appreciate the work done by the maintainers.
- Yes, I have starred this repository to help others find it.
- Yes, I have sponsored this project to keep the project stable and maintained.
Confirmation
- Yes, I've included all the information above (version, usage, etc.).
Source: go-acme/lego