Traefic
Updated: 03 April 2026
Traefik is a reverse proxy that plays really well with Docker (or I guess any Open Container Initiative environment)
This document doesn’t currently serve as a how-to-use-traefik page but simply as a quick reference for some handy stuff
Global Configuration
Logging
User Agent Logging
The Access Log is configured in the traefik.yml or similar file. Here’s an example configuration for ensuring that the User-Agent is in the logs
1accessLog:2 filePath: /path/to/logfile/access.log3 format: json4 bufferingSize: 1005
6 fields:7 headers:8 names:9 User-Agent: keepMiddleware
Redirect to HTTPS
You obviously want to use HTTPS wherever possible, the config for this in the middlewares.yml file can be added to http.middlewares:
1http:2 middlewares:3 redirect-to-https:4 redirectScheme:5 scheme: https6 permanent: trueRate Limiting
To avoid getting spammed by bots, you may want to implement some rate limiting, you can do this with the rateLimit middleware which can be added to your middlewares.yml file in http.middlewares
1http:2 middlewares:3 general-rate-limit:4 rateLimit:5 average: 1006 period: 1s7 burst: 200