Traefik Router Generator
Build Traefik v2 and v3 dynamic configuration in your browser
Configuration
Routers
Services
Middlewares
Generated YAML
http:
routers:
api:
rule: "Host(`api.example.com`) && PathPrefix(`/v1`)"
service: backend
entryPoints:
- websecure
middlewares:
- limit
tls:
certResolver: letsencrypt
services:
backend:
loadBalancer:
servers:
- url: http://localhost:3000
passHostHeader: true
middlewares:
limit:
rateLimit:
average: 100
burst: 50
Examples
Host plus PathPrefix rule
buildTraefikRule({ host: "api.example.com", pathPrefix: "/v1" })Host(`api.example.com`) && PathPrefix(`/v1`)Host and path clauses compose with && using Traefik's backtick matcher syntax.
Rate-limited router
generateTraefikConfig({ routers: [{ name: "api", host: "api.example.com", service: "backend", middlewares: ["limit"] }], services: [{ name: "backend", servers: ["http://127.0.0.1:3000"] }], middlewares: [{ name: "limit", type: "rateLimit", average: 100, burst: 20 }] })rateLimit: average: 100, burst: 20 + middlewares: - limitThe router references the limit middleware while the middlewares section carries the average/burst pair.
About this tool
Traefik Router Generator composes Traefik v2 file-provider YAML with generateTraefikConfig(config): routers render rule, service, optional tls: {} and middleware references in order, services render loadBalancer server URLs with passHostHeader, and middlewares render redirectScheme, basicAuth, rateLimit, stripPrefix, or headers blocks. Sections always emit in routers → services → middlewares order with an optional EntryPoints comment.
Rules are built with buildTraefikRule({ host, pathPrefix, headersRegexp }): Host, PathPrefix, and HeadersRegexp clauses use Traefik backtick syntax and join with &&, falling back to PathPrefix(`/`) when nothing is set. Values quote safely — plain tokens stay bare while strings with backticks or special characters JSON-quote — so identical inputs always yield identical YAML.
Rate limits clamp to non-negative integers (average/burst) and blank names fall back to router, service, and middleware placeholders. Everything is pure string building in the browser; hostnames, server URLs, and credential hashes never leave the device.
How to use this tool
Define routers and match rules
Set each router's host, pathPrefix, and optional header regexps — the rule composes them with && in backtick syntax.
Point routers at services
Name the backing service per router and list its server URLs, keeping the service name identical in both sections.
Attach middlewares
Add rateLimit average/burst, basicAuth users, stripPrefix prefixes, or redirectScheme entries, then reference them by name from the router.
Enable TLS and copy the YAML
Toggle tls for routers that terminate HTTPS, then paste the deterministic http: document into the Traefik file provider.
Use cases
Routing multi-tenant hosts
Split api.example.com/v1 from other hosts and paths with composed Host/PathPrefix rules.
Throttling public endpoints
Cap request bursts with average/burst rateLimit middlewares referenced from edge routers.
Protecting staging routes
Gate internal routers behind basicAuth user hashes without touching the service definitions.
Common mistakes
Mistake:Referencing a middleware name that is never defined.
Fix:Router middleware entries are plain name references — define the same name in the middlewares section or Traefik will fail to resolve it.
Mistake:Mismatching the router service name.
Fix:The service: value must equal a service section name exactly (blank falls back to service) — a typo leaves the router pointing at nothing.
Mistake:Expecting negative rate limits to error.
Fix:average and burst clamp with Math.max(0, …) instead of throwing — validate inputs yourself if negatives must be rejected.
Frequently asked questions
What does this tool do?
It builds Traefik v2 file-provider YAML with generateTraefikConfig (routers → services → middlewares) and match rules with buildTraefikRule: Host, PathPrefix, and HeadersRegexp clauses in backtick syntax joined by &&, with redirectScheme, basicAuth, rateLimit, stripPrefix, and headers middlewares.
How do tls, service refs, and rate limits behave?
tls: true adds a tls: {} block to the router; the router service value must exactly match a defined service name; rateLimit average/burst clamp to >= 0 instead of throwing.
Is my config uploaded or stored?
No. Rule composition and YAML rendering run entirely in your browser — hosts, URLs, and credential hashes never leave your device.
Why is my rule quoted in the YAML?
Rules contain backticks, which fall outside the bare-token charset, so they JSON-quote on the rule: line. The raw buildTraefikRule return stays unquoted for copying into other providers.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.