ACMELEAF-MKACCOUNT(1)       General Commands Manual      ACMELEAF-MKACCOUNT(1)

NAME
     acmeleaf-mkaccount - create a new ACME account configuration block

SYNOPSIS
     acmeleaf-mkaccount -d directory-url [-e email] [-k eab-kid] [-n] [-t]

DESCRIPTION
     The acmeleaf-mkaccount utility creates a new ACME account using an ES256
     key and prints an account block suitable for acmeleaf.conf to the
     standard output.

     It generates a fresh P-256 private key, registers a new account with the
     given ACME directory, and writes the corresponding directory, kid, and
     privkey directives.  It also prints a commented privkey_cmd example for
     configurations that keep the account key outside the config file, and
     other hints.  If the ACME directory advertises issuerDomainNames and
     accountHashPrefix, acmeleaf-mkaccount also prints comment lines showing
     the DNS TXT records to provision for "dns-persist-01".  The suggested
     records use the domain-independent form of the hashed accounturi.

     If the directory does not advertise accountHashPrefix, it is assumed to
     implement draft-ietf-acme-dns-persist-01 instead.  The suggested records
     then use the first entry of caaIdentities as the issuer domain name, and
     the account URL itself as the accounturi.

OPTIONS
     -d directory-url  The ACME directory URL to use.

     -e email          Email address to register with the ACME account.

     -k eab-kid        Key ID for external account binding, as issued by the
                       CA.  Required by CAs whose directory sets
                       externalAccountRequired.  The base64url-encoded HMAC
                       key issued with it is read from the standard input
                       until EOF.  If the standard input is a terminal, a
                       prompt is printed to the standard error.  The HMAC key
                       is only used once, to register the account, and is not
                       written to the output.

     -n                Do not print commented configuration hints.

     -t                Agree to the ACME server's Terms of Service.

EXIT STATUS
     The acmeleaf-mkaccount utility exits 0 on success, and >0 if an error
     occurs.

EXAMPLES
     Example output:

           account {
                   directory https://ca.example/directory
                   kid https://ca.example/acct/123
                   privkey MIGHAgEAABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
           }

           # To keep the account key outside the config file, replace
           # privkey with a command such as:
           #
           #       privkey_cmd age --decrypt account-key.age
           #
           # acmeleaf creates each certificate directory when needed.
           # To share issued material with another group, place the
           # certificate directories under a common parent and set the
           # group and setgid bit on it; both are inherited:
           #
           #       chgrp tlskeys /var/lib/lindenii/acmeleaf
           #       chmod g+s /var/lib/lindenii/acmeleaf
           #
           # Run acmeleaf with a umask such as 027 so the group keeps
           # read access. See acmeleaf(1) for details.
           #
           # Then add a certificate block:
           #
           #       certificate /var/lib/lindenii/acmeleaf/example.org {
           #               domains example.org *.example.org
           #       }
           #
           # For each domain, create:
           #
           #       _validation-persist.<domain>. IN TXT
           #       "authority.example; accounturi=https://ca.example/account-hash/sha-256/NpDnSwUthQK8zCgFdefYxAdAVPnygMLbs9US6oO-5ug"
           #
           # If you want wildcard certificates and subdomains, instead use:
           #
           #       _validation-persist.<domain>. IN TXT
           #       "authority.example; accounturi=https://ca.example/account-hash/sha-256/NpDnSwUthQK8zCgFdefYxAdAVPnygMLbs9US6oO-5ug; policy=wildcard"

SEE ALSO
     acmeleaf(1)

STANDARDS
     R. Barnes, J. Hoffman-Andrews, D. McCarney, and J. Kasten, Automatic
     Certificate Management Environment (ACME), RFC 8555,
     https://www.rfc-editor.org/info/rfc8555, March 2019.

     S. Heurich, H. Birge-Lee, and M. Slaughter, Automated Certificate
     Management Environment (ACME) Challenge for Persistent DNS TXT Record
     Validation, Internet-Draft draft-ietf-acme-dns-persist-03,
     https://datatracker.ietf.org/doc/html/draft-ietf-acme-dns-persist-03,
     November 2026.

AUTHORS
     Runxi Yu <runxiyu@umich.edu>

Lindenii Project               November 24, 2026              Lindenii Project
