Added a bit about delegation and DNS.

This commit is contained in:
Hans van Zijst 2024-11-13 17:00:39 +01:00 committed by Valentin Gagarin
parent 729b4bb7c3
commit cef83bf03c

View file

@ -61,10 +61,7 @@ listeners:
compress: false compress: false
``` ```
## Database
# Database
The default installation leaves you with an sqlite3 database. Nice for experimenting, but The default installation leaves you with an sqlite3 database. Nice for experimenting, but
unsuitable for a production environment. unsuitable for a production environment.
@ -112,7 +109,7 @@ After changing the database, restart Synapse and check whether it can connect
and create the tables it needs. and create the tables it needs.
# Create admin ## Create admin
Synapse doesn't create an admin account at install time, so you'll have to do Synapse doesn't create an admin account at install time, so you'll have to do
that yourself. that yourself.
@ -136,9 +133,41 @@ register_new_matrix_user -u admin -a -c /etc/matrix-synapse/conf.d/keys.yaml
This will ask for a password, choose a safe one. This will ask for a password, choose a safe one.
# Logging ## Logging
Logging is configured in `log.yaml`. Some logging should go to systemd, the Logging is configured in `log.yaml`. Some logging should go to systemd, the
more specific logging to Synapse's own logfile(s). more specific logging to Synapse's own logfile(s).
# Delegation and DNS
If you run your server under a different FQDN than just the domain name you
want to use, you need to delegate: point from your domain to the server.
Example. You want to use example.com for your domain, but your server is
called matrix.example.com. To make that work, you need to serve 2 bits of
JSON-code on https://example.com/ to point clients and servers to the correct
machine: matrix.example.com.
Pointing servers to the correct server is done by publishing this bit of
JSON-code under `https://example.com/.well-known/matrix/server`:
```
{
"m.homeserver": {"base_url": "https://matrix.example.com"},
"org.matrix.msc3575.proxy": {"url": "https://matrix.example.com"}
}
```
Pointing clients to the correct server needs this at
`https://example.com/.well-known/matrix/client`:
```
{
"m.server": "matrix.example.com"
}
```
Very important: both names (example.com and matrix.example.com) must be A
and/or AAAA records in DNS, not CNAME.