this post was submitted on 04 Jul 2023
65 points (97.1% liked)

Selfhosted

40041 readers
636 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
 

Hi all, I tried hosting my own lemmy instance to take some of the load off lemmy.world, but a lot of the posts do not get synchronised to my instance. When they do, they never got more than a couple upvotes.

I get a lot of warnings in the logs that I've got an incoming connection not on my allowed hosts, of which I've put "lemmy.world" and "lemmy.ml"

Does self hosting like this actually reduce the load on lemmy.world and the fediverse? And how can I fix the issue I'm having?

top 20 comments
sorted by: hot top controversial new old
[–] manitcor@lemmy.intai.tech 33 points 1 year ago

upvotes are all over the place, posts being out of sync is normal too right now. growing pains.

[–] w0odl@lemmy.radio 21 points 1 year ago* (last edited 1 year ago) (1 children)

"Allowed Hosts" is white listing btw. You should leave it blank if you want more than just lemmy.world and lemmy.ml

And I wouldn't say it reduces the load on those sites. It would kind of add to them in a way if you post from your instance or sub from your instance solo. If it's just you on your instance, it's barely a blip. May save them some photo hosting if you post.

SOME of the out of sync upvotes/comments are fixed in 0.18.1

[–] Barbarian@sh.itjust.works 2 points 1 year ago (2 children)

It would kind of add to them in a way if you post from your instance or sub from your instance solo

Is this actually true? As far as I understand it, by far the biggest overhead is users browsing. The fewer users you have actually hitting the frontend, the better.

[–] PriorProject@lemmy.world 7 points 1 year ago

The devs were saying that browse load was the major issue a few weeks ago, but more instances have been stood up since then and it does seem like replication is getting a bit creaky. I don't think replication load is flatlining the CPUs of big instances, but it does seem to be reaching some kind of scaling limit that is non-trivial to tune around.

The optimal is definitely the goldilocks zone of ~100 to ~1000 active users. Whether single-user instances are a net win or a net loss is still pretty unclear to me, and if they become a net-loss it will manifest as federation issues of the sort described here, but it's pretty hard to tell whether those issues are misconfigs on the tiny instances, misconfigs on certain big instances, temporary scaling issues that will be quickly fixed, or hard problems that will limit the size of the network for a while.

[–] w0odl@lemmy.radio 3 points 1 year ago* (last edited 1 year ago)

If the bigger instance has to push/pull in data from you personal communities because they sub to it, then yes. 1 person not using your front end isn’t going to change much.

[–] bdonvr@thelemmy.club 9 points 1 year ago

Leave allowed hosts blank! Otherwise you'll only get content from those instances.

Also you will only get posts from communities with at least one subscriber on your instance, and only new posts and comments from the moment you subscribe, or if someone interacts with an older post/comment

[–] Ducks@ducks.dev 8 points 1 year ago (2 children)

You won't get much old data when you first start subscribing to new communities from your instance. You'll only get new content. When you add a community you'll get 20 recent topics with no comments or upvotes. As new content comes in you'll pick up all of it. At least one member of your instance needs to subscribe to a community to begin syncing with that community. To solve the lack of content on my personal instance, I made a bot that subscribed to the top 300 communities with more than 1000 subscribers. After a day or so I now have tons of content.. I may stick the bot script on a weekly cronjob to keep my instance synced with the largest communities.

[–] Max_UL@lemmy.pro 1 points 1 year ago (2 children)

Can you share that? Would love to use it for our instance. Previously was subbing to stuff manually to populate our small instance and it was a pain.

[–] Ducks@ducks.dev 2 points 1 year ago* (last edited 1 year ago) (1 children)

It's not great, but here it is: https://github.com/ducksdotdev/LemmySubscriber/tree/main .. I'll revisit the app sometime this week/weekend to make it better. Although, I believe there are a couple other scripts in the wild that do the same task and include their own method for crawling.

edit: https://github.com/Fmstrat/lcs -- looks like this is a better one than what I did if you want something different.

[–] Max_UL@lemmy.pro 1 points 1 year ago

Awesome thank you! Sorry delayed reply had a busy day

[–] Ducks@ducks.dev 1 points 1 year ago

I can share it, but right now I have it grabbing the latest artifact from the lemmy-exporter which looks like as of June 3rd they stopped updating their repo with the export artifact. Meaning, I need to implement some sort of crawler myself or use a different method for generating the list of communities.

I can share the code with this caveat if you want to use it anyway/try and change it yourself. It is written in Golang.. will post back in a bit with a github repo. need to set it up

[–] Peregrinus@lemmy.world 1 points 1 year ago

this is the correct answer, someone listed it as a feature request or bug on GitHub https://github.com/LemmyNet/lemmy/issues/3448 but I'm not sure what the long term answer is.

I do agree though that is lends itself to encouraging people to larger instances which isn't really the spirit of Lemmy.

[–] SmashingSquid@notyour.rodeo 6 points 1 year ago (2 children)

As someone said don't set allowed hosts, leave it blank. Only use the blacklist (I recommend blocking exploding heads).

What version are you running?

[–] w0odl@lemmy.radio 7 points 1 year ago

it was me... i said that :)

[–] IIII@lemmy.world 5 points 1 year ago

I ran the 0.18.1-rc3 branch off dockerhub

Didn't know allowed hosts allowed all when it's blank. Might give it another shot

[–] HorseFD@lemmy.buzz 4 points 1 year ago

You could try using a tool like LCS to flesh out your instance a bit by automatically subscribing to popular communities.

[–] gabriele97@lemmy.g97.top 2 points 1 year ago

Anyway, based on how federation works, you are actually adding load to lemmy.world and other instances with your own instance. This is counterintuitive and it is because federation doesn't work well as for due to scale problems.

[–] fraydabson@lemm.ee 1 points 1 year ago (1 children)

From what I was told. If you self host for only yourself, there is no benefit and you are not talking the load off anyone else’s instances. I believe because you still need to pull all that data so no difference. But if you have a few people on your instance then that will help The more you have.

[–] Ducks@ducks.dev 3 points 1 year ago (1 children)

You are not taking the load off with a single user, but you will have a more stable experience since your instance won't require much resources. I have my own instance and haven't experienced any of the issues people report on lemmy.world and lemmy.ml.

[–] fraydabson@lemm.ee 1 points 1 year ago

Yeah good point. I did start up an instance but haven’t done much. Ran into a lot of federation issues which I know are common.

load more comments
view more: next ›