Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 189c055

Browse files
authored
Moved homeserver documentation above reverse proxy examples (#10551)
Signed-off-by: Drew Short <[email protected]>
1 parent f8e86b7 commit 189c055

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

changelog.d/10551.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated the reverse proxy documentation to highlight the homserver configuration that is needed to make Synapse aware that is is intentionally reverse proxied.

docs/reverse_proxy.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ Let's assume that we expect clients to connect to our server at
3333
`https://example.com:8448`. The following sections detail the configuration of
3434
the reverse proxy and the homeserver.
3535

36+
37+
## Homeserver Configuration
38+
39+
The HTTP configuration will need to be updated for Synapse to correctly record
40+
client IP addresses and generate redirect URLs while behind a reverse proxy.
41+
42+
In `homeserver.yaml` set `x_forwarded: true` in the port 8008 section and
43+
consider setting `bind_addresses: ['127.0.0.1']` so that the server only
44+
listens to traffic on localhost. (Do not change `bind_addresses` to `127.0.0.1`
45+
when using a containerized Synapse, as that will prevent it from responding
46+
to proxied traffic.)
47+
48+
3649
## Reverse-proxy configuration examples
3750

3851
**NOTE**: You only need one of these.
@@ -239,16 +252,6 @@ relay "matrix_federation" {
239252
}
240253
```
241254

242-
## Homeserver Configuration
243-
244-
You will also want to set `bind_addresses: ['127.0.0.1']` and
245-
`x_forwarded: true` for port 8008 in `homeserver.yaml` to ensure that
246-
client IP addresses are recorded correctly.
247-
248-
Having done so, you can then use `https://matrix.example.com` (instead
249-
of `https://matrix.example.com:8448`) as the "Custom server" when
250-
connecting to Synapse from a client.
251-
252255

253256
## Health check endpoint
254257

0 commit comments

Comments
 (0)