How to Enable Post-Quantum TLS on nginx

By Team Cyber Kendra • • 2 Min Read • Follow on Google News Add to Preferred Source

Facts last checked: December 4, 2026

nginx gets its TLS from OpenSSL. With OpenSSL 3.5 or later, post-quantum hybrid key exchange (X25519MLKEM768) is in OpenSSL’s default list and preferred, so most servers need an update rather than a config change.

1. Check which OpenSSL nginx uses

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

You need 3.5 or later. Distributions that ship OpenSSL 3.5 include Debian 13, Alpine 3.22, RHEL, AlmaLinux and Rocky Linux 10.1, SLES 16, and Ubuntu 25.10 and 26.04.

2. Check your config

If your config has no ssl_ecdh_curve line, OpenSSL’s defaults apply and nothing else is needed. If it has one, put the hybrid group first:

ssl_protocols TLSv1.2 TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1:secp384r1;

A line that lists only classic curves, such as ssl_ecdh_curve secp384r1;, switches post-quantum key exchange off. This is a common leftover from old hardening guides.

3. Reload

sudo nginx -t && sudo systemctl reload nginx

4. Test

openssl s_client -groups X25519MLKEM768 -tls1_3 -connect example.com:443

Or run this site’s free tester. If the handshake fails, nginx is still linked to an older OpenSSL or a config line is overriding the default.

Behind a CDN?

The CDN handles your visitors’ connections. These steps then protect the connection from the CDN to nginx.

Sources

Latest Articles

View all