Copy-Paste Fix-It Configs
Nginx + OpenSSL 3.5+
Enable RFC 10024 hybrid X25519MLKEM768 first while keeping classical fallback for legacy clients.
# Requires OpenSSL 3.5+ (check: nginx -V && openssl version)
ssl_protocols TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1:secp384r1;
ssl_prefer_server_ciphers off;
Caddy (Go 1.24+)
Caddy built with Go 1.24+ negotiates X25519MLKEM768 by default unless overridden.
# Caddyfile — remove custom 'curves' overrides to keep Go's PQC defaults!
example.com {
tls {
protocols tls1.3
}
reverse_proxy 127.0.0.1:8080
}
# Ensure GODEBUG=tlsmlkem=0 is NOT set in your environment.
Cloudflare Edge + Origin
Enable post-quantum TLS at the edge AND upgrade your origin server to eliminate the CDN gap.
# Cloudflare Dashboard -> SSL/TLS -> Edge Certificates:
# Enable "Post-Quantum Cryptography" (X25519MLKEM768)
# Plus set SSL Mode = "Full (Strict)" and enable ML-KEM on your origin reverse proxy.
Need 1-click Post-Quantum Edge TLS? Learn more →
Go 1.24+ / 1.26 crypto/tls
Go 1.24+ enables X25519MLKEM768 automatically; Go 1.26 also supports SecP256r1MLKEM768 & SecP384r1MLKEM1024.
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS13,
// Leave CurvePreferences nil for default X25519MLKEM768, or specify:
CurvePreferences: []tls.CurveID{
tls.X25519MLKEM768,
tls.SecP384r1MLKEM1024,
tls.X25519,
},
}
OpenSSH 9.9 / 10.0+
Prioritize NIST FIPS 203 mlkem768x25519-sha256 in /etc/ssh/sshd_config.
# /etc/ssh/sshd_config (OpenSSH 9.9+ / 10.0+)
KexAlgorithms mlkem768x25519-sha256,[email protected],curve25519-sha256
Ciphers [email protected],[email protected]
# Test before reload: sshd -t && systemctl reload sshd
Postfix SMTP STARTTLS + MTA-STS
Upgrade Postfix to OpenSSL 3.5+ with TLS 1.3 and publish an enforcing MTA-STS policy to prevent STARTTLS stripping.
# /etc/postfix/main.cf (with OpenSSL 3.5+)
smtpd_tls_protocols = >=TLSv1.2
smtpd_tls_mandatory_protocols = >=TLSv1.2
tls_ssl_options = NO_COMPRESSION
# Publish DNS TXT: _mta-sts.example.com "v=STSv1; id=20261205"
# Host https://mta-sts.example.com/.well-known/mta-sts.txt with "mode: enforce"