Support multiple contact emails for ACME accounts
Author: miichoowCreated Jul 1, 2026Updated Jul 6, 2026
Labelsenhancementno-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
RFC 8555 defines the account contact field as an array of URLs (section 7.1.2), so multiple mailto: contacts are valid per spec. Right now lego only lets you register one email per account.
What I'd propose:
- Make
--email/-mrepeatable, accepting either multiple--emailflags or a comma-separated list.LEGO_EMAILand existing single-email usage keep working exactly as they do now. - Add an optional interface on the library side, something like
UserWithEmailswithGetEmails() []string, so nothing breaks for existing implementers ofregistration.User. - Let the account config file's
accounts:section take anemails:list alongside the existingemail:field. - Leave the on-disk account folder naming as-is: it still keys off
--account-id(or the primary email, same as today). Extra emails just become contact metadata insideaccount.json, not part of the path.
I already have a working implementation of this on a branch. It builds, tests pass, and lint is clean. If this approach sounds reasonable to the maintainers, I'll open the PR.
Effective 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