Pterodactyl panel can't connect to its wing after switching from NPM (Nginx Proxy Manager) to Traefik

After I switch from NPM to Traefik I can't connect to the wing from the dashboard and when I check the wing logs I get this error even though I used the exact same configuration:
FATAL: [Jan 2 15:12:19.992] failed to load server configurations error=http: request creation failed: Get "https://pterodactyl.local.example.com/api/remote/servers?page=0&per_page=50": dial tcp: lookup pterodactyl.local.example.com on 127.0.0.11:53: no such host
My theory is that since I switched from a public to a local DNS record only availble to pihole, the docker DNS config can't see the panel, but I changed it to use my local DNS server and it still doesn't works so it would be great if someone coud help

The DNS server I'm using in the pterodactyl config:
docker: network: interface: 172.18.0.1 dns: - 1.1.1.1 - 1.0.0.1
What I think it should be:
docker: network: interface: 172.18.0.1 dns: - piholedns.ip

My Traefik config (only the wing ptero node part):
http: routers: pterodactyl-node-01: entryPoints: - "https" rule: "Host(pterodactyl-node-01.local.example.com`)"
middlewares:
- default-headers
- https-redirectscheme
tls: {}
service: pterodactyl-node-01

services:
pterodactyl-node-01:
loadBalancer:
servers:
- url: "https://ptero.ip:443"
passHostHeader: true

middlewares:
https-redirectscheme:
redirectScheme:
scheme: https
permanent: true

default-headers:
  headers:
    frameDeny: true
    browserXssFilter: true
    contentTypeNosniff: true
    forceSTSHeader: true
    stsIncludeSubdomains: true
    stsPreload: true
    stsSeconds: 15552000
    customFrameOptionsValue: SAMEORIGIN
    customRequestHeaders:
      X-Forwarded-Proto: https`

Use 3 backticks in front and after code to make it readable, in yaml every space matters.

Sry I couldn't get back to use sooner, but here is my config.yml (Traefik config) updated:

http:
 #region routers 
  routers:
    pterodactyl:
      entryPoints:
        - "https"
      rule: "Host(`pterodactyl.local.example.com`)"
      middlewares:
        - default-headers
        - https-redirectscheme
      tls: {}
      service: pterodactyl
#endregion
#region services
  services:
    pterodactyl:
      loadBalancer:
        servers:
          - url: "http://ptero.ip"
        passHostHeader: true
    pterodactyl-node-01:
      loadBalancer:
        servers:
          - url: "https://ptero-node-01.ip"
        passHostHeader: true

#endregion
  middlewares:
    addprefix-pihole:
      addPrefix:
        prefix: "/admin"
    https-redirectscheme:
      redirectScheme:
        scheme: https
        permanent: true
    redirectregex-pihole:
      redirectRegex:
        regex: /admin/$
        replacement: /

    default-headers:
      headers:
        frameDeny: true
        browserXssFilter: true
        contentTypeNosniff: true
        forceSTSHeader: true
        stsIncludeSubdomains: true
        stsPreload: true
        stsSeconds: 15552000
        customFrameOptionsValue: SAMEORIGIN
        customRequestHeaders:
          X-Forwarded-Proto: https

    idrac:
      headers:
        frameDeny: true
        browserXssFilter: true
        forceSTSHeader: true
        stsIncludeSubdomains: true
        stsSeconds: 15552000
        customFrameOptionsValue: SAMEORIGIN
        customRequestHeaders:
          X-Forwarded-Proto: https

    default-whitelist:
      ipWhiteList:
        sourceRange:
        - "local.ip"

    secured:
      chain:
        middlewares:
        - default-whitelist
        - default-headers

Update: I apparently found the solution, and it was to change my Proxmox server's DNS from Cloudflare to my Pihole DNS since I had accidentally set it to Cloudflare previously, and the DNS record was on my Pihole. When I switched from NPM to Traefik I also change the DNS from public to local so that was the problem.

Solution: Change Proxmox server's DNS to Pihole local DNS.

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