Activating Traefik Dashboard through Pangolin

The procedure for accessing the Traefik dashboard through Pangolin:

Step 0: Verify Dashboard Configuration in traefik_config.yml

Check Traefik configuration already has the dashboard enabled with:

api:
  insecure: true
  dashboard: true

Step 1: Create a Local Site in Pangolin

  1. Log into your Pangolin dashboard
  2. Go to the “Sites” tab and click “Add Site”
  3. Fill in the required information:
    • Give your site a name (e.g., “Local Infrastructure”)
    • Select “Local” as the connection method
    • Click “Create Site”

Step 2: Create a Resource for Traefik Dashboard

  1. Go to the “Resources” tab and click “Add Resource”

  2. Configure the resource:

    • Name: Traefik Dashboard
    • Choose a subdomain (e.g., traefik.yourdomain.com)
    • Select the local site you created in Step 1
    • Enable SSL (recommended)
    • Click “Create Resource”
  3. On the Connectivity page:

    • Add a target with:
      • Method: HTTP
      • IP Address: localhost (or the IP where Traefik is running)
      • Port: 8080 (Traefik’s default API port)
    • Click “Add Target” and “Save Changes”
  4. On the Authentication page:

    • Keep “Use Platform SSO” enabled for secure access through Pangolin
    • Or set up alternative authentication if preferred

Important: Port Exposure in Gerbil

Yes, you need to expose port 8080 in your Gerbil configuration. Since Traefik operates through Gerbil in your setup, you must add this port to your docker-compose.yml file:

gerbil:
  image: fosrl/gerbil:1.0.0-beta.3
  container_name: gerbil
  restart: unless-stopped
  depends_on:
    pangolin:
      condition: service_healthy
  networks:
    - pangolin
  command:
    - --reachableAt=http://gerbil:3003
    - --generateAndSaveKeyTo=/var/config/key
    - --remoteConfig=http://pangolin:3001/api/v1/gerbil/get-config
    - --reportBandwidthTo=http://pangolin:3001/api/v1/gerbil/receive-bandwidth
  volumes:
    - ./config/:/var/config
  cap_add:
    - NET_ADMIN
    - SYS_MODULE
  ports:
    - 51820:51820/udp
    - 443:443
    - 80:80
    - 8083:8080  # Add this line to expose Traefik dashboard port

After adding this port mapping, you’ll need to restart your Gerbil container:

sudo docker compose down
sudo docker compose up -d

Additionally, verify that port 8080 is allowed on your firewall if you’re using one. This enables external access to the Traefik dashboard through your Pangolin resource.

2 Likes

Why do you need to expose port 8080 externally? Couldn’t (and shouldn’t) all traffic remain internal to the Pangolin docker network?

someone from the crowded asked i want to achieve this. and i did it. lol :slight_smile:
No security is kept in mind. you should never need this guide, its pointless to expose dashboard.
But saying that, it is doable, and you can put traefik auth to secure a bit more