Disabling 'Traefik' Entrypoint

Hi,

I've got my docker/traefik set-up so I can reach the dashboard and api over port 80. Therefore entrypoint 'Traefik' on port 8080 becomes obsolete, how can I disable this entrypoint or prevent it from being created?

Why I also want this besides cleaning up and closing unnecessary ports: I haven't found the correct syntax to set the default entrypoints, currently these are ['web', 'websecure', 'traefik']

Kind regards,
Frederic Depuydt

Hello,

could you provide your static configuration?

The entrypoint traefik is created only when specific options are enabled (api.insecure, ping, ...)

In the v2, the default entrypoints are all entrypoints, you have to set explicitly the entrypoint on the router to reduce the scope.

1 Like

I indeed have the api and ping enabled in the traefik.toml configuration:

# Enable API and dashboard
[api]

  dashboard = true
  insecure = false

  # Name of the related entry point
  #
  # Optional
  # Default: "traefik"
  #
  # entryPoint = "traefik"

# Enable ping
[ping]


Is it necessary to have this enabled in this manner when I'm instead using traefik itself to access it? I've included the docker-compose I'm using:

version: '3.7'

services:
  traefik:
    container_name: traefik
    image: traefik:latest
    restart: always
    ports:
      - 80:80
      - 443:443
      #- 8080:8080
    networks:
      - web
    #read_only: true
    volumes:
      - traefik-conf:/etc/traefik:ro
      - traefik-acme:/etc/acme
      - /var/run/docker.sock:/var/run/docker.sock:ro
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.rule=Host(`traefik.mydomain.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
      - "traefik.http.routers.traefik.service=api@internal"
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.routers.traefik.tls.certresolver=tls"

networks:
  web:
    external: true

volumes:
  traefik-conf:
    name: traefik-conf
  traefik-acme:
    name: traefik-acme

So the traefik entrypoint is created due to [ping].

You can chnage the ping entry point: https://docs.traefik.io/v2.0/operations/ping/#entrypoint

1 Like

Thank you, changing the entrypoint for the [ping] did indeed solve this issue.
Would there be any negative consequences when setting the web and websecure as entrypoints for the [ping] functionallity?