← Start of tutorial

WIUNIX ACADEMY

Build Nginx with HTTP/3 and verify QUIC

Page 4 of 5. Review the earlier steps and prerequisites before continuing.

YOUR SYSTEM. YOUR STEPS.

Where are you working?

Choose your OS and version. The prerequisites, commands and troubleshooting follow your environment.

Debian 12Reviewed against official documentation ·

USE YOUR OWN VALUES

Configure this tutorial

Set the example values for your environment; related explanations and copy panels update together. Never enter passwords, private keys or tokens. Values stay in this tab and are not sent to the server or share links. Check actual DNS, certificates and network policy before running commands.

Different IP addresses, domains or ports? Open the settings below, change the values and select “Apply to tutorial”, then copy the updated commands.

Set values for my environment3 editable values

Inspect the negotiated protocol at the origin

Run this on the server and correlate the external request. The sample output shows the protocol fields expected for HTTP/3; match them to the actual request.

Bash

Server terminal

sudo tail -n 20 /opt/nginx-quic/logs/access.log
EXAMPLE OUTPUT
protocol=HTTP/3.0 h3=h3

Optionally check the origin directly

Replace the hostname and example IP. The client connects to the server IPv4 directly while retaining the real hostname for SNI and certificate validation. Use this to separate the origin from a CDN path.

Bash

Authorized client on a different network; not the server VM

curl --noproxy '*' --resolve 'h3.example.com:443:YOUR_SERVER_IPV4' --http3-only --fail --show-error --connect-timeout 5 --max-time 15 'https://h3.example.com/'

Find the failing layer

Keep the TCP control check and the strict QUIC check separate. Diagnose the first broken layer before changing unrelated settings.

Unknown http3 directive or invalid quic parameter

Inspect the exact binary’s version/build flags and the unit’s binary path below. Correct the build or unit if the module is absent or a different binary is used. Removing QUIC is not HTTP/3 success.

Bash
/opt/nginx-quic/sbin/nginx -V 2>&1
systemctl cat academy-nginx-quic
TCP HTTPS works but --http3-only times out

Check UDP listener, host/provider firewalls and NAT from another network. Some access networks block UDP 443. Alt-Svc can exist while UDP is unreachable. Check both IP families and the origin path.

Bash
sudo ss -lnup 'sport = :443'
sudo tail -n 40 /opt/nginx-quic/logs/error.log
curl lacks HTTP3 or rejects the option

Inspect the client’s feature list below. HTTP3 needs an appropriate QUIC/TLS build; server changes cannot add missing client features. Follow the official curl guide or use a capable browser.

Bash
curl -V
ACME or certificate verification fails

Check DNS/CAA, the challenge location, actual live certificate paths, full chain and hostname. Incorrect AAAA can break validation despite IPv4 success. Resolve trust problems instead of bypassing them.

Bash
sudo certbot certificates
Permissions, port conflicts or the wrong response

Validate the configuration and inspect recent errors below. Check worker access to the web root and socket ownership. Preserve existing sites and use an isolated host if port ownership is unclear.

Bash
sudo /opt/nginx-quic/sbin/nginx -t
sudo tail -n 40 /opt/nginx-quic/logs/error.log
sudo ss -lntup

Prepare the certificate renewal hook

Nginx must load the new certificate after Certbot renews it. Create the deploy-hook directory and open the dedicated file with these commands. The second command opens the editor: enter the file contents from the next block, then save and exit.

Bash

Server terminal · opens the editor

sudo install -d -m 755 /etc/letsencrypt/renewal-hooks/deploy
sudo test ! -e /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh && sudo test ! -L /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh || exit 1
sudoedit /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh

Save the post-renewal script

The deploy hook reloads only when RENEWED_LINEAGE matches this lab certificate. On RPM it restores labels only for this exact live/archive lineage before validating and reloading the dedicated service. Failure stops the hook; it starts no unrelated endpoint.

sh · /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh

File contents · save in the editor

#!/bin/sh
set -eu
[ "${RENEWED_LINEAGE:-}" = '/etc/letsencrypt/live/h3.example.com' ] || exit 0
'/opt/nginx-quic/sbin/nginx' -t
systemctl reload academy-nginx-quic

Check permissions, renewal and reload

Make the dedicated hook root-owned and executable, then dry-run only this cert-name. Dry-run normally skips deploy hooks, so invoke the hook separately with an explicit matching RENEWED_LINEAGE to check reload.

DEB usually provides certbot.timer; EPEL and Arch/Manjaro generally provide certbot-renew.timer. Confirm the actual installed unit. Enable one existing renewal schedule, not duplicate jobs; keep HTTP80/challenge access. Missing units require the package-specific scheduling method.

Bash

Server terminal · run each group and inspect its result

sudo chown root:root /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh
sudo chmod 755 /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh
sudo certbot renew --cert-name 'h3.example.com' --dry-run
sudo env RENEWED_LINEAGE='/etc/letsencrypt/live/h3.example.com' /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh
systemctl cat certbot.timer
sudo systemctl enable --now certbot.timer
systemctl list-timers --all certbot.timer
How do I know it worked?

The root-owned hook is executable, renewal and reload checks succeed, and an active renewal schedule is confirmed.

Explore all tutorials ↗