SadServers
  • Scenarios
  • Labs
    All Labs Linux & Bash Web Servers Databases Data Processing Docker Kubernetes CI/CD Infrastructure as Code Tooling / Applications
  • Dashboard
  • Solutions
    For Individuals For Businesses
  • Ranking
  • Newsletter
  • Documentation
    FAQ Support Pro Accounts Pro+ Accounts Business Accounts Gift API CLI/TUI Privacy Troubleshooting Interviews
  • Blog
  • Pricing
  • Gift
    Gift Purchase Gift Redeem
  • About
Log In - Sign Up
  1. Labs
  2. Traefik
  3. Cheatsheet

Guide

Concepts and learning path

Troubleshooting

Failure modes and fixes

Cheatsheet

Commands to keep handy

Traefik cheatsheet

CLI and service

CommandDescription
traefik versionBinary version
traefik --configFile=/etc/traefik/traefik.ymlStart with static config
systemctl status traefikService status (if systemd-managed)
docker logs traefik -fFollow Traefik container logs
ss -tlnp | grep traefikCheck listeners

Dashboard and API

URL / commandDescription
http://localhost:8080/dashboard/Web dashboard (if enabled)
curl -s http://localhost:8080/api/http/routersList HTTP routers (JSON)
curl -s http://localhost:8080/api/http/servicesList HTTP services
curl -s http://localhost:8080/api/rawdataFull dynamic config snapshot

Docker labels (minimal router)

labels: - "traefik.enable=true" - "traefik.http.routers.myapp.rule=Host(`api.example.com`)" - "traefik.http.routers.myapp.entrypoints=websecure" - "traefik.http.routers.myapp.tls.certresolver=letsencrypt" - "traefik.http.services.myapp.loadbalancer.server.port=8080"

Static config snippet (ACME)

entryPoints: web: address: ":80" websecure: address: ":443" certificatesResolvers: letsencrypt: acme: email: ops@example.com storage: /letsencrypt/acme.json httpChallenge: entryPoint: web

Kubernetes

CommandDescription
kubectl get ingressroute -ATraefik IngressRoute CRDs
kubectl get middleware -ATraefik middleware resources
kubectl describe ingressroute myroute -n mynsRoute details and events
kubectl logs -n traefik deploy/traefikTraefik controller logs

Testing routes

CommandDescription
curl -vI -H "Host: api.example.com" http://127.0.0.1/Test router match via Host header
curl -vI https://api.example.comTest TLS end-to-end
dig +short api.example.comConfirm DNS for ACME

Pro tips

  • Check the dashboard or /api/http/routers when a route "does nothing" — the router may not exist
  • traefik.enable=true is required on Docker containers; without it Traefik ignores them
  • ACME storage (acme.json) must be writable and backed up — it holds account keys
  • Middleware order matters — auth before strip-prefix, etc.

Practice scenarios

Hands-on Traefik scenarios on live Linux VMs: traefik

SadServersSadServers

Real-world Linux and DevOps scenarios for hands-on learning and technical assessment.

Uptime Robot ratio (30 days)
Product
  • Scenarios
  • For Individuals
  • For Businesses
  • Pricing
Resources
  • FAQ
  • Blog
  • Newsletter
Company
  • About Us
  • Support
  • Privacy Policy
  • Terms of Service
  • Contact
Connect With Us
info@sadservers.com

Made in Canada 🇨🇦
Updated: 2026-06-13 16:06 UTC – 2d2950a