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
test "$(uname -m)" = x86_64 || { echo 'This Arch/Manjaro package path is x86_64 only' >&2; exit 1; }
sudo pacman -Syu --needed ca-certificates curl tar coreutils python bind openssl iproute2 shadow
Signed full transaction complete; recheck time/address after any required reboot.
LET’S BUILD
Add only public web transports to the existing firewall
The host firewall must already be managed with SSH/console preserved. On active UFW, open only TCP80/TCP443 and UDP443; inactive UFW means inspect the actual policy, not install or enable another firewall manager. Record which exact allowances pre-existed.
These are intentional public web ports. Keep origin/admin closed, do not flush rules or open Docker API. Local commands do not prove provider ingress or DNS.
Fresh proxy VM · existing firewall only
if command -v ufw >/dev/null && sudo env LC_ALL=C ufw status | grep -q '^Status: active'; then
sudo ufw status numbered
sudo ufw allow 80/tcp comment 'Academy Traefik HTTP01'
sudo ufw allow 443/tcp comment 'Academy Traefik HTTPS'
sudo ufw allow 443/udp comment 'Academy Traefik HTTP3'
sudo ufw status numbered
else
echo 'UFW is not active: review the existing nftables/provider policy with its owner'
fiThe 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/bin/nologin traefik-academy
useradd --system --user-group --no-create-home --home-dir /nonexistent --shell /usr/bin/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