-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse should be able to serve a .well-known/matrix/server
file
#8308
Comments
It seems we already respond to Do you have a use case for also hosting a |
My use case is my current setup, having traefik as an edge router is a fairly simple setup involving labels (if a regular docker setup), my only issue is that traefik doesnt seem to provide a way of providing "virtual locations" like nginx does, so if i want to host the well-known/matrix/server, I need to either spin up a separate nginx host to provide one file (which is the solution ive chosen in the interim) so all requests to https://homeserver/.well-known/matrix/server get routed to nginx which isnt great. If synapse inside docker could provide this itself via static assets that i could easily say mount directly or provided via synapse with say, an environmental value passed to docker, it would make my life easier. Its potentially a pretty niche use case so wanted to see what everyone thought or if there was a way of doing this easily that i haven't considered? |
although also, are we able to use SRV records still? not sure ive seen it working for me even though the dns record looks correct |
OK, sounds like you do also want to host Though having said that, the
SRV records will work. If you haven't seen https://federationtester.matrix.org/ then that can help you debug any issues. |
problem is if the container is only receiving traffic in via 443, and all the incoming federation requests without the well-known file are hitting 8448 by default? I suppose in theory i could open up traffic from the router to 443 but still feels like a workaround. Opening that traffic up via traefik is also quite upsetting (multiple services on the same endpoint is not its strong suit). Ok, good to know, seperately I need to figure out why my SRV record isn't working as intended then, I've tried setting one up first but no dice. That tool is very useful, also raised a bug on there because only having high ciphers enabled breaks that utility as well (or at least breaks fetching the above well-known file). |
I have the exact same use case. All my traffic is entering with a cname's pointing to my dyndns record. Traffic is then handled by traefik on port 443 which is a reverse proxy for the docker container on 8008. It would be very nice not having to run nginx in front of 8008 and behind traefik. For now SRV records work to point it to 443 but I would prefer hosting the static file inside the container (possible through an entry in the homeserver.yaml) Example:
|
Same use case, kubernetes with traffeik to Ingress
But i was lost for a while as
|
Stumbled across this issue today as well, have a traefik proxy handling the requests to this, similar to the above scenarios. It would be great if synapse can also host this too. |
.well-known/matrix/server
file
This seems a reasonable request. I have changed the title to clarify that it's really I can see this also being useful for being able to get away from using 8448 as the default federation port (which afaict is more for legacy reasons nowadays), as having this built-in to Synapse could make it easier to configure this. |
I may be mistaken, but several people mention that they're using a proxy to serve synapse, I'm doing the same and hosting it on a subdomain. As the well-known entry is generated using just the my current setup uses Traefiks regexRedirect to redirect the the well-known address to where synapse serves it. I can probably setup an nginx container to host the right information in the right location. I just want to know if this setting already exists and I'm just missing something |
No, synapse doesn't allow you to modify the target of the |
I'd like to be able to serve .well-known files directly from the container:
So usually this isn't a problem for most, if you have a classic reverse proxy setup, its super easy to set up one way or another, if youre like me trying to set up traefik, it becomes more complicated. Its possible to setup a seperate nginx instance to catch such requests but personally I'd like to be able to provide either a file to be mounted or variable to be passed into the container that would serve these files.
One workaround for this is to mount a file directly into the static directory and have a redirect on that file.
The text was updated successfully, but these errors were encountered: