I’d like to self-host my own Lemmy instance. My environment is comprised of a Fedora VM on a separate VLAN running in Proxmox. That VM runs docker, and exposes all my services to Cloudflare using a treafik reverse proxy.

I have found some posts in my googlings of folks that were able to get Lemmy to work inside Traefik. I have tried their docker-compose files, and ultimately came up short.

My question, has anyone been able to get this working? If so, how?

  • btobolaski@threads.ruin.io
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    This is my ingressroute for lemmy:

    
    apiVersion: traefik.containo.us/v1alpha1
    kind: IngressRoute
    metadata:
      name: lemmy
    spec:
      entryPoints:
        - web
      routes:
        - kind: Rule
          match: Host(`threads.ruin.io`) && PathPrefix(`/api/`)
          services:
            - kind: Service
              name: lemmy
              passHostHeader: true
              port: 80
        - kind: Rule
          match: Host(`threads.ruin.io`) && PathPrefix(`/pictrs/`)
          services:
            - kind: Service
              name: lemmy
              passHostHeader: true
              port: 80
        - kind: Rule
          match: Host(`threads.ruin.io`) && PathPrefix(`/feeds/`)
          services:
            - kind: Service
              name: lemmy
              passHostHeader: true
              port: 80
        - kind: Rule
          match: Host(`threads.ruin.io`) && PathPrefix(`/nodeinfo/`)
          services:
            - kind: Service
              name: lemmy
              passHostHeader: true
              port: 80
        - kind: Rule
          match: Host(`threads.ruin.io`) && PathPrefix(`/.well-known/`)
          services:
            - kind: Service
              name: lemmy
              passHostHeader: true
              port: 80
        - kind: Rule
          match: Host(`threads.ruin.io`) && Method(`POST`, `PUT`, `DELETE`, `PATCH`, `CONNECT`)
          services:
            - kind: Service
              name: lemmy
              passHostHeader: true
              port: 80
        - kind: Rule
          match: Host(`threads.ruin.io`) && HeadersRegexp(`Accept`, `application\/(?:activity|ld)\+json`)
          services:
            - kind: Service
              name: lemmy
              passHostHeader: true
              port: 80
        - kind: Rule
          match: Host(`threads.ruin.io`)
          services:
            - kind: Service
              name: lemmy-ui
              passHostHeader: true
              port: 80
    

    It seems to work correctly. Given that you’re not using kubernetes, you’ll need to do some translation work.