How to fix Traefik Dashboard/API 404 page not found "api is not enabled"
Problem:
You are trying to configure the Traefik API/Dashboard in a secure way, but every time you try to access the API, you’re only getting a 404 error (unless you set api.insecure=true)
In the logs, you see an error message like this: (if log.level = "DEBUG"):
traefik_api_error_log.txt
traefik | time="2020-09-20T22:53:51Z" level=error msg="api is not enabled" routerName=my-api@file entryPointName=websecureSolution
You have to pass --api=true to Traefik, e.g. using docker-compose:
docker_compose_traefik_command.yml
command:
- "--api=true"and also set
traefik_api_toml_snippet.toml
[api]
dashboard = truein your traefik.toml.
After that, restart Traefik and you should be able to access your dashboard at /dashboard.
Credits to multiple GitHub users for the original solution.
Check out similar posts by category:
Traefik
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow