matrix-docker-ansible-deploy/docs/configuring-dns.md

44 lines
3.4 KiB
Markdown
Raw Normal View History

# Configuring your DNS settings
<sup>[Prerequisites](prerequisites.md) > Configuring your DNS settings > [Getting the playbook](getting-the-playbook.md) > [Configuring the playbook](configuring-playbook.md) > [Installing](installing.md)</sup>
To set up Matrix on your domain, you'd need to do some DNS configuration.
## DNS setting for server delegation (optional)
In the sample `vars.yml` ([`examples/vars.yml`](../examples/vars.yml)), we recommend to use a short user ID like `@alice:example.com` instead of `@alice:matrix.example.com`.
To use such an ID, you don't need to install anything on the actual `example.com` server. Instead, you need to instruct the Matrix network that Matrix services for `example.com` are redirected over to `matrix.example.com`. This redirection is also known as "delegation".
2019-02-06 09:36:03 +02:00
As we discuss in [Server Delegation](howto-server-delegation.md), server delegation can be configured in either of these ways:
2019-02-06 09:36:03 +02:00
- Setting up a `/.well-known/matrix/server` file on the base domain (`example.com`)
- Setting up a `_matrix._tcp` DNS SRV record
For simplicity reasons, this playbook recommends you to set up server delegation via a `/.well-known/matrix/server` file, instead of using a DNS SRV record.
If you choose the recommended method (file-based delegation), you do not need to configure the DNS record to enable server delegation. You will need to add a necessary configuration later, when you [finalize the installation](installing.md#finalize-the-installation) after installing and starting Matrix services.
On the other hand, if you choose this method (setting up a DNS SRV record), you need to configure the additional DNS record as well as adjust SSL certificate handling. Take a look at this documentation for more information: [Server Delegation via a DNS SRV record (advanced)](howto-server-delegation.md#server-delegation-via-a-dns-srv-record-advanced)
2019-02-06 09:36:03 +02:00
2021-03-23 23:05:48 -05:00
## DNS settings for services enabled by default
Update docs/configuring-dns.md (#3786) * Update docs/configuring-dns.md: add note about DNS settings for default services Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md and docs/configuring-playbook-ma1sd.md: move the DNS setting (SRV record) for ma1sd to the latter Edit instruction to enable a SRV record for ma1sd. Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: remove repetitive explanations about necessity of subdomain settings Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: move explanation about subdomain settings up Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: fix tables layout Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: edit the section for TXT and MX records Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: move the row for ma1sd under the rows for CNAME records Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: replace "may be necessary" with "is necessary" as Element Web is installed by default Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: add a note about setting a SRV record for ma1sd Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: use the same string for IP address placeholder Also: adjust the table's layout Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: simplify the header for postmoogle DNS records configuration Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: switch the order of TXT and MX moogle for Postmoogle Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: simplify instructions for ma1sd and Postmoogle Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: fix the anchor link to rageshake documentation The issue was introduced with ea6e8794870074c6ebffc0ac3893c82eca0e0aa6 Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> --------- Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-11-17 17:10:40 +09:00
To serve the base domain (`example.com`) and [Element Web](configuring-playbook-client-element-web.md) with the default subdomain, adjust DNS records as below.
| Type | Host | Priority | Weight | Port | Target |
| ----- | ---------------------------- | -------- | ------ | ---- | ---------------------|
| A | `matrix` | - | - | - | `matrix-server-IP` |
| CNAME | `element` | - | - | - | `matrix.example.com` |
2020-03-23 17:13:58 +02:00
Update docs/configuring-dns.md (#3786) * Update docs/configuring-dns.md: add note about DNS settings for default services Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md and docs/configuring-playbook-ma1sd.md: move the DNS setting (SRV record) for ma1sd to the latter Edit instruction to enable a SRV record for ma1sd. Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: remove repetitive explanations about necessity of subdomain settings Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: move explanation about subdomain settings up Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: fix tables layout Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: edit the section for TXT and MX records Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: move the row for ma1sd under the rows for CNAME records Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: replace "may be necessary" with "is necessary" as Element Web is installed by default Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: add a note about setting a SRV record for ma1sd Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: use the same string for IP address placeholder Also: adjust the table's layout Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: simplify the header for postmoogle DNS records configuration Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: switch the order of TXT and MX moogle for Postmoogle Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: simplify instructions for ma1sd and Postmoogle Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: fix the anchor link to rageshake documentation The issue was introduced with ea6e8794870074c6ebffc0ac3893c82eca0e0aa6 Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> --------- Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-11-17 17:10:40 +09:00
As the table illustrates, you need to create 2 subdomains (`matrix.example.com` and `element.example.com`) and point both of them to your server's IP address (DNS `A` record or `CNAME` record is fine).
The `element.example.com` subdomain is necessary, because this playbook installs the [Element Web](https://github.com/element-hq/element-web) client for you by default. If you'd rather instruct the playbook not to install Element Web (`matrix_client_element_enabled: false` when [Configuring the playbook](configuring-playbook.md) later), feel free to skip the `element.example.com` DNS record.
Be mindful as to how long it will take for the DNS records to propagate.
Update docs for DNS settings etc. (#3936) * Update docs for DNS settings of the services which need its CNAME record by default - Buscarron - Go-NEB; fix a line on the instruction as well - wsproxy - Cinny - Element Web - Hydrogen - SchildiChat Web - Dimension - Etherpad - Jitsi - ntfy - Grafana - rageshake - Sygnal Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs for DNS settings of the services which do not need its CNAME record by default - matrix-alertmanager-receiver - Honoroit - maubot - Heisenbridge - Cactus Comments - Matrix Authentication Service - matrix-registration - Sliding Sync proxy - Synapse Admin - synapse-usage-exporter Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs for DNS settings: ma1sd Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs for DNS settings: Email2Matrix Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs for DNS settings: Postmoogle Remove the table from configuring-dns.md altogether Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs for Cinny and Dimension: adopt the common note Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update docs/configuring-dns.md: add "Note" to the line on using Cloudflare DNS Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> --------- Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-15 16:22:00 +09:00
**Note**: if you are using Cloudflare DNS, make sure to disable the proxy and set all records to "DNS only". Otherwise, fetching certificates will fail.
2024-11-03 21:08:10 +01:00
---------------------------------------------
[▶️](getting-the-playbook.md) When you're done with the DNS configuration and ready to proceed, continue with [Getting the playbook](getting-the-playbook.md).