Kexwatch

Fix guides

Enable post-quantum key exchange on Apache

Apache (mod_ssl) gets hybrid post-quantum key exchange (X25519MLKEM768) from OpenSSL. With OpenSSL 3.5 or newer it is on by default. With anything older, no Apache setting can turn it on.

Read this before editing anything. We tested it: on OpenSSL 3.0, adding X25519MLKEM768 to your Apache config passes apachectl configtest with "Syntax OK", and then Apache fails to start. Your site goes down. Always check the OpenSSL version first.

1. Check which OpenSSL Apache uses

openssl version
ldd /usr/lib/apache2/modules/mod_ssl.so | grep -i libssl

The first line shows the system OpenSSL. The second confirms mod_ssl uses the system library (the path on Red Hat-style systems is /etc/httpd/modules/mod_ssl.so). You need 3.5 or newer.

2. Upgrade to OpenSSL 3.5 or newer

Move to an operating system release that ships it. We tested Ubuntu 26.04 LTS: it ships OpenSSL 3.5.5 and Apache 2.4.66. Ubuntu 24.04 ships OpenSSL 3.0, which cannot do this.

  • Take a snapshot or backup of the server first.
  • Upgrade the release (on Ubuntu: sudo do-release-upgrade), or build a new server on the newer release and move your site across.
  • For other systems, check your distribution's OpenSSL version. Anything 3.5 or newer works.

3. Look for a line that blocks it

If your config sets its own list of key exchange groups, that list overrides OpenSSL's defaults.

sudo grep -Ri "SSLOpenSSLConfCmd" /etc/apache2/ /etc/httpd/ 2>/dev/null
  • No line mentioning Groups or Curves: nothing to change. Go to step 4.
  • A line such as SSLOpenSSLConfCmd Curves X25519:secp384r1: replace it with:
SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:prime256v1:secp384r1

4. Reload, then confirm Apache is running

sudo apachectl configtest && sudo systemctl reload apache2
systemctl status apache2 --no-pager | head -3

Do not trust "Syntax OK" on its own: the status must say active (running). If it failed, the error log will mention group 'X25519MLKEM768' cannot be set. Undo the change, reload, and go back to step 2.

5. Check the result

Run the free check again, and update every server behind your domain.

Tested 3 December 2026 with the Kexwatch probe: Apache 2.4.58 on OpenSSL 3.0 (Ubuntu 24.04), and OpenSSL 3.5.5 defaults and group settings on Ubuntu 26.04.