You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
-1
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,6 @@ Services that run on the server to make the various parts of your installation w
63
63
|[PostgreSQL](https://www.postgresql.org/)| ✓ | Database for Synapse. [Using an external PostgreSQL server](docs/configuring-playbook-external-postgres.md) is also possible. |[Link](docs/configuring-playbook-external-postgres.md)|
64
64
|[Coturn](https://github.com/coturn/coturn)| ✓ | STUN/TURN server for WebRTC audio/video calls |[Link](docs/configuring-playbook-turn.md)|
65
65
|[Traefik](https://doc.traefik.io/traefik/)| ✓ | Web server, listening on ports 80, 443 and 8448 - standing in front of all the other services. Using your own webserver [is possible](docs/configuring-playbook-own-webserver.md)|[Link](docs/configuring-playbook-traefik.md)|
66
-
|[nginx](http://nginx.org/)| x | (Deprecated) Web server, listening on ports 80, 443 and 8448 - standing in front of all the other services. Deprecated in favor of Traefik |[Link](docs/configuring-playbook-nginx.md)|
67
66
|[Let's Encrypt](https://letsencrypt.org/)| ✓ | Free SSL certificate, which secures the connection to all components |[Link](docs/configuring-playbook-ssl-certificates.md)|
68
67
| [ma1sd](https://github.com/ma1uta/ma1sd) | x | Matrix Identity Server | [Link](docs/configuring-playbook-ma1sd.md)
69
68
|[Exim](https://www.exim.org/)| ✓ | Mail server, through which all Matrix services send outgoing email (can be configured to relay through another SMTP server) |[Link](docs/configuring-playbook-email.md)|
Copy file name to clipboardexpand all lines: docs/configuring-playbook-base-domain-serving.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ Usually, there are 2 options:
10
10
11
11
- either get a separate server for the base domain, just for serving the files necessary for [Server Delegation via a well-known file](howto-server-delegation.md#server-delegation-via-a-well-known-file)
12
12
13
-
- or, arrange for the Matrix server to serve the base domain. This either involves you [using your own webserver](configuring-playbook-own-webserver.md) or making the integrated webserver (`matrix-nginx-proxy`) serve the base domain for you.
13
+
- or, arrange for the Matrix server to serve the base domain. This either involves you [using your own webserver](configuring-playbook-own-webserver.md) or making the integrated webserver serve the base domain for you.
14
14
15
-
This documentation page tells you how to do the latter. With some easy changes, we make it possible to serve the base domain from the Matrix server via the integrated webserver (`matrix-nginx-proxy`).
15
+
This documentation page tells you how to do the latter. With some easy changes, we make it possible to serve the base domain from the Matrix server via the integrated webserver.
16
16
17
17
Just **adjust your DNS records**, so that your base domain is pointed to the Matrix server's IP address (using a DNS `A` record) **and then use the following configuration**:
**NOTE**: When using `matrix-nginx-proxy` instead of Traefik, you won't be able to override the path prefix. You can only override the domain, but that needs to happen using another variable: `matrix_server_fqn_buscarron` (e.g. `matrix_server_fqn_buscarron: "form.{{ matrix_domain }}"`).
**NOTE**: When using `matrix-nginx-proxy` instead of Traefik, you won't be able to override the path prefix. You can only override the domain, but that needs to happen using another variable: `matrix_server_fqn_go_neb` (e.g. `matrix_server_fqn_go_neb: "mybot.{{ matrix_domain }}"`).
| metrics |`/metrics/hookshot`|`matrix_hookshot_metrics_enabled` and exposure enabled via `matrix_hookshot_metrics_proxying_enabled` or `matrix_metrics_exposure_enabled`. Read more in the [Metrics section](#metrics) below. | Prometheus |
61
61
62
-
See also `matrix_hookshot_matrix_nginx_proxy_configuration`in [init.yml](/roles/custom/matrix-bridge-hookshot/tasks/inject_into_nginx_proxy.yml).
62
+
Also see the various `matrix_hookshot_container_labels_*` variables in in [default/main.yml](/roles/custom/matrix-bridge-hookshot/default/main.yml), which expose URLs publicly.
63
63
64
64
The different listeners are also reachable *internally* in the docker-network via the container's name (configured by `matrix_hookshot_container_url`) and on different ports (e.g. `matrix_hookshot_appservice_port`). Read [main.yml](/roles/custom/matrix-bridge-hookshot/defaults/main.yml) in detail for more info.
Copy file name to clipboardexpand all lines: docs/configuring-playbook-federation.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -41,12 +41,11 @@ With that, your server's users will only be able to talk among themselves, but n
41
41
**Disabling federation does not necessarily disable the federation port** (`8448`). Services like [Dimension](configuring-playbook-dimension.md) and [ma1sd](configuring-playbook-ma1sd.md) normally rely on `openid` APIs exposed on that port. Even if you disable federation and only if necessary, we may still be exposing the federation port and serving the `openid` APIs there. To override this and completely disable Synapse's federation port use:
42
42
43
43
```yaml
44
+
matrix_homeserver_federation_enabled: false
45
+
44
46
# This stops the federation port on the Synapse side (normally `matrix-synapse:8048` on the container network).
45
47
matrix_synapse_federation_port_enabled: false
46
48
47
-
# This removes the `8448` virtual host from the matrix-nginx-proxy reverse-proxy server.
# This stops the federation port on the synapse-reverse-proxy-companion side (normally `matrix-synapse-reverse-proxy-companion:8048` on the container network).
Why? This change could be useful for people running small Synapse instances on small severs/VPSes to avoid being impacted by a simple DOS/DDOS when bandwidth, RAM, an CPU resources are limited and if your hosting provider does not provide a DOS/DDOS protection.
57
56
57
+
**NOTE**: this approach hasn't been tested with the new Traefik-only setup that the playbook started using in 2024-01. It may not work.
58
+
58
59
The following changes in the configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`) will allow this and make it possible to proxy the federation through a CDN such as CloudFlare or any other:
**Note**: the playbook is [in the process of moving to Traefik](../CHANGELOG.md#reverse-proxy-configuration-changes-and-initial-traefik-support). Traefik is already the default reverse-proxy for new installations and existing users are also strongly encouraged to switch to Traefik. As such, this **nginx documentation below may be incomplete or misleading**.
4
-
5
-
6
-
## Using Nginx status
7
-
8
-
This will serve a statuspage to the hosting machine only. Useful for monitoring software like [longview](https://www.linode.com/docs/platform/longview/longview-app-for-nginx/)
By default, if ```matrix_nginx_proxy_nginx_status_enabled``` is enabled, access to the status page would be allowed from the local IP address of the server. If you wish to allow access from other IP addresses, you can provide them as a list:
You can adjust how the SSL is served by the nginx server using the `matrix_nginx_proxy_ssl_preset` variable. We support a few presets, based on the Mozilla Server Side TLS
29
-
Recommended configurations. These presets influence the TLS Protocol, the SSL Cipher Suites and the `ssl_prefer_server_ciphers` variable of nginx.
30
-
Possible values are:
31
-
32
-
- `"modern"`- For Modern clients that support TLS 1.3, with no need for backwards compatibility
33
-
- `"intermediate"`(**default**) - Recommended configuration for a general-purpose server
34
-
- `"old"`- Services accessed by very old clients or libraries, such as Internet Explorer 8 (Windows XP), Java 6, or OpenSSL 0.9.8
35
-
36
-
**Be really carefull when setting it to `"modern"`**. This could break comunication with other Matrix servers, limiting your federation posibilities.
37
-
38
-
Besides changing the preset (`matrix_nginx_proxy_ssl_preset`), you can also directly override these 3 variables:
39
-
40
-
- `matrix_nginx_proxy_ssl_protocols`: for specifying the supported TLS protocols.
41
-
- `matrix_nginx_proxy_ssl_prefer_server_ciphers`: for specifying if the server or the client choice when negotiating the cipher. It can set to `on` or `off`.
42
-
- `matrix_nginx_proxy_ssl_ciphers`: for specifying the SSL Cipher suites used by nginx.
43
-
44
-
For more information about these variables, check the `roles/custom/matrix-nginx-proxy/defaults/main.yml` file.
45
-
46
-
## Synapse + OpenID Connect for Single-Sign-On
47
-
48
-
If you want to use OpenID Connect as an SSO provider (as per the [Synapse OpenID docs](https://github.com/matrix-org/synapse/blob/develop/docs/openid.md)), you need to use the following configuration (in your `vars.yml` file) to instruct nginx to forward `/_synapse/oidc` to Synapse:
This playbook also allows for additional configuration to be applied to the nginx server.
65
-
66
-
If you want this playbook to obtain and renew certificates for other domains, then you can set the `matrix_ssl_additional_domains_to_obtain_certificates_for` variable (as mentioned in the [Obtaining SSL certificates for additional domains](configuring-playbook-ssl-certificates.md#obtaining-ssl-certificates-for-additional-domains) documentation as well). Make sure that you have set the DNS configuration for the domains you want to include to point at your server.
Copy file name to clipboardexpand all lines: docs/configuring-playbook-own-webserver.md
+5-58
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,11 @@ If that's alright, you can skip this.
6
6
7
7
## Traefik
8
8
9
-
[Traefik](https://traefik.io/) is the default reverse-proxy for the playbook since [2023-02-26](../CHANGELOG.md/#2023-02-26).
9
+
[Traefik](https://traefik.io/) is the default reverse-proxy for the playbook since [2023-02-26](../CHANGELOG.md/#2023-02-26) and serves **2 purposes**:
10
10
11
-
Besides serving public traffic, Traefik is also used for internal communication between addon services (briges, bots, etc.) and the homeserver.
11
+
- serving public traffic and providing SSL-termination with certificates obtained from [Let's Encrypt](https://letsencrypt.org/). See [Adjusting SSL certificate retrieval](./configuring-playbook-ssl-certificates.md).
12
+
13
+
- assists internal communication between addon services (briges, bots, etc.) and the homeserver via an internal entrypoint (`matrix-internal-matrix-client-api`).
12
14
13
15
There are 2 ways to use Traefik with this playbook, as described below.
Traefik will manage SSL certificates for all services seamlessly.
26
28
27
-
**Note**: for a while longer, our old reverse-proxy (`matrix-nginx-proxy`) will still be installed in local-only mode. Do not be alarmed to see `matrix-nginx-proxy` running even when you've chosen Traefik as your reverse-proxy. In the near future, we'll be able to run without nginx, but we're not there yet.
In this mode all roles will still have Traefik labels attached. You will, however, need to configure your Traefik instance and its entrypoints.
48
49
49
-
By default, the playbook configured services use a `web-secure` (443) and `matrix-federation` (8448) entrypoints, as well as a `default` certificate resolver.
50
+
By default, the playbook configured a `default` certificate resolver and multiple entrypoints.
50
51
51
52
You need to configure 4 entrypoints for your Traefik server:
52
53
@@ -186,57 +187,3 @@ Instead of [Fronting the integrated reverse-proxy webserver with another reverse
186
187
This is more difficult, as you would need to handle the configuration for each service manually. Enabling additional services would come with extra manual work you need to do.
187
188
188
189
If your webserver is on the same machine, ensure your web server user (something like `http`, `apache`, `www-data`, `nginx`) is part of the `matrix` group. You should run something like this: `usermod -a -G matrix nginx`. This allows your webserver user to access files owned by the `matrix` group, so that it can serve static files from `/matrix/static-files`.
189
-
190
-
#### Using your own nginx reverse-proxy running on the same machine
191
-
192
-
**WARNING**: this type of setup is not maintained and will be removed in the near future. We recommend that you go for [Fronting the integrated reverse-proxy webserver with another reverse-proxy](#fronting-the-integrated-reverse-proxy-webserver-with-another-reverse-proxy) instead.
193
-
194
-
If you'll be using `nginx` running on the same machine (not in a container), you can make the playbook help you generate configuration for `nginx` with this configuration:
# If you want https configured in /matrix/nginx-proxy/conf.d/
200
-
matrix_nginx_proxy_https_enabled: true
201
-
202
-
# If you will manage SSL certificates yourself, uncomment the line below
203
-
# matrix_ssl_retrieval_method: none
204
-
205
-
# If you're using an old nginx version, consider using a custom protocol list
206
-
# (removing `TLSv1.3` that is enabled by default) to suit your nginx version.
207
-
# matrix_nginx_proxy_ssl_protocols: "TLSv1.2"
208
-
```
209
-
210
-
You can most likely directly use the config files installed by this playbook at: `/matrix/nginx-proxy/conf.d`. Just include them in your own `nginx.conf` like this: `include /matrix/nginx-proxy/conf.d/*.conf;`
211
-
212
-
#### Using your own reverse-proxy running on the same machine or elsewhere
213
-
214
-
**WARNING**: this is difficult to set up, likely not very well supported and will be removed in the future. We recommend that you go for [Fronting the integrated reverse-proxy webserver with another reverse-proxy](#fronting-the-integrated-reverse-proxy-webserver-with-another-reverse-proxy) instead.
215
-
216
-
To reverse-proxy manually for each service, use configuration like this:
With this configuration, each service will be exposed on a custom port. Example:
232
-
233
-
- Synapse will be exposed on port `8008`
234
-
-[Grafana](configuring-playbook-prometheus-grafana.md) will be exposed on port `3000`
235
-
-[synapse-admin](configuring-playbook-synapse-admin.md) will be exposed on port `8766`
236
-
237
-
You can capture traffic for these services and forward it to their port.
238
-
Some of these services are configured with certain default expecations with regard to hostname, path, etc., so it's not completely arbitrary where you can host them (unless you change the defaults).
239
-
240
-
For each new playbook service that you enable, you'll need special handling.
241
-
242
-
The [`examples/`](../examples/) directory contains examples for various servers: Caddy, Apache, HAproxy, Nginx, etc.
**NOTE**: When using `matrix-nginx-proxy` instead of Traefik, you won't be able to override the path prefix. You can only override the domain, but that needs to happen using another variable: `matrix_server_fqn_rageshake` (e.g. `matrix_server_fqn_rageshake: "some-domain.{{ matrix_domain }}"`).
Copy file name to clipboardexpand all lines: docs/configuring-playbook-sliding-sync-proxy.md
-2
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,6 @@ Element X iOS is [available on TestFlight](https://testflight.apple.com/join/uZb
10
10
11
11
Element X Android is [available on the Github Releases page](https://github.com/element-hq/element-x-android/releases).
12
12
13
-
**NOTE**: The Sliding Sync proxy **only works with the Traefik reverse-proxy**. If you have an old server installation (from the time `matrix-nginx-proxy` was our default reverse-proxy - `matrix_playbook_reverse_proxy_type: playbook-managed-nginx`), you won't be able to use Sliding Sync.
14
-
15
13
**NOTE**: The sliding-sync proxy is **not required** when using the **Conduit homeserver**. Starting from version `0.6.0` Conduit has native support for some sliding sync features. If there are issues with the native implementation, you might have a better experience when enabling the sliding-sync proxy anyway.
**NOTE**: When using `matrix-nginx-proxy` instead of Traefik, you won't be able to override the path prefix. You can only override the domain, but that needs to happen using another variable: `matrix_server_fqn_sygnal` (e.g. `matrix_server_fqn_sygnal: "push.{{ matrix_domain }}"`).
Copy file name to clipboardexpand all lines: docs/configuring-playbook-synapse-admin.md
-12
Original file line number
Diff line number
Diff line change
@@ -37,15 +37,3 @@ After installation, Synapse Admin will be accessible at: `https://matrix.DOMAIN/
37
37
To use Synapse Admin, you need to have [registered at least one administrator account](registering-users.md) on your server.
38
38
39
39
The Homeserver URL to use on Synapse Admin's login page is: `https://matrix.DOMAIN`
40
-
41
-
### Sample configuration for running behind Caddy v2
42
-
43
-
Below is a sample configuration for using this playbook with a [Caddy](https://caddyserver.com/v2) 2.0 reverse proxy (non-default configuration where `matrix-nginx-proxy` is disabled - `matrix_nginx_proxy_enabled: false`).
44
-
45
-
```caddy
46
-
# This is a basic configuration that will function the same as the default nginx proxy - exposing the synapse-admin panel to matrix.YOURSERVER.com/synapse-admin/
Copy file name to clipboardexpand all lines: docs/configuring-playbook-synapse.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ matrix_synapse_oidc_providers:
73
73
backchannel_logout_enabled: true # Optional
74
74
```
75
75
76
-
**NOTE**: if you inject the OIDC configuration using `matrix_synapse_configuration_extension_yaml` (instead of `matrix_synapse_oidc_enabled: true` + `matrix_synapse_oidc_providers`), then the OIDC routes (`/_synapse/oidc`) will not be publicly exposed automatically. In such a case, you'd need to expose them manually by toggling: `matrix_synapse_container_labels_public_client_synapse_oidc_api_enabled: true`.
76
+
**NOTE**: if you inject the OIDC configuration using `matrix_synapse_configuration_extension_yaml` (instead of `matrix_synapse_oidc_enabled: true` + `matrix_synapse_oidc_providers` as explained above), then the OIDC routes (`/_synapse/oidc`) will not be publicly exposed automatically. In such a case, you'd need to expose them manually by toggling: `matrix_synapse_container_labels_public_client_synapse_oidc_api_enabled: true`.
0 commit comments