How to configure Traefik 2 with TLS - Traefik 2 & TLS 101

If you run in Docker network host mode, you only need proxyProtocol when you have another node/container like a load balancer in front of Traefik.

Alternatively to full host mode you can only expose the required ports in host mode.

docker-compose.yml:

version: '3.9'

services:
  traefik:
    image: traefik:v2.9
    ports:
      - target: 80
        published: 80
        protocol: tcp
        mode: host
      - target: 443
        published: 443
        protocol: tcp
        mode: host
    …