Help re-configuring Traefik error 404

This configuration was working perfectly on 2.11.2
i changed my server to another home and im having issues, getting error 404.

This is my docker-compose.yml


version: '3.9'

networks:
  traefik_proxy:
    name: traefik_proxy
    ipam:
      config:
        - subnet: ${TRAEFIK_SUBNET}

services:
  traefik:
    image: traefik:v2.11.2
    container_name: traefik
    security_opt:
      - no-new-privileges:true
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - CF_API_EMAIL=${CLOUDFLARE_EMAIL}
      - CF_DNS_API_TOKEN=${CLOUDFLARE_API_TOKEN}
    # - CF_API_KEY=YOU_API_KEY
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      # CONFIG TO LOAD
      - '${CHANGE_TO_COMPOSE_DATA_PATH}/appdata/traefik/config/traefik.yml:/traefik.yml:ro'
      - '${CHANGE_TO_COMPOSE_DATA_PATH}/appdata/traefik/config/acme.json:/acme.json'
      - '${CHANGE_TO_COMPOSE_DATA_PATH}/appdata/traefik/config/config.yml:/config.yml:ro'
      - '${CHANGE_TO_COMPOSE_DATA_PATH}/appdata/traefik/config/logs:/var/log/traefik'
    labels:
      - "traefik.enable=true"
      # Entry point for http
      - "traefik.http.routers.traefik.entrypoints=http"
      - "traefik.http.routers.traefik.rule=Host(`home.${DOMAIN}`)"
      - "traefik.http.middlewares.traefik-auth.basicauth.users=${USERNAME_AND_PASSWORD}"
      - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
      # - "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
      - "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
      - "traefik.http.routers.traefik-secure.entrypoints=https"
      - "traefik.http.routers.traefik-secure.rule=Host(`home.${DOMAIN}`)"
      - "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
      - "traefik.http.routers.traefik-secure.tls=true"
      - "traefik.http.routers.traefik-secure.tls.certresolver=cloudflare"
      - "traefik.http.routers.traefik-secure.tls.domains[0].main=${DOMAIN}"
      - "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.${DOMAIN}"
      - "traefik.http.routers.traefik-secure.service=api@internal"
      - "traefik.http.services.traefik.loadbalancer.server.port=80"
    networks:
      traefik_proxy:
        ipv4_address: ${TRAEFIK_IP}
    ports:
      - ${HTTP_PORT}:${HTTP_PORT}
      - ${HTTPS_PORT}:${HTTPS_PORT}
    restart: unless-stopped

and this my traefik.yml

api:
  dashboard: true
  debug: true
entryPoints:
  http:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: https
          scheme: https
  https:
    address: ":443"
serversTransport:
  insecureSkipVerify: true
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
  file:
    filename: /config.yml
certificatesResolvers:
  cloudflare:
    acme:
      email: myemail@gmail.com #add your email
      storage: acme.json
      dnsChallenge:
        provider: cloudflare
        #disablePropagationCheck: true # uncomment this if you have issues pulling certificates through cloudflare, By setting this flag to true disables the need to wait for the propagation of the TXT record to all authoritative name servers.
        resolvers:
          - "1.1.1.1:53"
          - "1.0.0.1:53"

Any help will be apreciated.

Hi baronvontito,

welcome to the Traefik community.

Are the Env-Variables correct? Does the acme.json file have the correct access rights? How about the docker networking?

Could you please post the logs?

this very same configuration and variables was working on the home server, after y changed to a new house, cant get traefik working, the portainer host ip has all the same ports open on the modem. it seems like i cant access it locally because of the http redirecto to https but, i also cant get from outside with cloudflare.
also have the acme.json on 600 permision

You copied your .env file to the new home, too?

Run a docker service inspect traefik to see if substitutions were done correctly.

When you write "move home", did you move the server to a new residential connection? CF points to the right IP, router opens ports and forwards to server?

i think that my Movistar OTP Modem seems the same as the other but its not, is a RTF8115VW and its not that simple to put it on bridge since im using a Amazon eero mesh.
i think on my other home i successfully managed to put the ISP Movem (Movistar) on bridge.

Enable Traefik access log and check if external requests can reach Traefik. Is Traefik returning the 404?

Obviously, it was an issue with my router not being correctly in bridge mode, meaning my Traefik configuration was correct. Thank everyone for the quick response, great community.

You can close this topic :wink: Best wishes!