title: How to Correctly Configure Traefik Dashboard for only port 8080?
body: <p>I am having trouble with configuring Traefik - I have a feeling this is probably a small configuration error. Below is the docker-compose file. I am trying to make WordPress use port 443, and have the Traefik dashboard on port 8080. However, the dashboard is appearing on both 443 and 8080. What could I be doing wrong here?</p>
  <pre><code>version: &quot;3.3&quot;
  
  services:
    ################################################
    ####        Traefik Proxy Setup           #####
    ###############################################
    traefik:
      image: traefik:v2.0
      restart: always
      container_name: traefik
      ports:
        - &quot;80:80&quot; # &lt;== http
        - &quot;8080:8080&quot; # &lt;== :8080 is where the dashboard runs on
        - &quot;443:443&quot; # &lt;== https
      command:
      #### These are the CLI commands that will configure Traefik and tell it how to work! ####
        ## API Settings - https://docs.traefik.io/operations/api/, endpoints - https://docs.traefik.io/operations/api/#endpoints ##
        - --api.insecure=true # &lt;== Enabling insecure api, NOT RECOMMENDED FOR PRODUCTION
        - --api.dashboard=true # &lt;== Enabling the dashboard to view services, middlewares, routers, etc...
        - --api.debug=true # &lt;== Enabling additional endpoints for debugging and profiling
        ## Log Settings (options: ERROR, DEBUG, PANIC, FATAL, WARN, INFO) - https://docs.traefik.io/observability/logs/ ##
        - --log.level=DEBUG # &lt;== Setting the level of the logs from traefik
        ## Provider Settings - https://docs.traefik.io/providers/docker/#provider-configuration ##
        - --providers.docker=true # &lt;== Enabling docker as the provider for traefik
        - --providers.docker.exposedbydefault=false # &lt;== Don't expose every container to traefik, only expose enabled ones
        - --providers.file.filename=/dynamic.yaml # &lt;== Referring to a dynamic configuration file
        - --providers.docker.network=web # &lt;== Operate on the docker network named web
        ## Entrypoints Settings - https://docs.traefik.io/routing/entrypoints/#configuration ##
        - --entrypoints.web.address=:80 # &lt;== Defining an entrypoint for port :80 named web
        - --entrypoints.web-secured.address=:443 # &lt;== Defining an entrypoint for https on port :443 named web-secured
        ## Certificate Settings (Let's Encrypt) -  https://docs.traefik.io/https/acme/#configuration-examples ##
        - --certificatesresolvers.mytlschallenge.acme.tlschallenge=true # &lt;== Enable TLS-ALPN-01 to generate and renew ACME certs
        - --certificatesresolvers.mytlschallenge.acme.email=localhost@localhost.edu # &lt;== Setting email for certs
        - --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json # &lt;== Defining acme file to store cert information
      volumes:
        - ./letsencrypt:/letsencrypt # &lt;== Volume for certs (TLS)
        - /var/run/docker.sock:/var/run/docker.sock # &lt;== Volume for docker admin
        - ./dynamic.yaml:/dynamic.yaml # &lt;== Volume for dynamic conf file, **ref: line 27
      networks:
        - web # &lt;== Placing traefik on the network named web, to access containers on this network
      labels:
      #### Labels define the behavior and rules of the traefik proxy for this container ####
        - &quot;traefik.enable=true&quot; # &lt;== Enable traefik on itself to view dashboard and assign subdomain to view it
        - &quot;traefik.http.routers.api.rule=Host(`portal.localhost.org`)&quot; # &lt;== Setting the domain for the dashboard
        - &quot;traefik.http.routers.api.service=api@internal&quot; # &lt;== Enabling the api to be a service to access
  
    ################################################
    ####         WordPress Setup Container     #####
    ##############################################
    wordpress: # &lt;== we aren't going to open :80 here because traefik is going to serve this on entrypoint 'web'
    ## :80 is already exposed from within the container ##
      image: wordpress
      restart: always
      container_name: wp
      environment:
        WORDPRESS_DB_HOST: db
        WORDPRESS_DB_USER: ${MYSQL_WP_USER}
        WORDPRESS_DB_PASSWORD: ${MYSQL_WP_PASSWORD}
        WORDPRESS_DB_NAME: ${MYSQL_WP_DATABASE}
      volumes:
        - wordpress:/var/www/html
      networks:
        - web
        - backend
      labels:
        #### Labels define the behavior and rules of the traefik proxy for this container ####
        - &quot;traefik.enable=true&quot; # &lt;== Enable traefik to proxy this container
        - &quot;traefik.http.routers.wordpress-web.rule=Host(`portal.localhost.org`)&quot; # &lt;== Your Domain Name goes here for the http rule
        - &quot;traefik.http.routers.wordpress-web.entrypoints=web&quot; # &lt;== Defining the entrypoint for http, **ref: line 30
        - &quot;traefik.http.routers.wordpress-web.middlewares=redirect@file&quot; # &lt;== This is a middleware to redirect to https
        - &quot;traefik.http.routers.wordpress-secured.rule=Host(`portal.localhost.org`)&quot; # &lt;== Your Domain Name for the https rule
        - &quot;traefik.http.routers.wordpress-secured.entrypoints=web-secured&quot; # &lt;== Defining entrypoint for https, **ref: line 31
        - &quot;traefik.http.routers.wordpress-secured.tls.certresolver=mytlschallenge&quot; # &lt;== Defining certsresolvers for https
  </code></pre>