Home / Learn / Fix‑it guides
Fix‑it guide
Enable post-quantum TLS on NGINX
Updated December 4, 2026 · QDay Index team
NGINX gets post‑quantum key exchange from OpenSSL. With OpenSSL 3.5 or later, the hybrid group X25519MLKEM768 is available and preferred by default, so many servers only need the right build.
1. Check which OpenSSL NGINX was built with
nginx -V 2>&1 | grep -o 'OpenSSL [0-9.]*'
This can differ from what openssl version prints. You need 3.5 or later. Debian 13 and Alpine 3.22 ship it; older distributions such as Debian 12 ship 3.0, which has no ML‑KEM. On those, use the official NGINX packages built against a newer OpenSSL, a container image based on a newer distribution, or put a CDN or load balancer that supports post‑quantum TLS in front.
2. Make sure TLS 1.3 is on
ssl_protocols TLSv1.2 TLSv1.3;
Post‑quantum key exchange only exists in TLS 1.3. Keeping TLS 1.2 is fine for older clients; drop TLS 1.0 and 1.1.
3. Don't block the hybrid group
If you have no ssl_ecdh_curve line, OpenSSL 3.5's defaults already offer X25519MLKEM768 first. If you pin the list, put the hybrid first and keep a classical fallback:
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1;
Careful: on an older OpenSSL, naming X25519MLKEM768 makes NGINX refuse to start. Run nginx -t before reloading.
4. Optional: measure adoption
log_format pq '$remote_addr $ssl_protocol $ssl_curve';
access_log /var/log/nginx/pq.log pq;
Connections that used the hybrid show X25519MLKEM768 in $ssl_curve.
Check that it worked
From a machine with OpenSSL 3.5 or later:
openssl s_client -connect example.com:443 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i "group"
You should see X25519MLKEM768 as the negotiated group. Or run a readiness scan: the post‑quantum key exchange check turns green when the hybrid group is accepted.
Other fix‑it guides
- Apache httpd
- Cloudflare
- AWS
- Azure
- Google Cloud
- Akamai
- Windows Server and IIS
- Email (MTA-STS)
- HSTS and legacy TLS
Vendor features change quickly; check your provider's current documentation before changing production systems.