Basic Auth not working

Hi All,

im trying to get basic auths working on the dashboard for traefix and it doesnt seem to be working, i.e the dashboard launches but doesnt request a password, any ideas?

version: "3.3"

services:
  traefik:
    image: traefik:latest
    restart: always
    container_name: traefik
    ports:
      - "81:80" # <== http
      - "444:443" # <== https
    command:
      - --entrypoints.websecure.address=:443
      - --api.insecure=false # <== Enabling insecure api, NOT RECOMMENDED FOR PRODUCTION
      - --api.dashboard=true # <== Enabling the dashboard to view services, middlewares, routers, etc...
      - --api.debug=true # <== Enabling additional endpoints for debugging and profiling
      - --log.level=DEBUG # <== Setting the level of the logs from traefik
      - --providers.docker=true # <== Enabling docker as the provider for traefik
      - --providers.docker.exposedbydefault=false # <== Don't expose every container to traefik, only expose enabled ones
      - --providers.file.filename=/dynamic.yaml # <== Referring to a dynamic configuration file
      - --providers.docker.network=web # <== Operate on the docker network named web
      - --entrypoints.web.address=:80 # <== Defining an entrypoint for port :80 named web
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock # <== Volume for docker admin
      - ./dynamic.yaml:/dynamic.yaml # <== Volume for dynamic conf file, **ref: line 27
    networks:
      - web # <== Placing traefik on the network named web, to access containers on this network
    labels:
      - "traefik.enable=true" # <== Enable traefik on itself to view dashboard and assign subdomain to view it
      - "traefik.http.routers.api.rule=Host(`test.example.com`)" # <== Setting the domain for the dashboard - made up for forum
      - "traefik.http.routers.api.service=api@internal" # <== Enabling the api to be a service to access
      - "traefik.http.routers.traefik.middlewares=traefik-auth"
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.middlewares.traefik- auth.basicauth.users=Paul:(undisclosed -HASH)"

networks:
  web:
    external: true

Got in working by adding it into the dynamic.Yaml file instead. as per the guides.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.