services:traefik
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| services:traefik [2026/02/07 00:05] – external edit 127.0.0.1 | services:traefik [2026/02/08 08:34] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Traefik ====== | ====== Traefik ====== | ||
| - | Reverse | + | Reverse |
| - | ===== Access | + | ===== Details |
| - | ^ Item ^ Value ^ | + | ^ Key ^ Value ^ |
| - | | Dashboard | [[http:// | + | |
| | Container | CT 102 | | | Container | CT 102 | | ||
| | IP | 10.100.161.102 | | | IP | 10.100.161.102 | | ||
| - | | Ports | 80, 443, 8080 | | + | | Ports | 80, 443 | |
| + | | RAM | 512 MB | | ||
| - | ===== Installation | + | ===== Features |
| - | <code bash> | + | * Let's Encrypt |
| - | # Container erstellen (nesting + keyctl für Let's Encrypt) | + | |
| - | pct create 102 local: | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | --net0 name=eth0, | + | |
| - | --features nesting=1, | + | |
| - | --unprivileged 1 \ | + | |
| - | --start 1 | + | |
| - | # Traefik installieren | + | ===== Konfiguration ===== |
| - | pct exec 102 -- bash -c ' | + | |
| - | apt update && apt install -y wget | + | |
| - | # Binary herunterladen | + | < |
| - | wget https:// | + | / |
| - | tar xzf traefik_*.tar.gz | + | ├── |
| - | mv traefik / | + | ├── |
| - | chmod +x / | + | └── dynamic/ |
| - | + | | |
| - | # Verzeichnisse anlegen | + | |
| - | mkdir -p / | + | |
| - | touch /etc/traefik/ssl/acme.json | + | |
| - | chmod 600 / | + | |
| - | ' | + | |
| - | + | ||
| - | # Hauptkonfiguration | + | |
| - | pct exec 102 -- tee / | + | |
| - | api: | + | |
| - | dashboard: true | + | |
| - | insecure: true | + | |
| - | + | ||
| - | entryPoints: | + | |
| - | web: | + | |
| - | address: ": | + | |
| - | http: | + | |
| - | redirections: | + | |
| - | entryPoint: | + | |
| - | to: websecure | + | |
| - | scheme: https | + | |
| - | websecure: | + | |
| - | address: ": | + | |
| - | + | ||
| - | providers: | + | |
| - | file: | + | |
| - | directory: | + | |
| - | | + | |
| - | + | ||
| - | certificatesResolvers: | + | |
| - | letsencrypt: | + | |
| - | acme: | + | |
| - | email: admin@miskam.xyz | + | |
| - | storage: / | + | |
| - | dnsChallenge: | + | |
| - | provider: cloudflare | + | |
| - | resolvers: | + | |
| - | - " | + | |
| - | - " | + | |
| - | YAML | + | |
| - | + | ||
| - | # Systemd | + | |
| - | pct exec 102 -- tee / | + | |
| - | [Unit] | + | |
| - | Description=Traefik | + | |
| - | After=network.target | + | |
| - | + | ||
| - | [Service] | + | |
| - | Type=simple | + | |
| - | ExecStart=/ | + | |
| - | Restart=always | + | |
| - | + | ||
| - | [Install] | + | |
| - | WantedBy=multi-user.target | + | |
| - | SERVICE | + | |
| - | + | ||
| - | # Cloudflare Token (für DNS Challenge) | + | |
| - | pct exec 102 -- mkdir -p / | + | |
| - | pct exec 102 -- tee / | + | |
| - | [Service] | + | |
| - | Environment=" | + | |
| - | OVERRIDE | + | |
| - | + | ||
| - | pct exec 102 -- systemctl daemon-reload | + | |
| - | pct exec 102 -- systemctl enable --now traefik | + | |
| </ | </ | ||
| - | ==== Cloudflare API Token ==== | + | ===== Routes ===== |
| - | - [[https://dash.cloudflare.com/ | + | ^ Host ^ Backend ^ |
| - | - " | + | | n8n.home.miskam.xyz | 10.100.161.111:5678 | |
| - | - Zone: miskam.xyz | + | | vault.home.miskam.xyz | 10.100.161.112: |
| - | - Token in Vaultwarden speichern | + | | wiki.home.miskam.xyz | 10.100.161.113: |
| + | | status.home.miskam.xyz | 10.100.161.114:3001 | | ||
| + | | monitoring.home.miskam.xyz | ||
| + | | git.home.miskam.xyz | 10.100.161.116: | ||
| - | ===== TLS / Let's Encrypt | + | ===== Logs ===== |
| - | * **Provider: | + | < |
| - | * **Challenge: | + | journalctl -u traefik -f |
| - | * **Domain:** *.home.miskam.xyz (Wildcard) | + | |
| - | * **Auto-Renewal: | + | |
| - | * **Validity: | + | |
| - | + | ||
| - | ===== Routen ===== | + | |
| - | + | ||
| - | ==== Service URLs ==== | + | |
| - | + | ||
| - | ^ Service ^ Valid SSL (.home.miskam.xyz) ^ Internal (.srv.internal) ^ | + | |
| - | | n8n | https:// | + | |
| - | | Vaultwarden | https:// | + | |
| - | | DokuWiki | https:// | + | |
| - | | Uptime Kuma | https:// | + | |
| - | | Checkmk | https:// | + | |
| - | | Proxmox | https:// | + | |
| - | + | ||
| - | ===== Configuration ===== | + | |
| - | + | ||
| - | ^ File ^ Purpose ^ | + | |
| - | | / | + | |
| - | | / | + | |
| - | | / | + | |
| - | + | ||
| - | ===== Route hinzufügen ===== | + | |
| - | + | ||
| - | < | + | |
| - | # /etc/traefik/ | + | |
| - | http: | + | |
| - | routers: | + | |
| - | myservice: | + | |
| - | rule: " | + | |
| - | service: myservice | + | |
| - | entryPoints: | + | |
| - | - websecure | + | |
| - | tls: | + | |
| - | certResolver: | + | |
| - | domains: | + | |
| - | - main: " | + | |
| - | + | ||
| - | services: | + | |
| - | myservice: | + | |
| - | loadBalancer: | + | |
| - | servers: | + | |
| - | | + | |
| </ | </ | ||
| - | Traefik lädt Änderungen automatisch (file provider). | + | ===== Ansible |
| - | + | ||
| - | ===== Management | + | |
| <code bash> | <code bash> | ||
| - | # Status | + | ansible-playbook site.yml --limit traefik |
| - | pct exec 102 -- systemctl status traefik | + | |
| - | + | ||
| - | # Logs | + | |
| - | pct exec 102 -- journalctl -u traefik -f | + | |
| - | + | ||
| - | # Restart | + | |
| - | pct exec 102 -- systemctl restart traefik | + | |
| - | + | ||
| - | # Zertifikat prüfen | + | |
| - | echo | openssl s_client -connect n8n.home.miskam.xyz: | + | |
| - | + | ||
| - | # Gespeicherte Zertifikate | + | |
| - | pct exec 102 -- cat /etc/traefik/ | + | |
| </ | </ | ||
| - | ===== Related | + | ===== Links ===== |
| - | * [[network:overview|Network Overview]] - DNS setup | + | * [[https:// |
| - | * [[infrastructure: | + | * [[infrastructure: |
services/traefik.1770422718.txt.gz · Last modified: by 127.0.0.1
