Traefik Setup Guide - ajgillis04/GillisDockerDepot GitHub Wiki
Traefik Setup Guide
Introduction
Traefik is an open-source Edge Router that makes deploying microservices easy. It acts as a reverse proxy and load balancer, automatically managing your application's routing and SSL/TLS certificates.
⚠️ Deprecated Setup
This guide is no longer maintained. I've migrated to a Cloudflared-based tunnel and access setup, which simplifies routing and authentication.
See the updated guide here: Cloudflared Tunnel + Access Setup
Prerequisites
- Docker installed
- Traefik container running in your Docker stack
Configuration Steps
Step 1: Accessing the Traefik UI
- Open your browser and navigate to
http://<your-ip-address>:8080. - Log in with your Traefik credentials.
Step 2: Initial Setup Wizard
- Follow the initial setup wizard to configure basic settings.
- Choose your preferred language for the Traefik interface.
Step 3: Configuring EntryPoints
- Navigate to the
Configurationtab. - Go to the
EntryPointssection. - Define the entry points for your services, such as HTTP and HTTPS.
- Click
Save.
Step 4: Configuring Providers
- Navigate to the
Providerstab. - Add providers such as Docker, Kubernetes, or file-based configuration.
- Enter the necessary connection details and settings for each provider.
- Click
Save.
Step 5: Configuring Routers
- Go to the
Routerstab. - Define the routers to manage the traffic between entry points and services.
- Configure routing rules, middleware, and SSL/TLS settings.
- Click
Save.
Step 6: Configuring Services
- Navigate to the
Servicestab. - Define the services that Traefik will manage.
- Enter the service details, such as load balancing and health check options.
- Click
Save.
Step 7: Setting Up Let's Encrypt
- Go to the
Certificatestab. - Enable Let's Encrypt for automatic SSL/TLS certificate management.
- Configure the ACME settings and enter your email address for certificate notifications.
- Click
Save.
Step 8: Monitoring and Logs
- Navigate to the
Dashboardtab. - Monitor the status of your services, entry points, and routers.
- Use the logs and metrics to troubleshoot and optimize your setup.
Notes
- Ensure all paths and environment variables are updated in the
traefik.yamlfile. - Regularly backup your
configdirectory to save your settings.
Troubleshooting
- Common Issues: List common issues and solutions.
- Logs: Check Traefik logs for error messages.
- Support: Link to the Traefik community and support resources.