This is a community guide and not officially supported. For issues, contributions, or bug reports, please use the official GitHub repository.
What is Middleware Manager?
The Middleware Manager is a microservice that extends your existing traefik deployments.It provides a web UI to attach Traefik middlewares to resources without editing Pangolin itself. :warning: Security Warning
Middlewares can strengthen security but also create vulnerabilities if misconfigured.
- Test in staging before production.
- Misusing forward authentication can leak credentials.
- Bad rate limiter configs may be bypassed.
- Header misconfigurations can expose apps to XSS/CSRF.
- Stacking too many middlewares impacts performance.
- Always check provider references (
@httpvs@file).
Key Use Cases
- External authentication (Authelia, Authentik, JWT)
- Security headers and CSP policies
- Geographic IP blocking
- Rate limiting / DDoS protection
- Redirects & path rewrites
- CrowdSec and other security tool integrations
Prerequisites
- A running Pangolin v1.0.0+
- Docker + Docker Compose
- Basic Traefik knowledge
- Admin access to your Pangolin host
Step 1: Add Middleware Manager Service
Update yourdocker-compose.yml:
Step 2: Create Required Directories
./config/traefik/rules.
Step 3: Update Traefik Volumes & Providers
In yourtraefik service:
traefik_config.yml:
Step 4: Start Services
Step 5: Access the UI
Middleware Manager runs at: 👉 http://localhost:3456Common Middleware Examples
Rate Limiting
Security Headers
Troubleshooting
- Service does not exist → Check
@httpor@filesuffix in references - Middleware does not exist → Verify config and required plugins
- No changes applied → Check Traefik logs, middleware priority, restart services
- UI not showing resources → Confirm
PANGOLIN_API_URLand network connectivity - Database errors → Check
./datapermissions, or resetmiddleware.db - **CrowdSec errors → Ensure the crowdsec container is running; middlewares fail if the service is down.
- Protecting Pangolin itself → Apply middlewares (e.g. geoblock, headers) directly on the websecure entryPoint to cover all traffic.
- Applying to many services → Attach middleware to entryPoints instead of individual resources to cover all subdomains at once.
- TCP / SMTP with STARTTLS → Not supported. Traefik cannot handle STARTTLS negotiation (only implicit TLS like SMTPS on 465).
Final Notes
The Middleware Manager gives you a UI to work with Traefik’s powerful middleware ecosystem.- Start with simple configs → test thoroughly → expand gradually.
- Use templates where possible.
- Always validate in staging before production.

