WIUNIX ACADEMY
Set up Traefik with Let’s Encrypt and HTTP/3 on Linux
Page 2 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.
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
LET’S BUILD
Install ordinary prerequisites
Use the selected distribution’s signed repositories for download/checksum/archive tools, DNS inspection and the Python marker origin. RPM uses bind-utils/shadow-utils; Arch uses bind/shadow and a full synchronized update on the disposable VM. No external Traefik package repository or Docker API is needed.
Review the transaction. This is planned installation, not incident diagnosis; never switch firewall managers to run the exercise. OS security coverage and upstream binary maintenance are separate, including Debian 12 LTS package coverage.
Dedicated Linux host
sudo dnf repolist --enabled
sudo dnf install ca-certificates curl tar coreutils python3 bind-utils openssl iproute shadow-utils policycoreutils audit
Signed native prerequisites installed; no alternate proxy or EPEL needed.
LET’S BUILD
Add only public web transports to the existing firewall
firewalld must already be active with SSH/console preserved. Find the interface actually holding the public IPv4 and its assigned zone; stop if missing. Inspect runtime/permanent policy and record pre-existing allowances. Add only TCP80/TCP443 and UDP443 to both states without reload.
These are public web transports, not origin/dashboard. Host commands do not prove provider ingress/DNS. Retire only allowances introduced here; preserve pre-existing rules/SSH.
Fresh proxy VM · existing firewall only
(
set -euo pipefail
sudo firewall-cmd --state
sudo firewall-cmd --get-active-zones
public_if=$(ip -j -4 address | python3 -c 'import json,sys; names={i["ifname"] for i in json.load(sys.stdin) for a in i.get("addr_info",[]) if a.get("local")=="203.0.113.10"}; sys.exit("STOP: public address/interface mismatch") if len(names)!=1 else print(next(iter(names)))')
zone=$(sudo firewall-cmd --get-zone-of-interface="$public_if")
test -n "$zone" && test "$zone" != 'no zone' || { echo 'STOP: review assigned public-interface zone' >&2; exit 1; }
sudo firewall-cmd --zone="$zone" --list-all
sudo firewall-cmd --permanent --zone="$zone" --list-all
# Record which exact ports were already allowed before adding them.
for port in 80/tcp 443/tcp 443/udp; do
sudo firewall-cmd --zone="$zone" --add-port="$port"
sudo firewall-cmd --permanent --zone="$zone" --add-port="$port"
done
sudo firewall-cmd --zone="$zone" --list-ports
sudo firewall-cmd --permanent --zone="$zone" --list-ports
)The three public transports are approved; origin/admin stay private.
LET’S BUILD
Verify and install the pinned official release
Stable release reviewed on 2026-11-05 is 3.7.17 with security fixes; 3.8.0-rc.1 is pre-release and not selected. Pinning makes this input reproducible, not permanently secure. Review current advisories/migration notes before later updates.
Download as an ordinary user, select exactly one matching vendor checksum, verify it and install only the executable. Archive and checksum come over HTTPS from the same release: consistency/corruption checking, not independent artifact-signature verification. Follow any separate artifact-approval policy; never pipe downloaded scripts to root.
Dedicated Linux host
bash -euo pipefail <<'DOWNLOAD'
version=3.7.17
case "$(uname -m)" in
x86_64) arch=amd64;; aarch64|arm64) arch=arm64;; *) echo 'Unsupported architecture' >&2; exit 1;;
esac
umask 022
work=$(mktemp -d)
cd "$work"
archive="traefik_v${version}_linux_${arch}.tar.gz"
base="https://github.com/traefik/traefik/releases/download/v${version}"
curl --fail --location --connect-timeout 10 --max-time 180 --proto '=https' --tlsv1.2 -o "$archive" "$base/$archive"
curl --fail --location --connect-timeout 10 --max-time 180 --proto '=https' --tlsv1.2 -o checksums.txt "$base/traefik_v${version}_checksums.txt"
awk -v name="$archive" '$2 == name {print}' checksums.txt > selected.sha256
test "$(wc -l < selected.sha256)" -eq 1
sha256sum --check selected.sha256
tar -xzf "$archive" traefik
test ! -e /usr/local/bin/traefik
test ! -L /usr/local/bin/traefik
sudo install -o root -g root -m 0755 traefik /usr/local/bin/traefik
/usr/local/bin/traefik version
printf 'Retained download directory: %s\n' "$work"
DOWNLOAD
Exactly one matching checksum passes; installed version is 3.7.17 with expected Linux architecture.
LET’S BUILD
Create isolated service state
On the fresh disposable host create separate locked non-login traefik-academy and academy-traefik-origin identities; no DEB-only www-data dependency. Root owns configuration/marker data; only Traefik writes its ACME state. Neither service gets Docker group/socket access.
Create both 0600 ACME files once in the new 0700 directory; never truncate them during retries. Preserve partial state and inspect it instead of blindly rerunning setup.
Dedicated Linux host
sudo bash <<'SETUP'
set -euo pipefail
for name in traefik-academy academy-traefik-origin; do
if getent passwd "$name" >/dev/null || getent group "$name" >/dev/null; then echo "STOP: existing identity $name" >&2; exit 1; fi
done
for path in '/etc/traefik-academy' '/var/lib/traefik-academy' '/srv/traefik-academy-origin'; do
test ! -e "$path" && test ! -L "$path"
done
useradd --system --user-group --no-create-home --home-dir /nonexistent --shell /usr/sbin/nologin traefik-academy
useradd --system --user-group --no-create-home --home-dir /nonexistent --shell /usr/sbin/nologin academy-traefik-origin
install -d -o root -g traefik-academy -m 0750 '/etc/traefik-academy' '/etc/traefik-academy/dynamic'
install -d -o traefik-academy -g traefik-academy -m 0700 '/var/lib/traefik-academy'
install -o traefik-academy -g traefik-academy -m 0600 /dev/null '/var/lib/traefik-academy/acme-staging.json'
install -o traefik-academy -g traefik-academy -m 0600 /dev/null '/var/lib/traefik-academy/acme-production.json'
install -d -o root -g root -m 0755 '/srv/traefik-academy-origin'
install -d -o root -g root -m 0755 "$(dirname '/srv/traefik-academy-origin/health.txt')"
printf '%s
' 'academy-traefik-origin-ok' > '/srv/traefik-academy-origin/health.txt'
chmod 0644 '/srv/traefik-academy-origin/health.txt'
SETUPDedicated account and directories exist; state is 0700, both ACME files 0600; marker is public non-secret data.
LET’S BUILD
Open the dedicated origin unit
This Python HTTP server is only an observable learning fixture, not a production application server. Its document root contains only the marker, never a repository, home, key or backup directory. Create only the following new unit.
Dedicated Linux host
test ! -e /etc/systemd/system/academy-traefik-origin.service &&
sudoedit /etc/systemd/system/academy-traefik-origin.service
Editor open for the new origin unit.
Origin service file
FILE CONTENT: save this unit. Binding to 127.0.0.1 is a fixed security boundary, not a public setting.
[Unit]
Description=Academy Traefik loopback marker
After=network.target
[Service]
Type=simple
User=academy-traefik-origin
Group=academy-traefik-origin
ExecStart=/usr/bin/python3 -m http.server 8081 --bind 127.0.0.1 --directory /srv/traefik-academy-origin
Restart=on-failure
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
[Install]
WantedBy=multi-user.target