Quickstart cipi.yml Web panel API MCP Ecosystem Guides Docs GitHub Telegram channel
  1. Home
  2. Guides
  3. HTTP/2 and HTTP/3, explained: what they are, why they matter, and how to turn them on
Operations

HTTP/2 and HTTP/3, explained: what they are, why they matter, and how to turn them on

Faster pages on phones and busy networks, one command each. Here is what HTTP/2 and HTTP/3 really change, why a Cipi server starts without them, and how to turn them on safely.

By Updated 6 min read

Every page your visitors open travels over HTTP. Which version of HTTP decides how many connections the browser opens, how it waits, and how it behaves on a shaky mobile network. Nginx can speak three: HTTP/1.1, HTTP/2 and HTTP/3. A Cipi server starts with the first, on purpose, and turns on each of the others with one command when you decide it's worth it.

Key ideas, in plain words#

TermMeaning
HTTP/1.1One request at a time per connection; browsers open about six connections per site to compensate
HTTP/2Many requests at once over one TCP connection (multiplexing), with compressed headers
HTTP/3HTTP over QUIC, a protocol on top of UDP: faster handshakes, no stalls when one packet is lost, survives a change of network
TLSThe encryption of HTTPS. HTTP/2 is used only over HTTPS in browsers; HTTP/3 has TLS 1.3 built in
ALPNHow browser and server agree on HTTP/2 during the TLS handshake. Automatic
Alt-SvcA response header that tells the browser "I also speak HTTP/3 on 443/udp". The first visit is always TCP; the next requests can use HTTP/3
443/udpThe port HTTP/3 listens on. HTTP/1.1 and HTTP/2 use 443/tcp
Step 1 of 3HTTP/1.1

A page with 60 files waits in line on about six connections. Simple, universal, and the smallest attack surface.

Why a Cipi server starts without them#

Speed is one side. The other is code you expose. During this year most of Nginx's security releases fixed bugs in its HTTP/2 and HTTP/3 code. A vhost written as listen 443 ssl; answers HTTP/1.1 over TLS, and that code can't be reached by anyone: when a CVE in it was published, servers set up by Cipi weren't exposed. How Cipi handled the nginx CVEs walks through a real case.

So the default stays HTTP/1.1, and the choice is yours:

Turn them on when…Leave them off when…
Your pages load many files (Laravel + Vite, WordPress themes, shops)The domain is proxied by Cloudflare: its edge already speaks HTTP/2 and HTTP/3 to visitors
Many visitors come from phones or slow networks (HTTP/3)The app is an API answering one request at a time
Nginx is patched every night (cipi autoupdate, the default)You can't keep Nginx up to date on this server

Before you start#

  • A Cipi server with apps on HTTPS (sudo cipi ssl install <app>): neither protocol is used over plain HTTP.
  • Nginx from nginx.org, up to date. Cipi refuses both on Ubuntu's own Nginx build (it has no HTTP/3, and the nightly update doesn't reach it) and on an Nginx below its security floor. Check first:
bash
sudo cipi nginx security       # version vs the latest fixes, HTTP/2 and HTTP/3 on or off, nightly updates
sudo cipi nginx upgrade        # if it says so
  • For HTTP/3, if a cloud firewall sits in front of the server (an AWS security group, Hetzner Cloud Firewall, DigitalOcean Cloud Firewall), allow 443/udp there too. UFW is only the server's own firewall.

1. Turn on HTTP/2#

bash
sudo cipi nginx http2 on
sudo cipi nginx http2 status

Cipi writes one file, /etc/nginx/conf.d/cipi-http2.conf (http2 on;): every HTTPS site of the server — your apps, the panel and its API — now answers HTTP/2 to a browser that asks, and HTTP/1.1 to one that doesn't. No vhost is changed, so there's nothing a later rewrite could lose. Before the reload, nginx -t tests the whole configuration: if Nginx refuses it, every file goes back and you get Nginx's reason.

2. Turn on HTTP/3#

bash
sudo cipi nginx http3 on
sudo cipi nginx http3 status   # apps that answer it, 443/udp, who holds the port
What Cipi doesWhy
Writes /etc/nginx/conf.d/cipi-http3.conf, the QUIC socket on 443/udpOne place for the socket's options; it refuses a QUIC connection that names no app
Adds listen 443 quic; and Alt-Svc: h3=":443"; ma=86400 to every app vhost with a certificateBrowsers learn about HTTP/3 from the header
Opens 443/udp in UFW as HTTP/3's own ruleClosed again by off
Rewrites the lines whenever a vhost is written againA new alias, a PHP switch or the page cache never drop HTTP/3; an app that gets its certificate later answers HTTP/3 from then on
Checks who listens on 443/udp after the reloadIf another program holds it, every file goes back

The panel and its API stay on TCP (HTTP/2 reaches them, HTTP/3 doesn't), and a vhost you wrote by hand is named, never touched.

3. …or from the web panel#

The server's Firewall tab has an HTTP/2 and HTTP/3 card: Turn on and Turn off for each, asked first, with how many apps on HTTPS answer HTTP/3 and where 443/udp stands. It takes the Manage level on the server. Where the server would refuse — an Nginx to update first, QUIC already set up by hand — the card says so instead of offering the button. The same from the REST API, the PHP SDK and cipi-cli nginx http2|http3 on your laptop (details).

4. Check it from outside#

bash
curl -sI --http2 https://shop.example.com | head -1
HTTP/2 200
curl -sI https://shop.example.com | grep -i alt-svc
alt-svc: h3=":443"; ma=86400
curl -sI --http3-only https://shop.example.com | head -1     # if your curl is built with HTTP/3
HTTP/3 200

In a browser, open the developer tools, Network tab, right-click the column headers and add Protocol: you'll read h2, and h3 from the second load of the page (the first request is always over TCP, where the browser reads Alt-Svc).

How it fits with the rest#

Cloudflare proxyA proxied domain gets HTTP/2 and HTTP/3 from Cloudflare's edge; Cloudflare reaches your server over TCP. Turning them on here is for the domains that aren't proxied (Cloudflare in front of Laravel)
Zero Trust locksA lock that closes 80/443 closes 443/udp with them, and the unlock opens it again. Turned on under a lock, HTTP/3 is ready in Nginx and the port stays closed (Zero Trust)
Page cacheIndependent: cached pages are served over whichever protocol the browser uses (page cache)
Banssudo cipi firewall block and CrowdSec refuse every protocol to an address, 443/udp included. Fail2ban's bans are over TCP, so they don't keep an address away from the sites over HTTP/3
ReloadsWhen Nginx reloads (a renewed certificate, a changed vhost), an HTTP/3 connection open at that moment can be cut; the browser opens a new one. TCP connections finish on their old worker as always
Staying patchedWith either on, Nginx's HTTP/2 and HTTP/3 fixes matter on this server. The nightly update installs them; if you turned it off, on and sudo cipi nginx security say so

What about your app? Nothing changes for Laravel, WordPress or Symfony: PHP receives the same requests. With HTTP/2 you can stop worrying about the number of files a page loads, but keep Vite's hashed bundles and long cache headers: they help on every protocol. Reverb's WebSockets keep working, opened over HTTP/1.1 as browsers do.

Turn them off#

bash
sudo cipi nginx http3 off      # vhosts back byte for byte, 443/udp closed
sudo cipi nginx http2 off

Troubleshooting#

ProblemFix
on refused: Nginx needs an updatesudo cipi nginx upgrade, then again. --force exists at the server's shell for an Nginx you can't update yet, and sudo cipi nginx security shows it in red until you do
on refused: Ubuntu's NginxCipi installs Nginx from nginx.org; a server still on the distro build needs sudo cipi nginx upgrade
on refused: HTTP/2 or QUIC configured elsewhereA file of yours already turns it on: Cipi names it instead of writing over it. Remove yours or leave it as is
Browser never shows h3Check alt-svc with curl; open 443/udp in the provider's firewall; some corporate networks block UDP (the browser then stays on h2)
http3 status says 443/udp closedA Zero Trust lock holds 80/443 (by design), or UFW isn't active. sudo cipi firewall status names who holds it
An app doesn't answer HTTP/3It has no certificate yet (sudo cipi ssl install <app>), or its vhost isn't written the way Cipi writes it: status lists it under without

Questions

Why are they off on a new Cipi server?

Most of Nginx's recent security fixes were in its HTTP/2 and HTTP/3 code. A vhost written as listen 443 ssl; speaks HTTP/1.1 over TLS, and that code can't be reached at all. You turn each on when you want it, on an Nginx that has the fixes.

Will my site get faster?

Pages with many files (CSS, JS, images, fonts) load faster over HTTP/2, and HTTP/3 helps most on phones and unsteady networks. An API that answers one JSON request at a time changes little.

Should I turn on both?

Usually yes. HTTP/3 alone works, but a visitor whose network blocks UDP then falls back to HTTP/1.1 instead of HTTP/2.

I'm behind Cloudflare's proxy. Do I need them?

No: Cloudflare gives visitors HTTP/2 and HTTP/3 from its edge whatever your server speaks. Turning them on at the origin changes nothing for proxied domains.

Do I have to change my Laravel or WordPress app?

No. The protocol is between the browser and Nginx; PHP sees the same requests. Reverb's WebSockets keep working.

Does HTTP/3 need a firewall change?

Cipi opens 443/udp in UFW for you and closes it when you turn HTTP/3 off. A cloud firewall in front of the server (a security group, Hetzner's firewall) has to allow 443/udp too.

Can I turn them on from the web panel?

Yes: the server's Firewall tab has an HTTP/2 and HTTP/3 card, with Turn on and Turn off for each. It takes the Manage level on the server.

How do I turn them off again?

sudo cipi nginx http2 off and sudo cipi nginx http3 off. Every vhost goes back byte for byte, and 443/udp closes.

Try it on your own server

Free and open source. One command on a fresh Ubuntu 24.04 or 26.04 VPS.

wget -O - https://cipi.sh/setup.sh | bash
Read the quickstart