Kexwatch

Fix guides

Enable post-quantum key exchange on Traefik

Traefik is written in Go, and Go 1.24 and newer offer hybrid post-quantum key exchange (X25519MLKEM768) by default. On a current Traefik the usual fix is an upgrade, plus removing any setting that replaces the defaults.

Based on Traefik's and Go's documentation. After any change, run the Kexwatch check to confirm.

1. Check your Traefik version

traefik version

Use Traefik 3.5 or newer. In Docker, check the image tag in your compose file. If the tag is latest, pull it again to get a current build.

2. Upgrade if needed

In Docker, set the image to a current 3.x tag, then:

docker compose pull traefik && docker compose up -d traefik

For a binary install, download a current release from Traefik's website and restart the service.

3. Look for curvePreferences

A curvePreferences list in your TLS options replaces Go's defaults. A list without X25519MLKEM768 switches hybrid key exchange off.

grep -rn "curvePreferences" /etc/traefik/

Check every dynamic config file too. The simplest fix is to delete the setting. If you need to keep a list, include the hybrid group:

tls:
  options:
    default:
      curvePreferences:
        - X25519MLKEM768
        - X25519
        - CurveP256

4. Check the environment

The setting GODEBUG=tlsmlkem=0 switches hybrid key exchange off in any Go program. If your service file or compose file sets it, remove it. Also make sure your TLS options do not set maxVersion: VersionTLS12, because hybrid key exchange needs TLS 1.3.

5. Check the result

Run the free check again. A pass means Traefik negotiates hybrid post-quantum key exchange with a modern client.