Back to blog
TLS 1.3CloudflareCaddyNginx

How to Enable Post-Quantum TLS (X25519MLKEM768): Cloudflare, Caddy & Nginx Guide

Tested your domain and saw Post-Quantum TLS is not enabled? First check where TLS terminates, then follow the exact steps for Cloudflare, Caddy 2.10+, and Nginx with OpenSSL 3.5+.

2026-12-045 min
Three alternative TLS endpoints negotiate X25519MLKEM768, with the Go requirement shown for Caddy and the OpenSSL requirement for Nginx

If you just ran your domain through the Post-Quantum TLS Checker and got a red "Not enabled" result, don't rush to replace your SSL certificate—and don't blindly edit nginx.conf yet.

What you are enabling today is TLS 1.3 post-quantum hybrid key exchange (specifically X25519MLKEM768, the de facto standard). It protects traffic against "harvest now, decrypt later" attacks and works with your existing ECDSA or RSA certificate. You do not need a new certificate.

Whether you can turn it on—and where to configure it—depends on one thing: what terminates HTTPS for your visitors?

  • If your domain sits behind a CDN or managed load balancer, TLS terminates at the provider's edge. Editing your origin Nginx config will not change what public visitors see.
  • If your domain points directly to your own server, you configure it on Caddy or Nginx.

Quick lookup—jump straight to your setup:

Your HTTPS entry pointSupport statusWhat to do
Cloudflare (Proxied)Enabled by defaultVerify TLS 1.3 is on
CaddyNative since 2.10.0Upgrade to Caddy 2.10.0+ (Go 1.24+)
NginxRequires OpenSSL 3.5+Use official nginx:latest / nginx:alpine Docker image, Debian 13, or put Caddy in front
Managed CDN / Cloud LBVaries by providerCheck whether the provider supports X25519MLKEM768 at the edge

1. Spend 10 seconds confirming where HTTPS terminates

A common mistake is upgrading the origin server while a CDN in front still handles the public TLS handshake. Check the response headers first:

bash
curl -sI https://your-domain.com | grep -iE 'server|via|cf-ray'
  • Seeing Server: cloudflare and CF-Ray means Cloudflare's edge handles the public handshake.
  • Seeing another CDN header means you need to check that provider's edge TLS support first.
  • Seeing your own nginx or Caddy header (with DNS pointing straight to your server IP) means you control it directly—jump to Caddy or Nginx below.

2. Behind Cloudflare (easiest path)

If your site is proxied through Cloudflare (like lapsezero.com), there is almost nothing to configure:

  1. Check proxy status: In DNS settings, make sure the record is Proxied (orange cloud). DNS-only (grey cloud) bypasses Cloudflare completely.
  2. Confirm TLS 1.3 is enabled: Go to SSL/TLS → Edge Certificates and verify TLS 1.3 is on. Cloudflare has no separate post-quantum toggle—when proxied with TLS 1.3 enabled, the edge automatically negotiates X25519MLKEM768 with supporting clients.
  3. Optional—encrypt the origin leg too: In SSL/TLS → Overview, make sure encryption mode is Full or Full (Strict), and check that Origin connection & post-quantum encryption → Automatic key exchange is enabled (on by default). This requires your origin server to support TLS 1.3 and hybrid groups as well, and does not apply to Cloudflare Tunnel.

Caddy added default X25519MLKEM768 support in v2.10.0 (built with Go 1.24+). No extra cipher tuning is needed.

  1. Check your binary and Go version:
bash
caddy version
caddy build-info | grep go
  1. If Caddy is older than 2.10.0 or built with Go < 1.24, upgrade to the latest release (if you use custom DNS plugins, rebuild or download with those plugins included).
  2. Check your Caddyfile to make sure you haven't manually pinned curves. If you have, remove that override or add x25519mlkem768 to the list.
  3. Validate and reload:
bash
caddy validate --config /etc/caddy/Caddyfile && sudo systemctl reload caddy

4. Self-hosted Nginx (watch out for OpenSSL 3.0)

Most failed attempts happen because someone pastes ssl_ecdh_curve X25519MLKEM768; into nginx.conf and nginx -t immediately fails. The config isn't the problem—your OS ships OpenSSL 3.0.

Check which OpenSSL version your Nginx binary is linked against:

bash
nginx -V 2>&1 | grep -i openssl

You need OpenSSL 3.5.0+. Here is where common Linux distros stand:

  • Ubuntu 22.04: OpenSSL 3.0.2 (not supported)
  • Ubuntu 24.04: OpenSSL 3.0.13 (not supported)
  • Debian 12: OpenSSL 3.0.22 (not supported)
  • Debian 13: OpenSSL 3.5.9 (supported)

If you are on Ubuntu 22.04/24.04 or Debian 12, avoid hand-compiling OpenSSL + Nginx from source unless you want to maintain security patches yourself. Three cleaner options:

  • Option A (easiest): Switch to the official Nginx Docker image. Both nginx:latest (Debian 13 based) and nginx:alpine now ship with OpenSSL 3.5.9 out of the box.
  • Option B: Upgrade the host to Debian 13, which includes OpenSSL 3.5.9 natively.
  • Option C: Keep Nginx as-is and place Caddy 2.10+ in front to terminate TLS on port 443 and reverse-proxy to local Nginx.

Once nginx -V shows OpenSSL 3.5+, verify your server block:

nginx
ssl_protocols TLSv1.2 TLSv1.3;

# If ssl_ecdh_curve is not set, OpenSSL 3.5+ includes X25519MLKEM768 by default with auto.
# If you previously pinned curves, put X25519MLKEM768 first:
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;

Test and reload:

bash
sudo nginx -t && sudo nginx -s reload

5. Verify your change

Run your domain again in the Post-Quantum TLS Checker:

  • You should see the green Protected status at the top, with X25519MLKEM768 marked as supported in the technical details.
  • Don't worry if SecP256r1MLKEM768 and SecP384r1MLKEM1024 still show unsupported—almost every major site on the web (including Cloudflare, Google, and Apple) only enables X25519MLKEM768 today.
  • Keep TLSv1.2 and classic X25519 enabled as fallbacks for older clients, and double-check that automatic certificate renewal still works if you switched containers or added a reverse proxy.

Want to understand why hybrid key exchange matters now while PQC certificates can wait? Read our explainer: Post-Quantum TLS: Do You Need to Replace Your Certificates?.

Managing multiple HTTPS endpoints? You can monitor certificate expiry and TLS health for free on LapseZero: Add your first monitor.