Illustrative WIUNIX Academy IT engineering workspace with server/network equipment and an instructional board: Build Nginx with HTTP/3 and verify QUIC

WIUNIX ACADEMY

Build Nginx with HTTP/3 and verify QUIC

Build an isolated signed-source Nginx lab, then distinguish real origin HTTP/3 from TCP fallback with trusted TLS, renewal and rollback.

Intermediate55 min readUpdated
Make this guide yours

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

THE OUTCOME

What will you have at the end?

A trusted HTTPS demonstration site with Nginx serving HTTP/3 over UDP 443 and TCP HTTPS on the same port, with strict external protocol checks, certificate renewal and a recoverable configuration.

01Remote clientTrusted hostname · strict HTTP/3 check
02Two transportsUDP 443 → QUIC · TCP 443 → HTTPS
03Nginx originSigned source · TLS certificate · static demo
Supported operating systems and versions

Documentation-reviewed on2026-11-05 for a fresh systemd VM, not an executed all-distribution service test. HTTP/3 remains experimental; no capacity, latency gain or production-readiness claim.

Before you begin

  • Fresh disposable systemd Linux VM matching the selector; sudo, Bash, Internet and enough build resources.
  • Controlled real DNS hostname and host/provider/NAT permissions; dedicated available TCP80/443 and UDP443.
  • Separate network/client with HTTP3-capable curl, a second administrative connection and a VM recovery path.
01

LET’S BUILD

Choose a clean lab and trace both transports

Build a static lab endpoint to prove real origin HTTP/3. QUIC uses UDP while HTTP/1.1 and HTTP/2 use TCP; sharing port443 does not make either path proof of the other. This is no latency benchmark.

Use a fresh disposable systemd VM, not a maintenance replacement for an existing site. The dedicated source build uses a new academy-nginx worker account. Choose a new direct child of /opt as prefix and a new direct child of /var/www as web root, with only ASCII letters/digits/hyphen/underscore in the basename. The form validates syntax, not filesystem ownership/existence.

Point the controlled hostname A record to this VM and keep DNS-only for the exercise. This sample binds IPv4; publish AAAA only after separately adding/testing IPv6 listeners, routing and firewall access. A CDN may terminate HTTP/3 without origin QUIC.

Bash

Server terminal · sudo where shown

set -eu
check_root_parent() {
  local parent="$1" parent_uid parent_mode
  test -d "$parent" && test ! -L "$parent" || { printf 'STOP: directory/link: %s\n' "$parent" >&2; exit 1; }
  parent_uid=$(stat -c %u -- "$parent") || exit 1
  parent_mode=$(stat -c %a -- "$parent") || exit 1
  if [ "$parent_uid" != 0 ] || (( (8#$parent_mode & 0022) != 0 )); then
    printf 'STOP: require root-owned non-writable parent: %s\n' "$parent" >&2; exit 1
  fi
}
for parent in / /opt /var /run; do check_root_parent "$parent"; done
if [ -e /var/www ] || [ -L /var/www ]; then check_root_parent /var/www; fi
cat /etc/os-release
uname -m
cat /proc/1/comm
prefix='/opt/nginx-quic'; webroot='/var/www/academy-quic'
[[ "$prefix" =~ ^/opt/[A-Za-z0-9_-]+$ ]] || { printf '%s\n' 'Choose a new direct child of /opt.' >&2; exit 1; }
[[ "$webroot" =~ ^/var/www/[A-Za-z0-9_-]+$ ]] || { printf '%s\n' 'Choose a new direct child of /var/www.' >&2; exit 1; }
for target in "$prefix" "$webroot" /run/academy-nginx-quic /etc/systemd/system/academy-nginx-quic.service /etc/letsencrypt/renewal-hooks/deploy/academy-nginx-quic.sh; do
  if sudo test -e "$target" || sudo test -L "$target"; then printf 'STOP: already exists: %s\n' "$target" >&2; exit 1; fi
done
test "$(cat /proc/1/comm)" = systemd || exit 1
if command -v ss >/dev/null 2>&1; then sudo ss -lntup; else printf '%s\n' 'ss is unavailable; install the selected lab packages, then repeat listener inspection before starting any service.'; fi
How do I know it worked?

The OS/version matches the selector, systemd is running, and TCP 80/443 plus UDP 443 are available for the lab.

02

LET’S BUILD

Download the release and inspect its signing key

Reviewed2026-11-05: upstream stable remains1.30.6. All paths build the same signed source separately from distribution Nginx packages; no cross-codename package is used. Package updates maintain libraries but do not rebuild this binary.

DEB uses build-essential and development headers; RPM uses GCC/devel packages with Certbot from EPEL plus CRB/CodeReady Builder; Arch/Manjaro use regular repositories and a full update, never a partial upgrade or Arch repositories mixed into Manjaro. Review transactions on this fresh VM.

Download without extracting, then compare Sergey Kandaurov’s full primary-key fingerprint to the displayed expected value and official developer key. The repository signing key has a different purpose. The private lab keyring stays separate. Stop after any failed download or mismatch.

Bash

Server terminal · sudo where shown

set -eu
sudo apt-get update &&
sudo apt-get install --no-install-recommends build-essential libpcre2-dev zlib1g-dev libssl-dev curl ca-certificates gnupg certbot iproute2 procps passwd util-linux sudo python3
set -eu
umask 077
mkdir "$HOME/academy-nginx-source" || exit 1
cd "$HOME/academy-nginx-source"
mkdir -m 700 gnupg
curl --fail --show-error --location --connect-timeout 10 --max-time 120 https://nginx.org/download/nginx-1.30.6.tar.gz -o nginx-1.30.6.tar.gz
curl --fail --show-error --location --connect-timeout 10 --max-time 30 https://nginx.org/download/nginx-1.30.6.tar.gz.asc -o nginx-1.30.6.tar.gz.asc
curl --fail --show-error --location --connect-timeout 10 --max-time 30 https://nginx.org/keys/pluknet.key -o pluknet.key
gpg --homedir ./gnupg --show-keys --with-fingerprint pluknet.key
fingerprint=$(gpg --homedir ./gnupg --with-colons --show-keys pluknet.key | awk -F: '$1=="fpr" {print $10; exit}')
test "$fingerprint" = D6786CE303D9A9022998DC6CC8464D549AF75C0A || exit 1
How do I know it worked?

Downloads succeed and the developer key fingerprint exactly matches the expected official key. Stop if the identity or fingerprint differs.

03

LET’S BUILD

Verify the signature, then build HTTP/3

Import only the fingerprint-checked developer key into the isolated keyring and verify the exact archive/signature before extraction. A personal-trust warning differs from a bad signature; both the official fingerprint and successful verification matter.

Create a fresh system worker account without interactive login/home, using the selected distribution’s explicit nologin path. Recheck root-owned non-writable prefix ancestry. After signature verification, use build umask022 and explicitly install the new executable0755 without changing the private keyring. Use two compiler jobs or one on constrained VMs; do not repurpose an existing account or prefix.

Inspect the exact binary -V for1.30.6, --with-http_v3_module and build/runtime TLS libraries. QUIC needs TLS1.3. Upstream recommends OpenSSL3.5.1+; older compatible libraries use the compatibility layer without early data. Keep0-RTT disabled; this module remains experimental.

Bash

Server terminal · sudo where shown

set -eu
cd "$HOME/academy-nginx-source"
gpg --homedir ./gnupg --import pluknet.key
gpg --homedir ./gnupg --verify nginx-1.30.6.tar.gz.asc nginx-1.30.6.tar.gz
test ! -e nginx-1.30.6 && test ! -L nginx-1.30.6 || exit 1
umask 022
tar -xzf nginx-1.30.6.tar.gz
cd nginx-1.30.6
check_root_parent() {
  local parent="$1" parent_uid parent_mode
  test -d "$parent" && test ! -L "$parent" || { printf 'STOP: directory/link: %s\n' "$parent" >&2; exit 1; }
  parent_uid=$(stat -c %u -- "$parent") || exit 1
  parent_mode=$(stat -c %a -- "$parent") || exit 1
  if [ "$parent_uid" != 0 ] || (( (8#$parent_mode & 0022) != 0 )); then
    printf 'STOP: require root-owned non-writable parent: %s\n' "$parent" >&2; exit 1
  fi
}
check_root_parent /
check_root_parent /opt
test -x /usr/sbin/nologin || exit 1
getent passwd academy-nginx && exit 1
getent group academy-nginx && exit 1
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent --shell /usr/sbin/nologin academy-nginx
sudo mkdir -m 755 '/opt/nginx-quic' || exit 1
./configure --prefix='/opt/nginx-quic' --user=academy-nginx --group=academy-nginx \
 --pid-path=/run/academy-nginx-quic/nginx.pid \
 --http-client-body-temp-path='/opt/nginx-quic/temp/client_body' \
 --http-proxy-temp-path='/opt/nginx-quic/temp/proxy' \
 --http-fastcgi-temp-path='/opt/nginx-quic/temp/fastcgi' \
 --http-uwsgi-temp-path='/opt/nginx-quic/temp/uwsgi' \
 --http-scgi-temp-path='/opt/nginx-quic/temp/scgi' \
 --with-http_ssl_module --with-http_v2_module --with-http_v3_module
make -j2
sudo make install
sudo chmod 755 '/opt/nginx-quic/sbin/nginx'
sudo install -d -m 755 '/opt/nginx-quic/temp'
'/opt/nginx-quic/sbin/nginx' -V 2>&1
How do I know it worked?

The exact /opt binary reports version 1.30.6 and --with-http_v3_module. A successful build without that flag is not a successful HTTP/3 installation.

Preserve host policy and dedicated path ownership

Preserve AppArmor/service restrictions on DEB and actual configured security/firewall ownership on Arch/Manjaro. Root must own non-writable installation ancestors. The RPM variant of this section supplies required enforcing-SELinux labels; do not substitute another distribution’s variant.

Review UDP labeling on enforcing RPM

For enforcing RPM: skip addition if UDP443 already has http_port_t. Stop for a different explicit owner/type instead of changing it with -m. If no explicit mapping exists, add only this port with the selected RPM panel and record it for lab retirement. Other families retain their configured security policy.

Open the initial configuration

Open the editor with this command. The next section contains the file contents; substitute the required hostname and paths before saving.

Bash

Server terminal · opens the editor

sudoedit /opt/nginx-quic/conf/nginx.conf
Explore all tutorials ↗