How to enable post-quantum TLS on HAProxy
Checked · Official docs
Works with HAProxy built on OpenSSL 3.5+ or AWS-LC.
When HAProxy faces the internet directly, it negotiates TLS with every visitor, so the change belongs in its TLS configuration. If a CDN or load balancer sits in front, fix that first: it is what visitors connect to. The hybrid falls back to classical X25519 for clients that don't support it, so turning it on doesn't break older browsers.
Turn on post-quantum key exchange
Use an HAProxy build linked against OpenSSL 3.5+ or AWS-LC (check haproxy -vv), then set:
global
ssl-default-bind-curves X25519MLKEM768:X25519:P-256Prefer post-quantum over classical
Put the hybrid group first:
global
ssl-default-bind-curves X25519MLKEM768:X25519:P-256Turn off TLS 1.0 and 1.1
Require TLS 1.2 or newer:
global
ssl-default-bind-options ssl-min-ver TLSv1.2Use strong TLS 1.2 cipher suites
Use strong TLS 1.2 suites:
global
ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305Redirect HTTP to HTTPS
Redirect plain HTTP:
http-request redirect scheme https code 301 unless { ssl_fc }Send HSTS
Send HSTS:
http-response set-header Strict-Transport-Security "max-age=31536000; includeSubDomains"
Check that it worked
After you deploy, rescan your domain. A quantum-safe setup shows X25519MLKEM768 as the negotiated key exchange. From a terminal:
curl qsafe.sh/your-domain.com?fresh
Prefer to let an AI agent make the change? The qsafe-fix skill and the MCP server use this same guide. It's also available as JSON from /api/v1/fixes/haproxy.