HOWTO Guide

Issue Merkle Tree Certificates with certbot or lego

Get a Merkle Tree Certificate (MTC) for your domain from DigiCert’s MTC ACME server, acme.mtc.digicert.dev, with a standard ACME client. We recommend certbot; lego works too. You don’t need an account, an API key or a patched client.

  • ACMERFC 8555, HTTP-01
  • ~2–5 minto issuance
  • ~7 dayscertificate lifetime

1How MTC issuance works

A Merkle Tree Certificate does not carry a traditional CA signature. The CA appends each certificate to a public, append-only issuance log. The certificate then includes a short proof that ties it to a signed checkpoint of that log. Because of this, the TLS handshake can be much smaller than a classic certificate chain, and every certificate is publicly logged.

You use the same ACME protocol you already use with other CAs. The difference is what happens after you send your CSR:

t = 0
OrderYour ACME client creates an account and an order for your names.
~seconds
HTTP-01The server fetches a token from http://<name>/.well-known/acme-challenge/.
finalize
CSR → logThe client sends a CSR. The server adds it to the MTC log.
~2–5 min
Standalone MTCThe next log checkpoint is signed. The certificate is issued and saved.
~1 hour
Landmark MTCOptional: a smaller certificate becomes available once a landmark covers your entry.

The standalone certificate verifies against a cosigned checkpoint. The landmark-relative certificate is smaller and verifies against landmarks that relying parties already hold. Servers usually deploy both and let the client choose.

2Before you start

  • A public DNS name that you control. Its A/AAAA records must resolve to a public IP address of the machine that runs the ACME client (or of the web server that serves the challenge). The server refuses to validate private, loopback or link-local addresses.
  • Inbound TCP port 80 open from the internet to that host. Validation always starts at http://<name>:80. It follows redirects only to ports 80 or 443.
  • No wildcard names. Only HTTP-01 is supported, so every name must be a specific host name. You can put 1–10 names on one certificate. Internationalized names must use their ASCII (xn--) form.
  • An ACME client: certbot 2.6 or later (recommended; we test 2.6.0 and 5.10.0) or lego v4 (we test v4.28 and v4.35).
  • OpenSSL 3.x (optional) to inspect the certificate. OpenSSL 3.5 or later to create Ed25519 or ML-DSA requests.
No account setup or EAB

The directory reports "externalAccountRequired": false. Your client registers an ACME account automatically the first time you run it. You don’t need a key ID or HMAC.

Experimental service: not for production traffic

MTCs are an IETF draft, and browsers do not trust them by default. This service is a DigiCert Labs prototype. It has no SLA, and certificates and logs can be reset. If you deploy an MTC, keep a classic certificate configured as the fallback.

3Install the client

Use your distribution’s package if it is version 2.6 or later. Otherwise install the current release with pip or snap.

Debian / Ubuntu
sudo apt install certbot
certbot --version
Fedora / RHEL / Amazon Linux
sudo dnf install certbot
certbot --version
Any Linux · current release in a virtualenv
sudo python3 -m venv /opt/certbot
sudo /opt/certbot/bin/pip install --upgrade certbot
sudo ln -sf /opt/certbot/bin/certbot /usr/local/bin/certbot

Download a prebuilt binary from the lego releases page, or build it with Go:

Linux amd64 · release binary
VER=v4.35.2
curl -fsSLO https://github.com/go-acme/lego/releases/download/${VER}/lego_${VER}_linux_amd64.tar.gz
tar -xzf lego_${VER}_linux_amd64.tar.gz lego
sudo install -m 0755 lego /usr/local/bin/lego
lego --version
Any platform · recent Go toolchain
go install github.com/go-acme/lego/v4/cmd/lego@v4.35.2

On macOS you can also run brew install lego.

4Issue a certificate

Choose the option that matches how port 80 is served on your host. These flags matter in every option:

FlagWhy
--server https://acme.mtc.digicert.dev/directorySends requests to the DigiCert MTC ACME server instead of certbot’s default (Let’s Encrypt).
--key-type ecdsa --elliptic-curve secp384r1A new P-384 key, which we recommend. See Key types for the others.
--issuance-timeout 600Recommended. The certificate is issued only after the next log checkpoint, which usually takes a few minutes. certbot waits 90 seconds by default.

Option A: Standalone (nothing listens on port 80)

certbot starts its own HTTP server on port 80 for the challenge.

Shell
sudo certbot certonly --standalone \
  --server https://acme.mtc.digicert.dev/directory \
  -m you@example.com --agree-tos \
  -d www.example.com \
  --key-type ecdsa --elliptic-curve secp384r1 \
  --issuance-timeout 600

To add more names to the same certificate, repeat -d (up to 10). Every name must pass HTTP-01.

Option B: Webroot (a web server already uses port 80)

certbot writes the challenge file into a directory that your existing web server serves at /.well-known/acme-challenge/. Your site keeps running during issuance.

Shell
sudo certbot certonly --webroot -w /var/www/acme \
  --server https://acme.mtc.digicert.dev/directory \
  -m you@example.com --agree-tos \
  -d www.example.com \
  --key-type ecdsa --elliptic-curve secp384r1 \
  --issuance-timeout 600

Option C: Bring your own key and CSR

Use this option for Ed25519 or ML-DSA keys, which certbot can’t generate, or to keep a key that another tool manages. The CSR’s subjectAltName must list exactly the DNS names you are ordering. certbot does not manage a CSR-based certificate, so certbot renew skips it. Rerun this command to renew (see Renew).

Shell
# one-time: create a key (P-384 shown; see Key types for Ed25519 and ML-DSA)
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-384 -out mtc.key

# create a CSR for the exact names you will order
openssl req -new -key mtc.key -subj "/CN=www.example.com" \
  -addext "subjectAltName=DNS:www.example.com" -out mtc.csr

sudo certbot certonly --webroot -w /var/www/acme \
  --server https://acme.mtc.digicert.dev/directory \
  -m you@example.com --agree-tos \
  --csr mtc.csr --issuance-timeout 600 \
  --cert-path ./mtc.cert.pem --chain-path ./mtc.ca.pem --fullchain-path ./mtc.fullchain.pem

What you get

certbot saves these files in /etc/letsencrypt/live/www.example.com/:

FileContents
cert.pemThe standalone MTC. Configure your MTC-capable TLS server with this file.
privkey.pemThe private key.
chain.pemThe DigiCert MTC CA certificate, for reference. An MTC has no issuer chain, so this is not a TLS chain.
fullchain.pemcert.pem followed by chain.pem. Don’t serve this file.
Serve cert.pem, not fullchain.pem

The server returns the MTC followed by the MTC CA certificate so that certbot can save a chain. The CA certificate is unsigned and must not appear in your TLS handshake.

Choose the option that matches how port 80 is served on your host. These flags matter in every option:

FlagWhy
--server https://acme.mtc.digicert.dev/directorySends requests to the DigiCert MTC ACME server instead of the lego default (Let’s Encrypt).
--key-type ec384A new P-384 key, which we recommend. See Key types for the others.
--cert.timeout 600Required. The certificate is issued only after the next log checkpoint, which usually takes a few minutes. lego waits 30 seconds by default and stops before the certificate is ready.
run --no-bundleRequired. The server returns the MTC followed by the MTC CA certificate. --no-bundle keeps only the MTC in the .crt file, which is what you serve.

Option A: Standalone (nothing listens on port 80)

lego starts its own HTTP server on port 80 for the challenge. Binding to port 80 requires root, or CAP_NET_BIND_SERVICE on the lego binary.

Shell
sudo lego \
  --server https://acme.mtc.digicert.dev/directory \
  --email you@example.com --accept-tos \
  --domains www.example.com \
  --key-type ec384 \
  --http \
  --cert.timeout 600 \
  --path ./.lego \
  run --no-bundle

To add more names to the same certificate, repeat --domains (up to 10). Every name must pass HTTP-01.

Option B: Webroot (a web server already uses port 80)

lego writes the challenge file into a directory that your existing web server serves at /.well-known/acme-challenge/. Your site keeps running during issuance.

Shell
lego \
  --server https://acme.mtc.digicert.dev/directory \
  --email you@example.com --accept-tos \
  --domains www.example.com \
  --key-type ec384 \
  --http --http.webroot /var/www/acme \
  --cert.timeout 600 \
  run --no-bundle

Option C: Bring your own key and CSR

Use this option for P-521, Ed25519 or ML-DSA keys, which lego can’t generate, or to keep the same key across renewals. The CSR’s subjectAltName must list exactly the DNS names you are ordering.

Shell
# one-time: create a key (P-384 shown; see Key types for the others)
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-384 -out mtc.key

# create a CSR for the exact names you will order
openssl req -new -key mtc.key -subj "/CN=www.example.com" \
  -addext "subjectAltName=DNS:www.example.com" -out mtc.csr

lego --server https://acme.mtc.digicert.dev/directory \
  --email you@example.com --accept-tos \
  --http --cert.timeout 600 \
  --csr mtc.csr run --no-bundle

What you get

When lego finishes, it writes these files to ./.lego/certificates/:

FileContents
www.example.com.crtThe standalone MTC (PEM), exactly as the server returned it.
www.example.com.keyThe new private key. lego does not write this file in Option C, because you already have the key.
www.example.com.jsonOrder metadata. certUrl is used in step 6.
www.example.com.issuer.crtThe DigiCert MTC CA certificate, for reference only. Don’t serve it.
Serving the MTC

Stock OpenSSL-based servers can’t present an MTC yet. You need an MTC-capable TLS stack, such as DigiCert TrustCore NanoSSL, configured with the MTC and a classic certificate on the same key. Clients that don’t ask for an MTC then get the classic certificate.

5Key types

The server accepts every key type that the MTC CA can verify. We recommend ECDSA P-384.

KeycertbotlegoNotes
ECDSA P-384 Recommended--key-type ecdsa --elliptic-curve secp384r1--key-type ec384Verified end to end with both clients.
ECDSA P-256--elliptic-curve secp256r1--key-type ec256Accepted. Prefer P-384: Chrome stops trusting chains with P-256 CA keys from March 15, 2027.
ECDSA P-521--elliptic-curve secp521r1Option C (--csr)
RSA 2048–8192--key-type rsa --rsa-key-size 3072--key-type rsa3072PKCS#1 v1.5 or PSS signatures with SHA-256/384/512.
Ed25519Option C (--csr)Option C (--csr)Few TLS clients accept Ed25519 server certificates yet.
ML-DSA-44 / 65 / 87Option C (--csr)Option C (--csr)Post-quantum (FIPS 204). Needs OpenSSL 3.5+. TLS client support is still experimental.

Key commands for Option C:

OpenSSL 3.5+
# ECDSA P-384 / P-521
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-384 -out mtc.key
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-521 -out mtc.key
# Ed25519
openssl genpkey -algorithm ED25519 -out mtc.key
# ML-DSA (post-quantum)
openssl genpkey -algorithm ML-DSA-44 -out mtc.key

The CSR key must be different from your ACME account key. SHA-1 signatures are rejected.

5Inspect the result

OpenSSL can parse an MTC, but it can’t verify one. The issuer is a log identifier, not a distinguished name, and the signature algorithm is the MTC proof OID 1.3.6.1.5.5.7.6.67.

Shell
sudo openssl x509 -in /etc/letsencrypt/live/www.example.com/cert.pem -noout -text | head -25
Shell
openssl x509 -in .lego/certificates/www.example.com.crt -noout -text | head -25
Example output (abridged)
Serial Number: 844424930132006 (0x3000000000026)   # encodes the log index
Signature Algorithm: 1.3.6.1.5.5.7.6.67                 # id-alg-mtcProof
Issuer: 1.3.6.1.5.5.7.25.3 = #0D08839A648C9B2D0201       # MTC CA ID
Validity
    Not Before: Dec  4 22:10:53 2026 GMT
    Not After : Dec 11 22:10:53 2026 GMT                # about 7 days
Subject Public Key Info: id-ecPublicKey, P-384
X509v3 Subject Alternative Name: critical
    DNS:www.example.com

To confirm that the certificate matches your private key, compare the public key hashes. The two lines must be identical:

Shell
cd /etc/letsencrypt/live/www.example.com
sudo openssl x509 -in cert.pem -pubkey -noout | openssl pkey -pubin -outform DER | sha256sum
sudo openssl pkey -in privkey.pem -pubout -outform DER | sha256sum
Shell
cd .lego/certificates
openssl x509 -in www.example.com.crt -pubkey -noout | openssl pkey -pubin -outform DER | sha256sum
openssl pkey -in www.example.com.key -pubout -outform DER | sha256sum
Subject may be empty

Depending on the active issuance profile, the CA may issue the certificate with an empty subject and all names in a critical subjectAltName. This is expected. TLS clients match host names against the SAN.

6Get the landmark certificate (optional)

The server’s response with the standalone certificate also includes an optional alternate:

HTTP response header
Link: <https://acme.mtc.digicert.dev/order/{id}/certificate/landmark>;rel="acme-optional-alternate"

Neither client downloads it automatically. To get the smaller landmark-relative certificate, you send a signed POST-as-GET to <certUrl>/landmark with your ACME account key. It usually becomes available within an hour.

Not available with certbot yet

certbot does not keep the order’s certificate URL, which this request needs. If you need the landmark certificate, issue with lego (switch the tab above). The standalone certificate from certbot works on its own.

ResponseMeaning
200The body is the landmark-relative certificate (PEM).
202 + Retry-AfterNo landmark covers your entry yet. Try again later. Landmarks are published about once an hour.
500The log is temporarily unavailable. Try again.

Save this script as fetch-landmark.py. It reads the files that lego created and accepts P-256 and P-384 account keys:

Python 3 · pip install cryptography requests
#!/usr/bin/env python3
"""Fetch the landmark-relative MTC for a lego-issued certificate.
usage: fetch-landmark.py LEGO_PATH EMAIL DOMAIN OUT.pem   (exit 0=saved, 2=not yet, 1=error)"""
import base64, json, sys, requests
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import ec, utils

ACME = "https://acme.mtc.digicert.dev"
lego, email, domain, out = sys.argv[1:5]
acct = f"{lego}/accounts/acme.mtc.digicert.dev/{email}"
kid = json.load(open(f"{acct}/account.json"))["registration"]["uri"]
key = serialization.load_pem_private_key(open(f"{acct}/keys/{email}.key", "rb").read(), None)
url = json.load(open(f"{lego}/certificates/{domain}.json"))["certUrl"] + "/landmark"

alg, h, n = {256: ("ES256", hashes.SHA256(), 32), 384: ("ES384", hashes.SHA384(), 48)}[key.curve.key_size]
b64 = lambda b: base64.urlsafe_b64encode(b).rstrip(b"=").decode()
nonce = requests.head(ACME + "/new-nonce", timeout=30).headers["Replay-Nonce"]
protected = b64(json.dumps({"alg": alg, "kid": kid, "nonce": nonce, "url": url}).encode())
r, s = utils.decode_dss_signature(key.sign((protected + ".").encode(), ec.ECDSA(h)))
jws = {"protected": protected, "payload": "", "signature": b64(r.to_bytes(n, "big") + s.to_bytes(n, "big"))}

resp = requests.post(url, json=jws, headers={"Content-Type": "application/jose+json"}, timeout=60)
if resp.status_code == 200:
    open(out, "w").write(resp.text); print("saved", out); sys.exit(0)
print(resp.status_code, "Retry-After:", resp.headers.get("Retry-After", "-"), resp.text[:200], file=sys.stderr)
sys.exit(2 if resp.status_code == 202 else 1)
Shell
python3 fetch-landmark.py ./.lego you@example.com www.example.com www.example.com.landmark.crt

# or poll every 10 minutes until it is ready
until python3 fetch-landmark.py ./.lego you@example.com www.example.com www.example.com.landmark.crt; do
  [ $? -eq 2 ] || break; sleep 600
done
Use the same account and the same lego path

Only the ACME account that placed the order can download its landmark certificate. If you used Option C (--csr), the landmark certificate uses the same key as your CSR. Otherwise it uses the .key file that lego generated.

7Renew

MTCs are valid for about 7 days, so automate renewal from the start. Renew when less than about 2 days remain.

certbot’s packages install a timer that runs certbot renew twice a day. Its default threshold is 30 days, which is longer than an MTC’s whole lifetime, so it would renew on every run. Set the threshold to 2 days once, in the certificate’s renewal file:

Shell
sudo sed -i 's/^#\? *renew_before_expiry.*/renew_before_expiry = 2 days/' \
  /etc/letsencrypt/renewal/www.example.com.conf
grep renew_before_expiry /etc/letsencrypt/renewal/www.example.com.conf

Reload your TLS server after each renewal with a deploy hook. Set it once and certbot remembers it:

Shell
sudo certbot reconfigure --cert-name www.example.com \
  --deploy-hook "systemctl reload nginx"

We tested certbot renew against this server. If a renewal times out, run sudo certbot renew --issuance-timeout 600. Certificates issued with --csr (Option C) are not managed by certbot. Renew them with a cron job that reruns the Option C command.

Request a new order with lego run. lego renew does not work with MTCs: it re-parses the saved certificate with Go’s X.509 parser, which rejects the MTC issuer.

/etc/cron.d/mtc-renew · check twice a day
17 */12 * * *  root  cd /srv/mtc && \
  openssl x509 -checkend 172800 -noout -in .lego/certificates/www.example.com.crt || \
  lego --server https://acme.mtc.digicert.dev/directory --email you@example.com --accept-tos \
       --http --http.webroot /var/www/acme --cert.timeout 600 \
       --csr /srv/mtc/mtc.csr run --no-bundle && systemctl reload nginx

This example reuses the key and CSR from Option C, so the files your web server points to keep the same key. After each renewal, download the new landmark certificate as described in step 6. The old landmark certificate belongs to the previous order.

See this page served as an MTC

This site runs the setup this guide describes. One P-384 key sits behind three certificates: a classic DigiCert certificate, a standalone MTC and a landmark MTC, all renewed automatically. The server picks one during the TLS handshake. Most browsers get the classic certificate. Chrome Canary with MTC support turned on gets an MTC.

  1. Install Chrome Canary (desktop).
  2. Turn on MTC support. Open chrome://flags, enable #verify-mtcs, #tls-trust-anchor-ids and #test-root-store, then click Relaunch.
  3. Load the MTC trust data. Open chrome://components, find PKI Metadata and click Check for update. Chrome gets the DigiCert test MTC CA and its landmarks this way.
  4. Open a new window and go to https://sandbox.mtc.digicert.dev. A tab that is already open may reuse an older connection and keep its certificate.
  5. Check the certificate. Click the site information icon next to the address, then Connection is secure → Certificate is valid.
You seeCertificate viewer
An MTCA single certificate with no chain above it. The signature algorithm is 1.3.6.1.5.5.7.6.67 (MTC proof), the issuer is the MTC CA’s trust anchor ID (52580.200109.2.1), and it is valid for about 7 days.
The classic certificateIssued by DigiCert G5 TLS ECC SHA384 2021 CA1, with a normal chain to DigiCert TLS ECC P384 Root G5.

8Support matrix

FeatureStatusNotes
certbot certonly and renewSupportedTested with certbot 2.6.0 and 5.10.0. Serve cert.pem.
lego runSupportedTested with lego v4.28 and v4.35. Always use --no-bundle.
lego renew, --pfxNoBoth re-read the saved certificate with Go’s X.509 parser, which rejects the MTC issuer. Use lego run.
Other ACME clientsUntestedacme.sh and others may work, but we haven’t tested them.
HTTP-01 challengeSupportedPort 80 only. Redirects are followed to ports 80 and 443 on public addresses.
DNS-01 / TLS-ALPN-01 / wildcardsNoUse HTTP-01 for each specific host name.
Names per certificate1–10ASCII DNS names only, no IP addresses.
Certificate keySee Key typesECDSA P-256/384/521, Ed25519, RSA 2048–8192, ML-DSA-44/65/87.
Account keyEC / RSA / Ed25519Both clients’ default account keys work.
External Account BindingNot usedNot required.
Revocation, account key rollover, ARINoShort lifetimes are the mitigation.

9Troubleshooting

The client gives up while the order is still processing

Issuance waits for the next signed log checkpoint, which can take several minutes. Use --issuance-timeout 600 with certbot or --cert.timeout 600 with lego. The order stays valid on the server, but the client has stopped waiting for it. Run the same command again. A new order is created.

My server sends two certificates, or clients reject the chain

The server returns the MTC followed by the DigiCert MTC CA certificate. Serve only the MTC: certbot’s cert.pem (not fullchain.pem), or lego’s .crt issued with run --no-bundle.

HTTP-01 fails with “connection refused”, a timeout, a 403 or a 404
  • Check that dig +short www.example.com returns a public IP address of this host.
  • Check that port 80 is reachable from the internet: firewall, cloud security group, NAT.
  • With a webroot, request http://www.example.com/.well-known/acme-challenge/test after you create a test file in that directory. A 403 usually means the challenge file isn’t readable by the web server, for example because of a restrictive umask.
  • Redirects to ports other than 80 or 443, or to private addresses, are rejected.
Finalize fails with badCSR

Check the key type against Key types, and make sure the key differs from the ACME account key. The SAN list must exactly match the names in the order, with no extra or missing names. Don’t add custom extensions. SHA-1 signatures are rejected. Check the CSR with openssl req -in mtc.csr -noout -text.

The order fails after finalize (serverInternal)

If the log returns an ambiguous result, the order is marked invalid and is not submitted again automatically. This prevents duplicate log entries. Start a new order.

My browser shows the classic certificate, not the MTC

Browsers that support MTCs, such as current Chrome builds behind experimental flags, request an MTC only when the server supports the MTC and trust-anchor negotiation extensions and the client has the matching log metadata. Stock TLS libraries and browsers can’t verify an MTC yet. Keep a classic certificate as the default.

Need help or want to share results?

Contact your DigiCert Labs representative. Include your domain, the time of the request and the full client output. Don’t send private keys.