Dokploy uses Traefik as its reverse proxy and load balancer, providing automatic routing, SSL certificates, and HTTP/3 support.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dokploy/dokploy/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Traefik automatically discovers your services and configures routing based on labels and file-based configuration.Auto-Discovery
Automatically detects Docker containers and Swarm services
SSL/TLS
Let’s Encrypt integration for automatic HTTPS certificates
HTTP/3
Modern protocol support with QUIC for improved performance
Installation
Traefik is automatically installed during server setup in two modes:Standalone Mode
For single-server deployments:Swarm Service Mode
For cluster deployments:Configuration
Main Configuration
Traefik uses a maintraefik.yml configuration file:
Entry Points
Dokploy configures three entry points by default:| Entry Point | Port | Protocol | Purpose |
|---|---|---|---|
| web | 80 | TCP | HTTP traffic |
| websecure | 443 | TCP | HTTPS traffic |
| websecure | 443 | UDP | HTTP/3 (QUIC) |
Port Configuration
Customize Traefik ports via environment variables:Service Discovery
Docker Provider
Traefik watches Docker containers and Swarm services:Services must explicitly opt-in to Traefik exposure using labels or configuration.
Swarm Provider
For Docker Swarm services:File Provider
Dynamic configuration via YAML files:Dynamic Configuration
File-Based Routing
Create routing rules in/etc/dokploy/traefik/dynamic/*.yml:
Default Dokploy Configuration
Dokploy creates a default configuration for itself:Middlewares
Traefik middlewares modify requests and responses:HTTPS Redirect
Dokploy creates a default redirect middleware:Custom Middlewares
Add custom middlewares for:- Headers
- Rate Limiting
- Basic Auth
- Compression
SSL/TLS Certificates
Let’s Encrypt Integration
Traefik automatically obtains SSL certificates:Certificate Storage
Ensure proper permissions:Load Balancing
Round Robin
Default load balancing strategy:Health Checks
Enable health checking:Sticky Sessions
Maintain session affinity:HTTP/3 Support
Dokploy enables HTTP/3 (QUIC) on the websecure entry point:HTTP/3 uses UDP on port 443. Ensure your firewall allows UDP traffic on this port.
- Faster connection establishment
- Better performance on lossy networks
- Improved mobile performance
- Built-in encryption
Dashboard
Traefik includes a built-in dashboard:http://server-ip:8080/dashboard/
Enabling Dashboard Port
Add port 8080 to Traefik container:Advanced Configuration
Custom Entry Points
Add custom ports for specific services:Service Updates
Update Traefik configuration:Routing Rules
Host-Based Routing
Path-Based Routing
Combined Rules
Header-Based Routing
Best Practices
Security
Security
- Always use HTTPS in production
- Secure the dashboard with authentication
- Set proper CORS headers
- Implement rate limiting for public APIs
- Use security headers middleware
- Restrict dashboard access by IP
Performance
Performance
- Enable compression for text responses
- Use HTTP/3 for modern clients
- Configure appropriate timeouts
- Implement health checks for backends
- Use sticky sessions when needed
- Monitor Traefik metrics
Certificate Management
Certificate Management
- Use valid email for Let’s Encrypt
- Backup acme.json regularly
- Monitor certificate expiration
- Test certificate renewal
- Use staging environment for testing
Configuration
Configuration
- Use file provider for static configs
- Keep dynamic configs in version control
- Document custom middlewares
- Test routing rules before deployment
- Use meaningful router/service names
Troubleshooting
Certificate Issues
Routing Not Working
Problem: Service not accessible via domain Solutions:- Check DNS points to server IP
- Verify router configuration is loaded
- Ensure service is on dokploy-network
- Check Traefik logs for errors
- Validate rule syntax
- Test with curl:
curl -H "Host: example.com" http://localhost
Service Discovery Failures
Problem: Traefik not detecting containers Solutions:- Verify Docker socket is mounted
- Check container is on correct network
- Ensure
watch: trueis enabled - Restart Traefik container
- Check provider configuration
High Latency
Problem: Slow response times through Traefik Solutions:- Enable HTTP/3 for modern clients
- Configure compression middleware
- Check backend service health
- Review timeout settings
- Monitor Traefik resource usage
- Consider using sticky sessions
Dashboard Not Accessible
Problem: Cannot access Traefik dashboard Solutions:- Verify port 8080 is published
- Check
api.insecure: trueis set - Ensure firewall allows port 8080
- Access via
http://ip:8080/dashboard/(trailing slash required) - Review Traefik startup logs