2019-10-17
2 min read
This post is also available in
íêµì´.
Just a few weeks ago we announced the availability on our edge network of HTTP/3, the new revision of HTTP intended to improve security and performance on the Internet. Everyone can now enable HTTP/3 on their Cloudflare zone and experiment with it using Chrome Canary as well as curl, among other clients.
We have previously made available an example HTTP/3 server as part of the quiche project to allow people to experiment with the protocol, but itâs quite limited in the functionality that it offers, and was never intended to replace other general-purpose web servers.
We are now happy to announce that our implementation of HTTP/3 and QUIC can be integrated into your own installation of NGINX as well. This is made available as a patch to NGINX, that can be applied and built directly with the upstream NGINX codebase.
Itâs important to note that this is not officially supported or endorsed by the NGINX project, it is just something that we, Cloudflare, want to make available to the wider community to help push adoption of QUIC and HTTP/3.
The first step is to download and unpack the NGINX source code. Note that the HTTP/3 and QUIC patch only works with the 1.16.x release branch (the latest stable release being 1.16.1).
% curl -O https://nginx.org/download/nginx-1.16.1.tar.gz
% tar xvzf nginx-1.16.1.tar.gz
As well as quiche, the underlying implementation of HTTP/3 and QUIC:
% git clone --recursive https://github.com/cloudflare/quiche
Next youâll need to apply the patch to NGINX:
% cd nginx-1.16.1
% patch -p01 < ../quiche/extras/nginx/nginx-1.16.patch
And finally build NGINX with HTTP/3 support enabled:
% ./configure \
--prefix=$PWD \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_v3_module \
--with-openssl=../quiche/deps/boringssl \
--with-quiche=../quiche
% make
The above command instructs the NGINX build system to enable the HTTP/3 support ( --with-http_v3_module
) by using the quiche library found in the path it was previously downloaded into ( --with-quiche=../quiche
), as well as TLS and HTTP/2. Additional build options can be added as needed.
You can check out the full instructions here.
Once built, NGINX can be configured to accept incoming HTTP/3 connections by adding the quic
and reuseport
options to the listen configuration directive.
Here is a minimal configuration example that you can start from:
events {
worker_connections 1024;
}
http {
server {
# Enable QUIC and HTTP/3.
listen 443 quic reuseport;
# Enable HTTP/2 (optional).
listen 443 ssl http2;
ssl_certificate cert.crt;
ssl_certificate_key cert.key;
# Enable all TLS versions (TLSv1.3 is required for QUIC).
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
# Add Alt-Svc header to negotiate HTTP/3.
add_header alt-svc 'h3-23=":443"; ma=86400';
}
}
This will enable both HTTP/2 and HTTP/3 on the TCP/443 and UDP/443 ports respectively.
You can then use one of the available HTTP/3 clients (such as Chrome Canary, curl or even the example HTTP/3 client provided as part of quiche) to connect to your NGINX instance using HTTP/3.
We are excited to make this available for everyone to experiment and play with HTTP/3, but itâs important to note that the implementation is still experimental and itâs likely to have bugs as well as limitations in functionality. Feel free to submit a ticket to the quiche project if you run into problems or find any bug.
Cloudflare's connectivity cloud protects
entire corporate networks, helps customers build
Internet-scale applications efficiently, accelerates any
website or Internet application,
wards off DDoS attacks, keeps
hackers at bay, and can help you on
your journey to Zero Trust.
Visit 1.1.1.1 from any device to get started with our free app that makes your Internet faster and safer.
To learn more about our mission to help build a better Internet, start here. If you're looking for a new career direction, check out our open positions.
NGINXQUICChromeDevelopersHTTP3Related posts
May 01, 2025 1:01 PM
Thirteen new MCP servers from Cloudflare you can use todayYou can now connect to Cloudflare's first publicly available remote Model Context Protocol (MCP) servers from any MCP client that supports remote servers. ...
May 01, 2025 1:00 PM
MCP Demo Day: How 10 leading AI companies built MCP servers on CloudflareWeâre teaming up with Anthropic, Asana, Atlassian, Block, Intercom, Linear, PayPal, Sentry, Stripe, and Webflow to launch new remote MCP servers, built on Cloudflare, to enable Claude users to manage...
April 14, 2025 2:00 PM
Developer Week 2025 wrap-upWeâve closed out Developer Week 2025. Hereâs a quick recap of the announcements and in-depth technical explorations that went out during the week....
April 11, 2025 2:00 PM
Startup spotlight: building AI agents and accelerating innovation with Cohort #5Discover how developers are using Cloudflare to scale AI workloads and streamline automation and how participants in Workers Launchpad Cohort #4 have built, and startups participating in Cohort #5...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3