TLTR#
On GitHub you can find a repository with some examples of traefik (version 2.x) configuration. You find the docker-compose and the guide on how to use this.
Feel free to report the issue if something is not working.
Intro#
I have no trouble saying that I am a bad developer (no problem is not my work). In my home network, I play with some systems. For 2-3 years I experiment with docker and my container number it’s growing every month. Sometimes it is only a test and the container lives for a few hours. But there is a group of services that are important for my home, like:
- wifi and network controller
- automation manager
- time database for house sensors
- sensor data visualization
- container update manager
Really important for me is the use of SSL certificates and so I can avoid this boring message on the browser that the site is not sure. Or the self-signed certificate is not valid. I need Let’s Encrypt to generate the certificates, but I don’t want to configure every container with a single certificate and renew it every 90 days.
With some research on the Internet, I have found traefik and some other reverse-proxy. My choice was sure for traefik, but before I managed this its took me some time.
Prerequisites#
- a domain that you own
- optional: CloudFlare account (for DNS challenge)
- docker and docker-compose installation
Example structure#
On my GitHub repository, you can find some examples of traefik configuration. I suggest you follow this order if you try traefik for the first time.
- Basic: basic configuration and SSL certificates
- File provider: connect services outside docker
- Dashboard: secure the traefik dashboard
- OAuth: secure access to defined websites
How to use#
- In the root directory of the repo, you find the - var.envfile. It contain all your’s variables that are used in these examples. Change the name in- .envand place it in the same directory as the- docker-compose.yml.
- There is a separate folder for every example you find a - docker-compose.ymlfile with all needed configuration to run the case. In the same directory, you find a- README.mdwith steps to follow.
- Enjoy it! 
Help#
If you find some error or improving possibilities please create a new issue on GitHub. Wen can improve these examples.


