this post was submitted on 15 Jul 2023
10 points (72.7% liked)

Selfhosted

39962 readers
463 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] btobolaski@threads.ruin.io 6 points 1 year ago (1 children)

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.

[–] domi@lemmy.secnd.me 1 points 1 year ago (2 children)

Can you federate with kbin instances? The communities get stuck at subscribe pending for me.

That's the only thing not working and I assume I'm missing a proxy rule.

[–] btobolaski@threads.ruin.io 1 points 1 year ago

It does appear to work for me.

[–] BlackEco@lemmy.blackeco.com 1 points 1 year ago (1 children)

I had the same issue, upgrading to 0.18.1 and using the revised nginx.conf from lemmy-ansible fixed the issue.

[–] domi@lemmy.secnd.me 1 points 1 year ago

Figured it out. I also had to add the PUT, DELETE, PATCH and CONNECT rules, only POST doesn't work for kbin apparently.