Middlewares Tab
The Middlewares tab manages all middleware definitions stored in dynamic.yml. Middlewares can be attached to HTTP routes to add auth, rate limiting, redirects, header injection, and more.
What it shows
- Middleware name and type
- Live status from the Traefik API (enabled / warning / error)
- Protocol badge (HTTP / TCP)
- Edit and delete controls
Views
Toggle between grid (default) and list view using the button in the filter bar. List view shows Protocol, Name, Config File, and action buttons in a compact table.
Creating a middleware
Click Add Middleware in the top bar.
| Field | Description |
|---|---|
| Name | Unique identifier - referenced in routes as name@file |
| Template | Pick a preset or choose Custom to write raw YAML |
| Config File | Shown when multiple config files are mounted (CONFIG_DIR / CONFIG_PATHS). Select an existing file or choose + New file... to type a filename - the file is created automatically in CONFIG_DIR. Auto-suggests middlewares-<name>.yml. |
Wizard mode
Every template switches to Wizard mode - a structured form with labeled fields instead of raw YAML. Click YAML to switch back to the editor at any time. When you save in wizard mode the YAML is generated automatically.
Available templates
| Category | Templates |
|---|---|
| Auth | Basic Auth, Digest Auth, Forward Auth, Forward Auth (Authentik), Forward Auth (Authelia), Forward Auth (Gatekeeper) |
| Security | IP Allow List, IP Allow List (Private Ranges), Rate Limit, Secure Headers, CORS Headers |
| Routing | Redirect to HTTPS, Redirect Regex, Strip Prefix, Add Prefix, Replace Path |
| Advanced | Gzip Compress, Retry, Circuit Breaker, Buffering, Middleware Chain, In-Flight Limit |
Middleware ordering in routes
When attaching middlewares to a route, order matters - Traefik processes them left to right. The middleware chip selector in the route form shows selected middlewares first (numbered by position) with a divider before unselected ones, so you can see the processing order at a glance.
Editing a middleware
Click the pencil icon on any middleware card.
Attaching a middleware to a route
When creating or editing a route, enter middleware names in the Middlewares field as a comma-separated list, e.g. auth@file, redirect-https@file. The @file suffix tells Traefik the middleware is defined in the file provider.
How it works
Middleware definitions are written to the dynamic config under http.middlewares. When multiple config files are mounted, each middleware card shows a small badge with its source file. traefik-manager reads the live status for each from the Traefik API (/api/http/middlewares).