Hey friends!
I’ve recently set up my own Lemmy instance at http://chinese.lol:8536 and it’s been working well so far. According to what I know, I should be able to subscribe to other federated communities, but it seems like I’m having some trouble.
In the settings, I’ve enabled “Federation” and added “lemmy.world” and “programming.dev” to the list of allowed instances. However, when I search for communities, I still can’t seem to find any from these instances.
Has anyone else encountered this issue? Am I missing a step or a setting somewhere? I’d really appreciate any guidance or advice you can offer.
Thank you in advance for your help! 🙏
I also posted it in Reddit and hope I can fix it.
https://www.reddit.com/r/Lemmy/comments/15tft63/need_help_with_lemmy_instance_federation/
thanks for reply! The default port of lemmy instance is 8536, so I just leave it there. also my 80/443 port have been taken by another app. may i ask where can i get the federation information for this? ( also may I ask can I use other ports for making HTTPS?
Lemmy has many different containers all running in docker. It includes a reverse proxy that listens on port 80 and redirects traffic to the appropriate container.
And yes, you can direct traffic to the right place based on the URL being accessed. This is called a reverse proxy. It’s easiest to allow Lemmy’s reverse proxy to stay as is except change the docker external port to something else (e.g. 8080), then have another reverse proxy to handle traffic to your different services.
Some common reverse proxies are Caddy, Traefik, NPM, or just using nginx though that may be more difficult to configure if you aren’t familiar. Search up a tutorial, which is best depends on what else you have running (e.g. traefik automatically detects how to connect to each docker container, but gets a lot trickier if all your services aren’t in docker).
got it got it. I saw this federation test from the offical git, https://github.com/LemmyNet/lemmy/tree/main/docker/federation. but seems it’s a local federation validation… I’ll do more search for that and may set up with my own nginx, thanks for the reply!
Sorry I have found the docker-compose files are not quite how I remember them (and they have had many changes since I last saw them). The instructions now direct you to install the ansible copy of the docker-compose file which doesn’t have a post specified for the proxy (unless you actually run it using ansible).
Hopefully you’re able to work it out :)
Learn about reverse proxies such as Nginx or Caddy. The various selfhosted communities on Lemmy should be able to help with your questions. That’ll fix the port conflict problem. (Though I recommend wiping your Lemmy DB and starting from scratch when changing domains. Federation is really finicky in situations like that)
My second recommendation would be to use blocklists to deny the crap parts as opposed to allowlisting as that will impact your view of the threadiverse. (Which by itself isn’t a bad thing, but is the wrong tool for the job in most cases I’ve seen people asking about it)