qsafe.sh
Scan
Theme

Fix guides

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:

haproxy.cfg, global section
global
    ssl-default-bind-curves X25519MLKEM768:X25519:P-256

Prefer post-quantum over classical

Put the hybrid group first:

haproxy.cfg, global section
global
    ssl-default-bind-curves X25519MLKEM768:X25519:P-256

Turn off TLS 1.0 and 1.1

Require TLS 1.2 or newer:

haproxy.cfg, global section
global
    ssl-default-bind-options ssl-min-ver TLSv1.2

Use strong TLS 1.2 cipher suites

Use strong TLS 1.2 suites:

haproxy.cfg, global section
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-POLY1305

Redirect HTTP to HTTPS

Redirect plain HTTP:

haproxy.cfg, frontend
http-request redirect scheme https code 301 unless { ssl_fc }

Send HSTS

Send HSTS:

haproxy.cfg, HTTPS frontend
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.

Esc