this post was submitted on 02 Jul 2023
29 points (96.8% liked)

Selfhosted

40393 readers
560 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 2 years ago
MODERATORS
all 16 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 1 year ago

I deployed Lemmy on my kubernetes cluster. You can find a short guide and my helm charts here:

https://lemmy.help/post/6845

https://github.com/grouvie/lemmy_help

I am using argoCD to manage my charts. Feel free to contact me if you have any questions.

[–] [email protected] 4 points 1 year ago (1 children)

Have you been able to load balance with multiple containers? Im not really familiar with k8s

[–] [email protected] 3 points 1 year ago (2 children)
[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (2 children)

I also use kubernetes to run my Lemmy instance. Sadly, pictrs uses their own "database" file which can only be opened by a single pod because it refuse to run if the "database" lock is already acquired by another pod, making scaling up the number of pods impossible. I wish they use postgres instead of inventing their own database. I suspect this is one of the reasons why those large Lemmy instances have difficulty scaling up their server.

[–] [email protected] 1 points 1 year ago (1 children)

You mean pictrs can't scale, or the other pods cannot as well? I separated lemmy-ui, the backend, and pictrs into different pods. Haven't tried scaling anything yet though, but I did notice the database issue with pictrs when RollingRestart, had to switch to Recreate.

[–] [email protected] 3 points 1 year ago (1 children)

Only pictrs that can't scale. Lemmy ui and backend seems to be stateless.

[–] [email protected] 1 points 1 year ago

Great to hear, that will make it super easy if I start allowing users on my instance.

[–] [email protected] 1 points 1 year ago

This is a really interesting observation. Curious if the devs are aware that this breaks simple scalability efforts

[–] [email protected] 4 points 1 year ago (1 children)

I saw that Lemmy container has scheduled jobs. How did you handled that? IDK I’m not sure about is Lemmy really “stateless”.

https://lemmy.world/post/920294

[–] [email protected] 7 points 1 year ago (1 children)

Right, that's a good point.

So far it's working quite well, however for a micro-sized instance it's no surprise. Worst case scenario I can do the same thing as the admins of lemmy.world did: create a dedicated scheduling pod using the same docker image as the normal ones, but exclude it from the Service's target, so it won't receive any incoming traffic.

The rest of the pods can then be dedicated to serve traffic with their scheduling functionality disabled.

[–] [email protected] 2 points 1 year ago

Do they have a write up on their setup?

[–] [email protected] 2 points 1 year ago

I have a server setup with TrueNAS Scale installed and I would love something as simple as a Lemmy app for TrueCharts. I know TrueNAS scale uses k8s for apps so this should be possible but from my limited research it seems like something I’d have to figure out on my own for the most part.

[–] frankblack 1 points 1 year ago

Yea I was wondering if should go with a docker server or a single k8s and add workers if I need it later. What do you think?

[–] frankblack 0 points 1 year ago

Yea I was wondering if should go with a docker server or a single k8s and add workers if I need it later.