# Traefik 3 - 404- api dashboard

**URL:** <https://community.traefik.io/t/traefik-3-404-api-dashboard/26674>\
**Category:** Traefik v3 (latest)\
**Tags:** dashboard-api, docker\
**Created:** [February 27, 2025, 3:53pm UTC](https://community.traefik.io/t/traefik-3-404-api-dashboard/26674 "2025-02-27T15:53:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigAboo80](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/bigaboo80/32/747_2.png) [@bigAboo80](https://community.traefik.io/u/bigAboo80)\
**Post date:** [February 27, 2025, 3:53pm UTC](https://community.traefik.io/t/traefik-3-404-api-dashboard/26674/1 "2025-02-27T15:53:00Z")

</div>

Hi - can connect to api dashboard - please help -

> **docker-compose.yml**
>
> services:
> 
> # Traefik 3 - Reverse Proxy
> 
> traefik:  
> container\_name: traefik  
> image: traefik:3.3.4  
> security\_opt:  
> - no-new-privileges:true  
> restart: unless-stopped  
> # profiles: ["core", "all"]  
> networks:  
> t3\_proxy:  
> ipv4\_address: 192.168.90.254 # You can specify a static IP  
> socket\_proxy:  
> command: # CLI arguments  
> #- --global.checkNewVersion=true  
> #- --global.sendAnonymousUsage=true  
> - --entrypoints.web.address=:80  
> - --entrypoints.websecure.address=:443  
> - --entrypoints.traefik.address=:8080  
> - --entrypoints.websecure.http.tls=true  
> - --entrypoints.web.http.redirections.entrypoint.to=websecure  
> - --entrypoints.web.http.redirections.entrypoint.scheme=https  
> - --entrypoints.web.http.redirections.entrypoint.permanent=true  
> - --api=true  
> - --api.dashboard=true  
> - --api.insecure=true  
> #- --serversTransport.insecureSkipVerify=true  
> # Allow these IPs to set the X-Forwarded-\* headers - Cloudflare IPs: [IP Ranges](https://www.cloudflare.com/ips/)  
> - --entrypoints.websecure.forwardedHeaders.trustedIPs=$CLOUDFLARE\_IPS,$LOCAL\_IPS  
> - --log=true  
> - --log.filePath=/logs/traefik.log  
> - --log.level=DEBUG # (Default: error) DEBUG, INFO, WARN, ERROR, FATAL, PANIC  
> - --accessLog=true  
> - --accessLog.filePath=/logs/access.log  
> - --accessLog.bufferingSize=100 # Configuring a buffer of 100 lines  
> - --accessLog.filters.statusCodes=204-299,400-499,500-599  
> - --providers.docker=true  
> #- --providers.docker.endpoint=unix:///var/run/docker.sock # Disable for Socket Proxy. Enable otherwise.  
> - --providers.docker.endpoint=tcp://socket-proxy:2375 # Enable for Socket Proxy. Disable otherwise.  
> - --providers.docker.exposedByDefault=false  
> - --providers.docker.network=t3\_proxy  
> # - --providers.docker.swarmMode=false # Traefik v2 Swarm  
> # - --providers.swarm.endpoint=tcp://127.0.0.1:2377 # Traefik v3 Swarm  
> - --entrypoints.websecure.http.tls.options=tls-opts@file  
> # Add dns-cloudflare as default certresolver for all services. Also enables TLS and no need to specify on individual services  
> - --entrypoints.websecure.http.tls.certresolver=dns-cloudflare  
> - --entrypoints.websecure.http.tls.domains[0].main=$DOMAINNAME\_1  
> - --entrypoints.websecure.http.tls.domains[0].sans=_.$DOMAINNAME\_1  
> # - --entrypoints.websecure.http.tls.domains[1].main=$DOMAINNAME\_2 # Pulls main cert for second domain  
> # - --entrypoints.websecure.http.tls.domains[1].sans=_.$DOMAINNAME\_2 # Pulls wildcard cert for second domain  
> - --providers.file.directory=/rules # Load dynamic configuration from one or more .toml or .yml files in a directory  
> - --providers.file.watch=true # Only works on top level files in the rules folder  
> - --certificatesResolvers.dns-cloudflare.acme.caServer=[https://acme-staging-v02.api.letsencrypt.org/directory](https://acme-staging-v02.api.letsencrypt.org/directory) # LetsEncrypt Staging Server - uncomment when testing  
> - --certificatesResolvers.dns-cloudflare.acme.storage=/acme.json  
> - --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.provider=cloudflare  
> - --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.resolvers=1.1.1.1:53,1.0.0.1:53  
> - --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.delayBeforeCheck=90 # To delay DNS check and reduce LE hitrate  
> ports:  
> - target: 80  
> published: 80  
> protocol: tcp  
> mode: host  
> - target: 443  
> published: 443  
> protocol: tcp  
> mode: host  
> - target: 8080 # need to enable --api.insecure=true  
> published: 8080  
> protocol: tcp  
> mode: host  
> volumes:  
> - $DOCKERDIR/appdata/traefik3/rules/$HOSTNAME:/rules # Dynamic File Provider directory  
> #- /var/run/docker.sock:/var/run/docker.sock:ro # Enable if not using Socket Proxy  
> - $DOCKERDIR/appdata/traefik3/acme/acme.json:/acme.json # Certs File  
> - $DOCKERDIR/logs/traefik:/logs # Traefik logs  
> environment:  
> - TZ=$TZ  
> - CF\_DNS\_API\_TOKEN\_FILE=/run/secrets/cf\_dns\_api\_token  
> - HTPASSWD\_FILE=/run/secrets/basic\_auth\_credentials # HTTP Basic Auth Credentials  
> - DOMAINNAME\_1 # Passing the domain name to traefik container to be able to use the variable in rules.  
> secrets:  
> - cf\_dns\_api\_token  
> - basic\_auth\_credentials  
> labels:  
> - "traefik.enable=true"  
> # HTTP Routers  
> - "traefik.http.routers.traefik-rtr.entrypoints=websecure"  
> - "traefik.http.routers.traefik-rtr.rule=Host(`traefik.$DOMAINNAME_1`)"  
> # Services - API  
> #- "traefik.http.routers.traefik-rtr.service=api@internal"  
> # Middlewares  
> - "traefik.http.routers.traefik-rtr.middlewares=middlewares-basic-auth@file" #

> **socket\_proxy:.yml**
>
> services:
> 
> # Docker Socket Proxy - Security Enchanced Proxy for Docker Socket
> 
> socket-proxy:  
> container\_name: socket-proxy  
> image: tecnativa/docker-socket-proxy  
> security\_opt:  
> - no-new-privileges:true  
> restart: unless-stopped  
> # profiles: ["core", "all"]  
> networks:  
> socket\_proxy:  
> ipv4\_address: 192.168.91.254 # You can specify a static IP  
> privileged: true # true for VM. false for unprivileged LXC container on Proxmox.  
> ports:  
> - "127.0.0.1:2375:2375" # Do not expose this to the internet with port forwarding  
> volumes:  
> - "/var/run/docker.sock:/var/run/docker.sock"  
> environment:  
> - LOG\_LEVEL=info # debug,info,notice,warning,err,crit,alert,emerg  
> ## Variables match the URL prefix (i.e. AUTH blocks access to /auth/\* parts of the API, etc.).  
> # 0 to revoke access.  
> # 1 to grant access.  
> ## Granted by Default  
> - EVENTS=1  
> - PING=1  
> - VERSION=1  
> ## Revoked by Default  
> # Security critical  
> - AUTH=0  
> - SECRETS=0  
> - POST=1 # Watchtower  
> # Not always needed  
> - BUILD=0  
> - COMMIT=0  
> - CONFIGS=0  
> - CONTAINERS=1 # Traefik, Portainer, etc.  
> - DISTRIBUTION=0  
> - EXEC=0  
> - IMAGES=1 # Portainer  
> - INFO=1 # Portainer  
> - NETWORKS=1 # Portainer  
> - NODES=0  
> - PLUGINS=0  
> - SERVICES=1 # Portainer  
> - SESSION=0  
> - SWARM=0  
> - SYSTEM=0  
> - TASKS=1 # Portainer  
> - VOLUMES=1 # Portainer

Broke my head already

---

<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:** [February 27, 2025, 7:52pm UTC](https://community.traefik.io/t/traefik-3-404-api-dashboard/26674/2 "2025-02-27T19:52:29Z")

</div>

Use 3 backticks before and after code/config to make it readable and preserve spacing, which is important in yaml.

Check [simple Traefik socketproxy example](https://github.com/bluepuma77/traefik-best-practice/tree/main/docker-traefik-socket-proxy).
