- Overview
- Features
- Architecture
- Prerequisites
- Installation
- Configuration
- Plugins
- Usage
- Monitoring
- Troubleshooting
- Security
- Contributing
- License
This project provides a production-ready Traefik v3 reverse proxy deployment on an ISPConfig VPS, specifically designed to coexist with existing ISPConfig services without conflicts. Perfect for hosting multiple Docker applications with automatic SSL/TLS certificates, advanced routing, and enterprise-grade security features.
- β Zero Downtime: Deployed on alternative ports (8082/8443) to avoid ISPConfig conflicts
- β Automatic SSL: Let's Encrypt integration with HTTP challenge
- β Production Security: BasicAuth, fail2ban, rate limiting, security headers
- β Easy Management: Docker Compose-based deployment
- β Plugin System: Fail2Ban, OIDC authentication, GeoBlocking support
- β Monitoring Ready: Prometheus metrics built-in
- π Automatic HTTPS with Let's Encrypt
- π³ Docker Integration - Auto-discover containers
- π Prometheus Metrics - Built-in monitoring
- π‘οΈ Security Headers - HSTS, CSP, XSS protection
- π¦ Rate Limiting - DDoS protection
- π Access Logs - JSON formatted logging
- π¨ Modern Dashboard - Real-time monitoring UI
- π« Fail2Ban - Automated IP banning for brute force protection
- π OIDC Authentication - Enterprise SSO integration (Google, Azure AD, Keycloak)
- π GeoBlocking - Country-based access control
- π BasicAuth - Simple authentication layer
| Service | Port | Purpose |
|---|---|---|
| ISPConfig Apache | 80, 443 | Web hosting (unchanged) |
| ISPConfig Admin | 8080 | Control panel (unchanged) |
| ISPConfig Webmail | 8081 | Email interface (unchanged) |
| Traefik HTTP | 8082 | Container HTTP (redirects to HTTPS) |
| Traefik HTTPS | 8443 | Container HTTPS |
| Traefik Dashboard | 8084 | Management UI |
Internet
β
Firewall (iptables)
βββ Ports 80/443 β Apache/ISPConfig (existing websites)
βββ Port 8080 β ISPConfig Admin Panel
βββ Port 8081 β Webmail
βββ Ports 8082/8443/8084 β Traefik (Docker containers)
β
traefik-public network
β
Docker Containers (auto-discovered)
- OS: Ubuntu 24.04 LTS (ARM64 or x86_64)
- ISPConfig: 3.x installed and running
- Docker: 20.10+ (automatically installed during setup)
- RAM: Minimum 4GB (8GB+ recommended)
- Disk: 10GB+ free space
- Network: Public IP with DNS access
# Clone this repository
git clone <your-repo-url>
cd traefik
# Deploy to production directory
sudo mkdir -p /opt/traefik/{config/dynamic,logs,acme}
sudo cp traefik.yml /opt/traefik/config/
sudo cp docker-compose.yml /opt/traefik/
sudo cp -r dynamic/* /opt/traefik/config/dynamic/
# Set permissions
sudo chmod 600 /opt/traefik/acme/acme.json
sudo chmod -R 755 /opt/traefik
# Start Traefik
cd /opt/traefik
sudo docker compose up -dFor step-by-step instructions with safety checks, see DEPLOYMENT_COMPLETE.md.
Located at /opt/traefik/config/traefik.yml:
# Entry Points
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
# Docker Provider
providers:
docker:
exposedByDefault: false
network: traefik-publicLocated at /opt/traefik/config/dynamic/:
security-headers.yml- HTTP security headersfail2ban-config.yml- Fail2ban plugin settingsgeoblock-config.yml- Geographic restrictions
Edit docker-compose.yml to customize:
environment:
- TZ=Etc/UTC # Change to your timezoneAutomatic IP banning after failed authentication attempts.
http:
middlewares:
fail2ban:
plugin:
fail2ban:
rules:
bantime: "3h"
maxretry: "4"Enterprise Single Sign-On with OAuth2/OIDC providers.
Supported Providers:
- Google Workspace
- Microsoft Azure AD
- Keycloak
- Auth0
- Okta
Restrict access based on visitor's country.
countries:
- "US"
- "CA"
- "GB"Create a docker-compose.yml for your app:
version: '3.8'
services:
myapp:
image: your-app:latest
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.myapp.rule=Host(`myapp.prxy.allyshipglobal.com`)"
- "traefik.http.routers.myapp.entrypoints=websecure"
- "traefik.http.routers.myapp.tls.certresolver=letsencrypt"
- "traefik.http.services.myapp.loadbalancer.server.port=80"
# Optional: Add security
- "traefik.http.routers.myapp.middlewares=security-headers@file,fail2ban@file"
networks:
traefik-public:
external: trueURL: https://prxy.allyshipglobal.com:8443/dashboard/
Credentials:
- Username:
Admin - Password: (configured during setup)
# View logs
sudo docker logs -f traefik
# Restart Traefik
cd /opt/traefik
sudo docker compose restart
# Stop Traefik
sudo docker compose down
# View container status
sudo docker psTraefik exposes Prometheus-compatible metrics:
- Endpoint:
http://localhost:8084/metrics - Metrics: Request counts, latencies, status codes
Location: /opt/traefik/logs/access.log
# Tail access logs
sudo tail -f /opt/traefik/logs/access.log
# Search for errors
sudo grep "error" /opt/traefik/logs/traefik.log# Check if Traefik is responding
curl -I http://localhost:8082
# Check dashboard
curl -u Admin:password http://localhost:8084/api/overviewProblem: Let's Encrypt certificate not generating
Solution:
- Verify DNS points to your server:
nslookup prxy.allyshipglobal.com - Check port 8082 is accessible
- Review logs:
sudo docker logs traefik | grep acme
Problem: "Address already in use"
Solution:
# Check what's using the port
sudo ss -tulnp | grep :8082
# Adjust ports in docker-compose.ymlProblem: Plugin fails to initialize
Solution:
- Check plugin version in
traefik.yml - Verify internet connectivity (plugins download on startup)
- Review logs:
sudo tail /opt/traefik/logs/traefik.log
- β TLS 1.2+ Only - Deprecated protocols disabled
- β HSTS - Force HTTPS with preload
- β CSP Headers - Content Security Policy
- β Rate Limiting - 100 req/sec default
- β Fail2Ban - Automatic IP banning
- β Docker Socket - Read-only access
- β No-New-Privileges - Container security
The dashboard is protected with:
- BasicAuth (username/password)
- HTTPS only
- Rate limiting
# Generate new password hash
htpasswd -nb Admin NewPassword | sed 's/\$/\$\$/g'
# Update in docker-compose.ymlContributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Traefik - The Cloud Native Application Proxy
- ISPConfig - Hosting Control Panel
- Let's Encrypt - Free SSL Certificates
- Traefik Plugins - Community plugins
- Documentation: See full deployment guide
- Original Prompt: View requirements
- Traefik Docs: https://doc.traefik.io/traefik/
- ISPConfig Forum: https://www.howtoforge.com/community/


