I’m attempting to federate a synapse server. The software has been installed from the dietpi list. I use nginx proxy manager to point to a sub.domain.com and it all works fine. If I check for federation I get various refusals from time outs to connections refused.
I’ve spent a good long time looking for an answer and there isn’t one, but several. All slightly different, from amending the yaml to include a 8448 port through to .wellknown type responses.
Any clue on what might be the preferred method for this installation? I’m going round in circles a bit and not really getting anywhere.
When you you wanna federate make sure the server is reachable via port 8448. You only need to use .wellknown if you want to use another port, like 443 or so.
So you need wellknown for every other port than 8448.
server {
listen 443 ssl;
listen [::]:443 ssl;
# For the federation port
listen 8448 ssl default_server;
listen [::]:8448 ssl default_server;
server_name matrix.example.com;
location ~ ^(/_matrix|/_synapse/client) {
# note: do not add a path (even a single /) after the port in `proxy_pass`,
# otherwise nginx will canonicalise the URI and cause signature verification
# errors.
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host:$server_port;
# Nginx by default only allows file uploads up to 1M in size
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
client_max_body_size 50M;
# Synapse responses may be chunked, which is an HTTP/1.1 feature.
proxy_http_version 1.1;
}
}
This just give me a red ‘Offline’ notification. So that is not the right config. I’ve added additional listeners to the homeserver.yaml but now am out of ideas.
I think I’m just not getting the point of the documentation. Straight into detail, when i need a bit more…see that homeserver.taml…leave it alone…type stuff Im afraid
You can not do that in the same server block, Synapse expects federation to appear on a dedicated HTTPS port.
And this proxy_set_header Host $host:$server_port; breaks federation signature verification.
You need to split the NPM config in two parts, one for client connections on port 443 and one for the federation on port 8448:
Glad its not just me that’s got all confused. There is a lot of documentation that is all slightly different. the OEM stuff is what I’m looking at now as everything else seems to fall out of that with personal tweaks