Needs: nginx 1.25 or later, built with OpenSSL 3.5 or later · Last tested: 2026-10-12

Enable X25519MLKEM768 on nginx

nginx gets post-quantum key exchange from the OpenSSL it's built with. With OpenSSL 3.5 or later, X25519MLKEM768 is on by default; you only need to make sure your configuration doesn't switch it off.

Before you start

Option 1: use OpenSSL's defaults (simplest)

  1. Find any ssl_ecdh_curve line in your configuration: grep -rn ssl_ecdh_curve /etc/nginx/.
  2. Remove it, or set it to auto. OpenSSL 3.5's default list puts X25519MLKEM768 first.
  3. Make sure TLS 1.3 is allowed:
ssl_protocols TLSv1.2 TLSv1.3;
  1. Test and reload: nginx -t && nginx -s reload.

Option 2: list the groups yourself

Use this if you need a fixed list, for example to keep a classical fallback in a known order.

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

Keep X25519MLKEM768 first: if X25519 comes first, browsers that offer both get classical key exchange (our checker shows this as "supported, not preferred").

Test and reload: nginx -t && nginx -s reload.

Check from the command line

With OpenSSL 3.5 on your machine:

openssl s_client -connect yourdomain.com:443 -servername yourdomain.com -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i "group"

Then scan your domain below to check every host at once.

Check the change

Scan your domain to see whether every host now uses post-quantum key exchange.

Related check: Does my server support X25519MLKEM768?