Middleware Manager Docs

Deploy with Pangolin

Run Middleware Manager alongside Pangolin and Traefik.

Use this when Pangolin already manages Traefik and you want Middleware Manager to add middlewares, custom services, and plugin/mTLS control.

Container layout (summary)

  • traefik: uses static config from /etc/traefik/traefik_config.yml; watches dynamic rules from /rules.
  • middleware-manager: writes overrides to api (mounted to Traefik /rules) and stores state in /data/middleware.db.
  • pangolin: remains the primary source of router/service data when ACTIVE_DATA_SOURCE=pangolin.

Required volumes and env

traefik:
  volumes:
    - ./config/traefik:/etc/traefik:ro
    - ./config/traefik/logs:/var/log/traefik
    - ./pangolin-data:/var/dynamic:ro
middleware-manager:
  volumes:
    - ./data:/data
    - ./config/middleware-manager:/app/config  
    - ./config/traefik:/etc/traefik
  environment:
    - ACTIVE_DATA_SOURCE=pangolin
    - PANGOLIN_API_URL=http://pangolin:3001/api/v1
    - TRAEFIK_STATIC_CONFIG_PATH=/etc/traefik/traefik_config.yml # Don't change this
    - TRAEFIK_CONF_DIR=/conf
    - DB_PATH=/data/middleware.db
    - PORT=3456

Static config path must match the mount

TRAEFIK_STATIC_CONFIG_PATH must point to the static file inside the Middleware Manager container (not the host). If the path is wrong, plugin install/removal will fail silently.

Steps

  1. Prepare directories: ./config/traefik, ./config/middleware-manager, ./data.
  2. Ensure Traefik static config includes the HTTP provider pointing to Middleware Manager:
    • Replace any existing Pangolin endpoints with the Middleware Manager API endpoint:
    providers:
      http:
        endpoint: "http://middleware-manager:3456/api/v1/traefik-config"
        pollInterval: 5s
    Troubleshooting Connection: If the container name middleware-manager is not reachable (e.g., DNS issues), find the container's IP address:
    docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' middleware-manager
    Then use the IP in your config:
    endpoint: "http://172.17.1.3:3456/api/v1/traefik-config"
  3. Start containers: docker compose up -d.
  4. Open UI at http://<host>:3456 and test the Pangolin data source in Settings.
  5. Confirm routers/services appear in Traefik Explorer.

Health & ports

  • Middleware Manager: :3456 (UI/API), GET /health.
  • Traefik dashboard: depends on your exposure; keep it restricted.

When to switch to Traefik data source

  • You want to override or inspect Traefik directly (not only Pangolin projections).
  • Use Settings → Active Data Source and set TRAFFIC_API_URL (via config) if needed.

Screenshot placeholder — Pangolin stack deployment diagram / docker-compose.

On this page