← Start of tutorial

WIUNIX ACADEMY

Set up Traefik with Let’s Encrypt and HTTP/3 on Linux

Page 6 of 7. 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.

Rocky Linux 10.2Reviewed 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 environment11 editable values

502, 404 or a disabled router

502 usually points to an unavailable/wrong upstream. Compare the local exact marker to the file-provider URL and origin port; both services share this host’s loopback. A 404 may instead mean the Host does not match or the route failed to load. Check private router status and logs before changing DNS. After a failed dynamic edit restore the last reviewed root-owned route file; do not expose the origin or disable TLS to hide the error.

Bash
sudo systemctl is-active academy-traefik-origin.service traefik-academy.service
curl --fail --silent --show-error --noproxy '*' 'http://127.0.0.1:8081/health.txt'
curl --fail --silent --show-error --noproxy '*' 'http://127.0.0.1:8080/api/http/routers'
sudo journalctl -u traefik-academy.service --since '10 minutes ago' --no-pager

HTTPS works but HTTP/3 does not

Separate missing client support from blocked UDP. Verify HTTP3 in client Features, actual UDP443 listener, TLS-enabled router and firewall/NAT path. An advertised h3 header with a failed --http3-only request is a failed QUIC test, even if browser fallback keeps the site reachable. No separate UDP entrypoint should claim 443 because HTTP3 already owns it. Do not add experimental flags from v2 examples.

Bash
sudo ss -lnup 'sport = :443'
sudo journalctl -u traefik-academy.service --since '10 minutes ago' --no-pager

If you later choose Docker discovery

This guide deliberately uses only the file provider. Docker discovery requires access to a privileged management API; mounting docker.sock with :ro does not authorize only read-only API requests and is not a security boundary. Before adopting it, design a separately reviewed authenticated and authorized/filtered daemon-access path, restrict discovery with exposedByDefault=false and explicit per-service enablement/network/port labels, and avoid publishing the Docker API. A socket proxy alone is not proof of safe permissions. Do not add a raw socket mount to this tutorial as a shortcut.

20

LET’S BUILD

Take a consistent protected recovery copy

After successful production acceptance, use a NEW root-only recovery directory outside the origin. This maintenance pause stops only this dedicated proxy while state is copied; the trap attempts restart on success or failure and reports a failed restart with a nonzero status. The backup contains ACME account/private certificate keys: keep it root-only, encrypted off-host, and never upload it as tutorial evidence. Copy exact configuration, state, binary, units and marker with original absolute paths; compare bytes without printing secrets. This is not an application-data or DNS-account backup.

Bash

Dedicated Linux host

sudo bash -eu <<'BACKUP'
test ! -e '/var/backups/traefik-academy'
test ! -L '/var/backups/traefik-academy'
systemctl is-active --quiet traefik-academy.service
install -d -m 0700 '/var/backups/traefik-academy'
systemctl stop traefik-academy.service
restart_proxy() {
  result=$?
  trap - EXIT
  if ! systemctl start traefik-academy.service || ! systemctl is-active --quiet traefik-academy.service; then
    printf 'Proxy restart failed; inspect its journal before continuing\n' >&2
    exit 1
  fi
  exit "$result"
}
trap restart_proxy EXIT
cp -a --parents '/etc/traefik-academy' '/var/lib/traefik-academy' /usr/local/bin/traefik /etc/systemd/system/traefik-academy.service /etc/systemd/system/academy-traefik-origin.service '/srv/traefik-academy-origin/health.txt' '/var/backups/traefik-academy/'
files=('/etc/traefik-academy/traefik.yml' '/etc/traefik-academy/dynamic/routes.yml' '/var/lib/traefik-academy/acme-staging.json' '/var/lib/traefik-academy/acme-production.json' /usr/local/bin/traefik /etc/systemd/system/traefik-academy.service /etc/systemd/system/academy-traefik-origin.service '/srv/traefik-academy-origin/health.txt')
for file in "${files[@]}"; do cmp "$file" "/var/backups/traefik-academy$file"; done
printf 'Protected recovery copy verified\n'
BACKUP
How do I know it worked?

Protected recovery copy verified and proxy restarted; verify trusted external marker again.

21

LET’S BUILD

Rehearse and restore without reissuing blindly

Rehearse in a separate disposable environment first, with no public CA egress and private test certificates. The following restore is for the SAME dedicated host, selected paths, DNS identity and existing service accounts, during an approved outage. Check backup age, binary version/security advisories and the exact saved source paths before proceeding. Stop the proxy and origin; restore only the listed files, preserving ACME bytes and permissions. Do not run two writers against one state file or restore onto another workload. If state was compromised, follow CA revocation/key-rotation guidance rather than treating an old backup as a cure. For host loss, recreate verified accounts/directories and permissions through the reviewed setup in a recovery plan before restoring.

Bash

Dedicated Linux host

sudo bash -eu <<'RESTORE'
test -d '/var/backups/traefik-academy'
test -d '/etc/traefik-academy/dynamic'
test -d '/var/lib/traefik-academy'
getent passwd traefik-academy >/dev/null
files=('/etc/traefik-academy/traefik.yml' '/etc/traefik-academy/dynamic/routes.yml' '/var/lib/traefik-academy/acme-staging.json' '/var/lib/traefik-academy/acme-production.json' /usr/local/bin/traefik /etc/systemd/system/traefik-academy.service /etc/systemd/system/academy-traefik-origin.service '/srv/traefik-academy-origin/health.txt')
for file in "${files[@]}"; do test -f "/var/backups/traefik-academy$file"; done
systemctl stop traefik-academy.service academy-traefik-origin.service
for file in "${files[@]}"; do cp -a "/var/backups/traefik-academy$file" "$file"; cmp "/var/backups/traefik-academy$file" "$file"; done
chown traefik-academy:traefik-academy '/var/lib/traefik-academy/acme-staging.json' '/var/lib/traefik-academy/acme-production.json'
chmod 0600 '/var/lib/traefik-academy/acme-staging.json' '/var/lib/traefik-academy/acme-production.json'
systemd-analyze verify /etc/systemd/system/traefik-academy.service /etc/systemd/system/academy-traefik-origin.service
systemctl daemon-reload
systemctl start academy-traefik-origin.service traefik-academy.service
RESTORE
How do I know it worked?

Exact saved bytes restored and services active; repeat external trusted TLS/body, HTTP3 and private-admin boundary checks.

Update deliberately and keep rollback inputs

Check current official releases/advisories and v3 minor migration notes. Download a separately named candidate with the same architecture/checksum review as the installation panel; do not overwrite the running binary during investigation. Test configuration and actual routing/TLS/QUIC in an isolated environment, then take a protected recovery copy, stop only this proxy and install the approved binary in a maintenance window. Repeat acceptance and keep the prior binary/config/state together. Do not downgrade across state/config incompatibilities; restore the compatible set after review. Old pinned binaries do not receive unattended updates from APT.

Explore all tutorials ↗