/major-ai-skills:traefikfrom major-ai-skills
Deploy Traefik v3 edge routing with Docker/Kubernetes providers, middleware chains, ACME TLS (acme.json mode 600), and exposedbydefault=false so agents do not accidentally publish every container.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Traefik is a dynamic HTTP reverse proxy / ingress: EntryPoints (ports) → Routers (rules + TLS) → Middlewares → Services (upstreams). Providers (Docker, Kubernetes IngressRoute/CRDs, Consul, Nomad) discover backends without static upstream reloads. ACME (Let's Encrypt) stores certs in acme.json (mode 600)—persist it or crash-loops burn LE rate limits. Always set exposedByDefault=false on Docker hosts so unlabeled containers stay private.
┌─────────────────────────────────────────────────────────────┐
│ Traefik request pipeline (v3) │
│ │
│ Client → EntryPoints (web :80, websecure :443) │
│ └── optional HTTP→HTTPS redirect at entrypoint │
│ │
│ Routers: Host(`api.example.com`) && PathPrefix(`/v1`) │
│ └── TLS certResolver (ACME TLS/HTTP/DNS challenge)│
│ │
│ Middlewares (order matters): rateLimit → auth → stripPrefix│
│ │
│ Services: LB + healthcheck → container/pod upstreams │
│ Providers: Docker labels | K8s CRDs | file | Consul/Nomad │
└─────────────────────────────────────────────────────────────┘
Use when
@nginx upstream files when backends churn often.Do not use when
@consul Connect or mesh product.exposedByDefault=true on a busy multi-stack host “for convenience” → refuse; require explicit traefik.enable=true.providers.docker.exposedbydefault=false always; only label intended public services with traefik.enable=true.providers.docker.network=proxy) so Traefik and backends share connectivity; set explicit loadbalancer.server.port.acme.json mode 600 and persist across restarts; use LE staging caServer while experimenting to avoid rate limits.web → websecure), not duplicated on every router.mkdir -p letsencrypt
touch letsencrypt/acme.json && chmod 600 letsencrypt/acme.json
compose.yaml:
services:
traefik:
image: traefik:v3.4
restart: unless-stopped
security_opt: [no-new-privileges:true]
ports: ["80:80", "443:443"]
networks: [proxy]
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./letsencrypt/acme.json:/acme.json
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=proxy
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:443
- [email protected]
- --certificatesresolvers.le.acme.storage=/acme.json
- --certificatesresolvers.le.acme.tlschallenge=true
# While testing: --certificatesresolvers.le.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
labels:
- traefik.enable=true
- traefik.http.middlewares.sec-headers.headers.stsSeconds=31536000
- traefik.http.middlewares.sec-headers.headers.frameDeny=true
- traefik.http.middlewares.sec-headers.headers.contentTypeNosniff=true
app:
image: traefik/whoami:v1.10
restart: unless-stopped
networks: [proxy]
labels:
- traefik.enable=true
- traefik.http.routers.app.rule=Host(`app.example.com`)
- traefik.http.routers.app.entrypoints=websecure
- traefik.http.routers.app.tls.certresolver=le
- traefik.http.routers.app.middlewares=sec-headers
- traefik.http.services.app.loadbalancer.server.port=80
networks:
proxy:
name: proxy
Validation:
docker compose config
docker compose up -d
docker logs traefik 2>&1 | tail -n 50
curl -I http://app.example.com # expect redirect to https
openssl s_client -connect app.example.com:443 -servername app.example.com </dev/null
Prefer Traefik IngressRoute CRDs (or Ingress) with explicit Entrypoint/TLS; keep dashboard and API bound to internal networks only. Pair with @kubernetes / @helm chart values—never expose the dashboard publicly without auth middleware.
| Signature | Likely cause | Fix path |
|---|---|---|
permissions of acme.json are too open | Host umask created 0644/0660 | chmod 600 acme.json; restart Traefik |
| ACME rate limit / repeated issuance | acme.json not persisted; crash loop | Persist volume; use staging CA while debugging |
| 404 on configured Host | Rule mismatch / not enabled / wrong entrypoint | Confirm Host(...) exact; traefik.enable=true; router entrypoints |
| 502 Bad Gateway | Wrong internal port or networks isolated | Set loadbalancer.server.port; join shared proxy network |
| Intermittent 522 / config churn | exposedbydefault=true on busy host | Set false; enable only public services (upstream reports) |
| TLS challenge timeout | Port 80/443 blocked or DNS A/AAAA wrong | Fix DNS/firewall; consider DNS challenge |
| Middleware conflict | Same middleware name, different params | Unique middleware names; reference once |
| Cert works then “unknown resolver” | acme.json perms flipped after upgrade | Init/chmod 600 before start |
@docker Compose graphs or @kubernetes IngressRoute—not both fighting for :443 on one IP without a plan.Host() rule in the repo README.@docker — Compose networks, labels, and socket mounts@kubernetes / @helm — IngressRoute / chart installs@consul / @nomad — alternate discovery providers@nginx — static reverse-proxy alternative@vault — secrets for DNS challenge providers (not in Git)MANDATORY: Set
exposedbydefault=falseand explicittraefik.enable=trueon public services only. Persistacme.jsonwith mode 600; use staging ACME while experimenting. Put Traefik and backends on a shared network with explicit upstream ports. Never invent ACME/DNS API credentials.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job