i’ve been trying to get an instance of lemmy running but having a bit of trouble getting traefik to retrieve a ssl cert. my image of traefik is installed as a part of the matrix-ansible-deploy. the getting the cert from LE works fine for my matrix server, but the lemmy instance is using the traefik default cert. also, in firefox, i can accept the insecure cert and access the site, so i know lemmy is setup. the labels i use are:

   labels:
      - "traefik.enable=true"
      - "traefik.http.routers.lemmy-ui.entrypoints=web-secure"
      - "traefik.http.routers.lemmy-ui.rule=Host(`lem.domain.com)"
      - "traefik.http.routers.lemmy-ui.tls=true"
      - "traefik.http.services.lemmy-ui-svc.loadbalancer.server.port=1234"
      - "traefik.docker.network=traefik"`

i’ve been checking config docs for two days, and have been WAY down different rabbit holes. if any has any suggestions, i’d love to hear them.

  • Scott@lem.free.as
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    This worked for me…

    For lemmy:

    labels:
          - traefik.enable=true
          - traefik.http.routers.lemmy.rule=Host(`lemmy.example.com`) && (PathPrefix(`/api/`, `/pictrs/`, `/feeds/`, `/nodeinfo/`, `/.well-known/`) || Method(`POST`) || HeadersRegexp(`accept`, `^application/.*`))
          - traefik.http.routers.lemmy.entrypoints=websecure
          - traefik.http.services.lemmy.loadbalancer.server.port=8536
    

    For lemmy-ui:

    labels:
          - traefik.enable=true
          - traefik.http.routers.lemmy-ui.rule=Host(`lemmy.example.com`)
          - traefik.http.routers.lemmy-ui.entrypoints=websecure