Skip to content

Traefik

Traefik uses lego inside: point a certificate resolver at BastionXP CA, and let it trust the root through LEGO_CA_CERTIFICATES.

traefik.yml
certificatesResolvers:
  bastionxp-ca:
    acme:
      caServer: https://ca.example.com:8443/acme/directory
      email: [email protected]
      storage: /data/acme.json
      tlsChallenge: {}          # or: httpChallenge: { entryPoint: web }
compose.yaml (excerpt)
services:
  traefik:
    image: traefik:v3
    environment:
      LEGO_CA_CERTIFICATES: /etc/traefik/bastionxp-ca-root.crt
    volumes:
      - ./bastionxp-ca-root.crt:/etc/traefik/bastionxp-ca-root.crt:ro

Then use the resolver on a router:

labels:
  - traefik.http.routers.app.tls.certresolver=bastionxp-ca
  - traefik.http.routers.app.rule=Host(`app.example.com`)