After the update from 2.8.1 to higher releases (up to the latest stable 2.8.5) error message "user-auth@file does not exist" persists. Rolling back to 2.8.1 helps to solve the issue. Obviously during the update and rolling back the corresponding file is untouched.
My configuration:
version: "3.7"
services:
traefik:
image: traefik:2.8.5
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
ports:
- 80:80
- 443:443
environment:
- CF_API_EMAIL=email@gmail.com
- CF_DNS_API_TOKEN=$TOKEN
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /home/docker/traefik/data/traefik.yml:/traefik.yml:ro
- /home/docker/traefik/data/acme.json:/acme.json
- /home/docker/traefik/data/dynamic.yml:/dynamic.yml:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=https"
- "traefik.http.routers.traefik.rule=Host(`traefik.domainname.com`)"
- "traefik.http.routers.traefik.middlewares=https-redirect@file"
- "traefik.http.routers.traefik.middlewares=user-auth@file"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=cloudflare"
- "traefik.http.routers.traefik.tls.domains[0].main=*.domainname.com"
- "traefik.http.routers.traefik.tls.domains[0].sans=domainname.com"
- "traefik.http.routers.traefik.service=api@internal"
networks:
proxy:
external:
name: proxy
default:
driver: bridge
Part of dynamic.yml has the below structure:
# Declaring the user list
http:
middlewares:
user-auth:
basicAuth:
users:
- "test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/"
Static config has following instruction where to look for a dynamic config:
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /dynamic.yml
watch: true