Overview
HTTP/3 brings faster performance, better multiplexing, and reduced latency. This guide will help you enable HTTP/3 on your NGINX server running Ubuntu 22.04.
Requirements
- Ubuntu 22.04 VPS or Dedicated
- NGINX compiled with QUIC/HTTP3 (e.g. nginx-quic or nginx mainline with patch)
- Cloudflare account (optional)
Step 1: Install nginx-quic
git clone --recursive https://github.com/nginx/nginx-quic
cd nginx-quic
./configure --with-http_v3_module ...
make && make install
Step 2: Configure HTTP/3 in nginx.conf
`server {
listen 443 ssl http2;
listen 443 quic reuseport;
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers off;
add_header Alt-Svc 'h3=":443"'; # HTTP/3 support
add_header QUIC-Status $quic;
}`
Step 3: Enable on Cloudflare
Go to your site → “Network” tab
Enable HTTP/3 toggle
Test It
Use Chrome Canary or curl with HTTP/3 support:
curl -v --http3 https://yourdomain.com
Done! You’re now serving HTTP/3 via NGINX and Cloudflare.