I want to self-host lemmy and participate in federation. However, I wonder whether it’s possible to have a setup where only I, and trusted users, are allowed to browse federated-content.
Basically, guests should not be allowed to use my instance to browse other federated content. So requests to “mydomain.tld/c/whatever@otherdomain.tld” should not be possible. Only users, logged-in on my instance, should be able to do that.
Despite that, guests should be allowed to see posts of communities posted on my instance, and users of other instances should be allowed to comment.
I know I can choose with which other instances mine should link with, but this would make the experience inconvenient to me. Because then I would need to adjust the config if I want to subscribe to a community on an instance I have not yet linked with.
Is such setup possible? Could not find the answer in the docs unfortunately
The only thing I can think of is something like blocking UI requests, and allow them only from localhost (so I would create a “ssh -L” tunnel on the server). Federation API endpoints would not be blocked. But this seems shaky, does Lemmy support a cleaner, built-in solution?
the federation API is independent of the front-end client API. You can run headless, without lemmy-ui, and federation still works. The API structure for federation is standardized, the front-end client API is unique to Lemmy.
You can run headless or do what the person I was responding to recommended and put it behind an authenticated portal, but that’s not really going to stop other instances and clients from accessing the same resources that op is hoping to limit access to except in the most basic case of people casually browsing op’s Lemmy instance through op’s own lemmy-ui.
Edit, but to be clear, what I was responding to and my response didn’t directly address op’s specific concern (which I kind of misunderstood myself before just now rereading) that outside/guest users shouldn’t be able to search for communities from other instances and I think it’s a fair concern because just searching for a community from another instance brings in posts and could be a vector for spam/abuse.