# Unable to connect to dashboard on port 8080

**URL:** <https://community.traefik.io/t/unable-to-connect-to-dashboard-on-port-8080/21696>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [March 3, 2024, 2:37pm UTC](https://community.traefik.io/t/unable-to-connect-to-dashboard-on-port-8080/21696 "2024-03-03T14:37:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![markus](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@markus](https://community.traefik.io/u/markus)\
**Post date:** [March 3, 2024, 2:37pm UTC](https://community.traefik.io/t/unable-to-connect-to-dashboard-on-port-8080/21696/1 "2024-03-03T14:37:08Z")

</div>

Hello,

I'm using Traefik for the first time and have tried to install Traefik version 2.11. I also wanted to activate the dashboard to get a better overview. I can't get the dashboard to run on port 8080. Every time I try, I get the message that port 8080 is already in use. However, the port is free, as confirmed by both docker ps and netstat. I have now changed the port to 8081, and then I can access the dashboard. Now both entry points are displayed, even though 8080 is not configured. Before changing the port, I deleted all containers, ran a docker system prune, and restarted the VPS. Does anyone have an idea what I'm doing wrong?

docker-compose.yml

```auto
---
# -- (Optional) When using a custom network
# networks:
# your-traefik-network:
# external: true
services:
  traefik:
    image: traefik:v2.11.0
    container_name: traefik
    ports:
      - 80:80
      - 443:443
      # -- (Optional) Enable Dashboard, don't do in production
      - 8081:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./config/traefik.yml:/etc/traefik/traefik.yml:ro
      - ./letsencrypt:/letsencrypt
      - ./logs/:/var/log/traefik/traefik.log
    # -- (Optional) When using Cloudflare as Cert Resolver
    # environment:
    # - CF_DNS_API_TOKEN=your-cloudflare-api-token
    # -- (Optional) When using a custom network
    # networks:
    # - your-traefik-network
    restart: unless-stopped

```

traefik.yml

```auto
global:
  checkNewVersion: true
  sendAnonymousUsage: true

# -- (Optional) Change Log Level and Format here...
# - loglevels [DEBUG, INFO, WARNING, ERROR, CRITICAL]
# - format [common, json, logfmt]
log:
  level: DEBUG
  format: common
  filePath: /var/log/traefik/traefik.log

# -- (Optional) Enable Accesslog and change Format here...
# - format [common, json, logfmt]
# accesslog:
# format: common
# filePath: /var/log/traefik/access.log

# -- (Optional) Enable API and Dashboard here, don't do in production
api:
  dashboard: true
  insecure: true

# -- Change EntryPoints here...
entryPoints:
  web:
    address: :80
    # -- (Optional) Redirect all HTTP to HTTPS
    # http:
    # redirections:
    # entryPoint:
    # to: websecure
    # scheme: https
  websecure:
    address: :443
  # -- (Optional) Add custom Entrypoint
  custom:
    address: :8081

# -- Configure your CertificateResolver here...
# certificatesResolvers:
staging:
  acme:
    email: email@host.com
    storage: /letsencrypt/acme.json
    caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
# -- (Optional) Remove this section, when using DNS Challenge
    httpChallenge:
      entryPoint: web
# -- (Optional) Configure DNS Challenge
# dnsChallenge:
# provider: your-resolver (e.g. cloudflare)
# resolvers:
# - "1.1.1.1:53"
# - "8.8.8.8:53"
production:
  acme:
    email: email@host.com
    storage: /letsencrypt/acme.json
    caServer: "https://acme-v02.api.letsencrypt.org/directory"
# -- (Optional) Remove this section, when using DNS Challenge
    httpChallenge:
      entryPoint: web
# -- (Optional) Configure DNS Challenge
# dnsChallenge:
# provider: your-resolver (e.g. cloudflare)
# resolvers:
# - "1.1.1.1:53"
# - "8.8.8.8:53"

# -- (Optional) Disable TLS Cert verification check
# serversTransport:
# insecureSkipVerify: true

# -- (Optional) Overwrite Default Certificates
# tls:
# stores:
# default:
# defaultCertificate:
# certFile: /etc/traefik/certs/cert.pem
# keyFile: /etc/traefik/certs/cert-key.pem
# -- (Optional) Disable TLS version 1.0 and 1.1
# options:
# default:
# minVersion: VersionTLS12

providers:
  docker:
    # -- (Optional) Enable this, if you want to expose all containers automatically
    exposedByDefault: false
  file:
    directory: /etc/traefik/
    watch: true

```

docker ps

```auto
NAMES IMAGE CONTAINER ID SIZE NETWORKS PORTS
traefik traefik:v2.11.0 646e22d12fa9 0B (virtual 159MB) traefik_default 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:8081->8080/tcp, :::8081->8080/tcp
portainer_agent portainer/agent:2.19.4 993c55c61473 2.73kB (virtual 212MB) portainer-agent_default 0.0.0.0:9001->9001/tcp, :::9001->9001/tcp

```

traefik log

```auto
traefik | 2024/03/03 14:05:23 traefik.go:80: command traefik error: error while building entryPoint traefik: error preparing server: error opening listener: listen tcp :8080: bind: address already in use
traefik exited with code 0

```

 ![traefik](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/b5c3791044039ed1ef1cfa75469afd2b773ea5f1.png)

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [March 3, 2024, 6:07pm UTC](https://community.traefik.io/t/unable-to-connect-to-dashboard-on-port-8080/21696/2 "2024-03-03T18:07:23Z")

</div>

> [@markus](#):
>
> ```auto
> api:
> dashboard: true
> insecure: true
> 
> ```

enables Traefik dashboard on internal port 8080.

You map it to external container port 8081:

```auto
    ports:
      - 80:80
      - 443:443
      # -- (Optional) Enable Dashboard, don't do in production
      - 8081:8080

```

so it’s available at URL:

```auto
http://example.com:8081/dashboard/

```

You also create an internal Traefik `entrypoint` on port 8081, which has no effect on dashboard:

```auto
  custom:
    address: :8081

```

* * *

Check [simple Traefik example](https://github.com/bluepuma77/traefik-best-practice/tree/main/docker-traefik-dashboard-letsencrypt) how to access dashboard on regular https `entrypoint`.

* * *

Regarding used port 8080 on host, try:

```auto
docker run -p 8080:80 traefik/whoami

```

---

<div class="post-metadata">

**Author:** ![markus](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@markus](https://community.traefik.io/u/markus)\
**Post date:** [March 4, 2024, 11:08am UTC](https://community.traefik.io/t/unable-to-connect-to-dashboard-on-port-8080/21696/3 "2024-03-04T11:08:03Z")

</div>

Thank you very much for your help.

The docker run command does not work as well. Same message, the port is already in use.  
And again I have checked docker ps and netstat. Both show no port assignment for 8080.

I dont get it where the port assignment is coming from. I will erase the VPS and try it again.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [March 4, 2024, 2:51pm UTC](https://community.traefik.io/t/unable-to-connect-to-dashboard-on-port-8080/21696/4 "2024-03-04T14:51:00Z")

</div>

Did you run `sudo netstat -tulpn`?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [March 12, 2024, 7:46pm UTC](https://community.traefik.io/t/unable-to-connect-to-dashboard-on-port-8080/21696/5 "2024-03-12T19:46:00Z")

</div>

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