Guide
NGINX QUIC Not Working: Fix TLS, UDP, and Build Failures
Confirm HTTP/3 build support, TLS 1.3, UDP port 443, Alt-Svc advertising, and client support instead of trusting a valid NGINX configuration.
Why does HTTP/3 still use HTTP/2?
The client is falling back. A browser can load the page successfully over HTTP/2 while blocked UDP, missing Alt-Svc advertising, an unsupported build, or bad TLS silently prevents HTTP/3.
That distinction matters. A working page proves TCP port 443 and conventional HTTPS are reachable; it proves nothing about UDP port 443, which carries QUIC. Chrome and Firefox commonly retry over HTTP/2 instead of showing a useful error.
Ask a compatible client to require HTTP/3:
curl --http3-only -I https://example.com/Read the result literally. curl: option --http3-only: the installed libcurl version does not support this means the diagnostic client lacks HTTP/3, not that NGINX is broken. curl: (28) Connection timed out usually points toward blocked UDP or an unreachable listener. A successful response begins with HTTP/3; the curl HTTP/3 documentation lists supported QUIC backends and build requirements.
Try another network. If the command works through a mobile hotspot but times out from the office, stop rearranging NGINX directives because the fault sits in a firewall, VPN, hosting network, or other middlebox.
Does the installed NGINX build include HTTP/3?
Check the binary first. NGINX must be version 1.25.0 or later and include --with-http_v3_module, otherwise copied QUIC configuration cannot produce a functioning HTTP/3 listener.
Run both commands:
nginx -v
nginx -V 2>&1 | tr ' ' '\n' | grep http_v3No output is decisive. The second command should print --with-http_v3_module; if it prints nothing, the module is absent regardless of what a hosting dashboard claims. Depending on the release and directive, nginx -t may report unknown directive "http3", invalid parameter "quic", or reject another HTTP/3 setting.
That is a packaging failure. Distribution repositories can trail upstream or omit optional modules, while old articles still prescribe experimental patches and BoringSSL builds that are no longer the sensible starting point. Upstream records the version boundary and compilation option in the HTTP/3 module reference.
Replace the package. A current vendor build or a clean source build with a supported TLS library is worth doing; forcing abandoned QUIC patches onto an old production branch is not.
Is the QUIC listener and TLS configuration valid?
Use two listeners. The server block needs TCP 443 for conventional HTTPS, UDP 443 for QUIC, TLS 1.3, and an Alt-Svc header that tells eligible clients where HTTP/3 lives.
Start with this shape:
server {
listen 443 ssl;
listen 443 quic reuseport;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1.3;
add_header Alt-Svc 'h3=":443"; ma=86400' always;
add_header QUIC-Status $quic always;
location / {
root /var/www/html;
}
}Test before reloading:
nginx -t && nginx -s reloadSyntax is not reachability. nginx: configuration file ... test is successful confirms that NGINX can parse its files and access local certificates, but it never sends a public UDP packet.
Alt-Svc handles discovery. Without that response header, an ordinary first connection over TCP may stay on HTTP/2 unless the client independently attempts HTTP/3. The $quic variable helps during diagnosis: QUIC-Status: h3 identifies a request that actually reached the QUIC listener.
TLS still has teeth. QUIC requires TLS 1.3, and the certificate name, chain, private key, and file permissions must remain valid just as they are for HTTPS over TCP. The NGINX QUIC documentation covers supported TLS libraries, example directives, and diagnostic build macros.
Is UDP port 443 reaching NGINX?
Inspect the socket locally. If NGINX owns UDP 443 but remote HTTP/3 requests time out, a host firewall, cloud rule, NAT device, load balancer, or provider network is probably dropping datagrams.
Check both transports:
sudo ss -lntup | grep ':443'TCP alone is insufficient. You should see one TCP listener and one UDP listener; if UDP is missing, inspect the loaded configuration with nginx -T, find the active server block, then read the error log after reloading.
Open UDP 443 at every layer:
- Host firewall, including nftables, iptables, firewalld, or UFW
- Cloud security group or network firewall
- Hosting provider control panel
- Router port forwarding when the server sits behind NAT
- Public load balancer or CDN listener
A TCP health check stays green. So do many generic port-check websites, telnet, and nc -zv, because they test TCP unless told otherwise and therefore cannot certify a QUIC path.
Capture the traffic:
sudo tcpdump -ni any udp port 443Then send an external request. No incoming packets places the failure upstream of NGINX; incoming packets without replies shift attention to the local firewall, worker, TLS setup, and error log. Replies leaving but never returning to the client implicate NAT, asymmetric routing, or outbound filtering.
Can a proxy or ingress terminate HTTP/3?
Check the public endpoint. When a CDN, Kubernetes ingress, cloud load balancer, or reverse proxy owns the advertised IP address, that component must accept QUIC because the hidden origin never meets the browser.
The internal hop can differ. Many deployments terminate QUIC and TLS at the edge, then carry HTTP/2 or HTTP/1.1 from that proxy to NGINX, which is normal and usually easier to operate. Forcing HTTP/3 onto a private upstream rarely earns its complexity.
Compare DNS with the server you edited:
dig +short A example.com
dig +short AAAA example.comWatch IPv6 closely. A stale AAAA record can send IPv6 clients to another host while every IPv4 test passes, and a proxied DNS record can direct all traffic through a CDN that ignores origin-level QUIC changes.
Kubernetes adds another trap. The ingress controller must explicitly support HTTP/3, expose UDP 443 through its Service, and receive a matching UDP listener from the external load balancer; QUIC directives inside an application pod accomplish nothing when a TCP-only ingress terminates TLS first.
Choose the termination point. Then inspect headers, packet captures, status pages, and logs at that exact layer instead of treating every NGINX instance along the request path as one machine.
FAQ
- Why does nginx -t pass when HTTP/3 does not work?
- It tests files, not packets.
nginx -tvalidates configuration syntax and referenced local files, but it does not verify UDP routing, firewall rules, Alt-Svc discovery, client support, or a public QUIC handshake. - Does HTTP/3 require UDP port 443?
- Yes. HTTP/3 carries QUIC over UDP, while fallback HTTPS commonly uses TCP, so a practical deployment exposes both UDP 443 and TCP 443 to clients.
- Can NGINX use HTTP/3 to an upstream server?
- Not through ordinary
proxy_pass. The standard HTTP/3 module accepts downstream client connections, but the usual proxy path still talks HTTP/1.1 or HTTP/2 to an upstream unless another product explicitly supports QUIC there. - Should HTTP/2 be disabled after enabling QUIC?
- Keep the fallback. Clients and networks that cannot pass UDP still need HTTP/2 over TCP, and disabling it turns a recoverable protocol fallback into an unreachable site.