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

Commit 586c8c0

Browse files
committed
Merge branch 'release-v1.19.1' of github.com:matrix-org/synapse into anoa/amorgan.xyz
* 'release-v1.19.1' of github.com:matrix-org/synapse: (197 commits) Changelog fixes 1.19.1rc1 Fix join ratelimiter breaking profile updates and idempotency (#8153) Do not apply ratelimiting on joins to appservices (#8139) Changelog changes 1.19.0 More changelog tweaks More changelog tweaks Remove unwanted changelog line 1.19.0rc1 Convert the roommember database to async/await. (#8070) Convert devices database to async/await. (#8069) Add type hints to handlers.message and events.builder (#8067) Convert account data, device inbox, and censor events databases to async/await (#8063) Convert appservice, group server, profile and more databases to async (#8066) Fix typing for notifier (#8064) Convert tags and metrics databases to async/await (#8062) Converts event_federation and registration databases to async/await (#8061) Add comment explaining cast Update changelog.d/8051.misc ...
2 parents 51ed870 + 0a4e541 commit 586c8c0

File tree

590 files changed

+14024
-9131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

590 files changed

+14024
-9131
lines changed

.circleci/config.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ jobs:
44
machine: true
55
steps:
66
- checkout
7-
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} -t matrixdotorg/synapse:${CIRCLE_TAG}-py3 .
7+
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} .
88
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
99
- run: docker push matrixdotorg/synapse:${CIRCLE_TAG}
10-
- run: docker push matrixdotorg/synapse:${CIRCLE_TAG}-py3
1110
dockerhubuploadlatest:
1211
machine: true
1312
steps:
1413
- checkout
15-
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest -t matrixdotorg/synapse:latest-py3 .
14+
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest .
1615
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
1716
- run: docker push matrixdotorg/synapse:latest
18-
- run: docker push matrixdotorg/synapse:latest-py3
1917

2018
workflows:
2119
version: 2

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ about: Create a report to help us improve
44

55
---
66

7+
<!--
8+
79
**THIS IS NOT A SUPPORT CHANNEL!**
810
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**,
911
please ask in **#synapse:matrix.org** (using a matrix.org account if necessary)
1012
11-
<!--
12-
1313
If you want to report a security issue, please see https://matrix.org/security-disclosure-policy/
1414
1515
This is a bug report template. By following the instructions below and

CHANGES.md

Lines changed: 219 additions & 0 deletions
Large diffs are not rendered by default.

INSTALL.md

Lines changed: 100 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
- [Choosing your server name](#choosing-your-server-name)
2+
- [Picking a database engine](#picking-a-database-engine)
23
- [Installing Synapse](#installing-synapse)
34
- [Installing from source](#installing-from-source)
45
- [Platform-Specific Instructions](#platform-specific-instructions)
56
- [Prebuilt packages](#prebuilt-packages)
67
- [Setting up Synapse](#setting-up-synapse)
78
- [TLS certificates](#tls-certificates)
9+
- [Client Well-Known URI](#client-well-known-uri)
810
- [Email](#email)
911
- [Registering a user](#registering-a-user)
1012
- [Setting up a TURN server](#setting-up-a-turn-server)
@@ -27,6 +29,25 @@ that your email address is probably `[email protected]` rather than
2729
`[email protected]`) - but doing so may require more advanced setup: see
2830
[Setting up Federation](docs/federate.md).
2931

32+
# Picking a database engine
33+
34+
Synapse offers two database engines:
35+
* [PostgreSQL](https://www.postgresql.org)
36+
* [SQLite](https://sqlite.org/)
37+
38+
Almost all installations should opt to use PostgreSQL. Advantages include:
39+
40+
* significant performance improvements due to the superior threading and
41+
caching model, smarter query optimiser
42+
* allowing the DB to be run on separate hardware
43+
44+
For information on how to install and use PostgreSQL, please see
45+
[docs/postgres.md](docs/postgres.md)
46+
47+
By default Synapse uses SQLite and in doing so trades performance for convenience.
48+
SQLite is only recommended in Synapse for testing purposes or for servers with
49+
light workloads.
50+
3051
# Installing Synapse
3152

3253
## Installing from source
@@ -234,17 +255,18 @@ for a number of platforms.
234255

235256
There is an offical synapse image available at
236257
https://hub.docker.com/r/matrixdotorg/synapse which can be used with
237-
the docker-compose file available at [contrib/docker](contrib/docker). Further information on
238-
this including configuration options is available in the README on
239-
hub.docker.com.
258+
the docker-compose file available at [contrib/docker](contrib/docker). Further
259+
information on this including configuration options is available in the README
260+
on hub.docker.com.
240261

241262
Alternatively, Andreas Peters (previously Silvio Fricke) has contributed a
242263
Dockerfile to automate a synapse server in a single Docker image, at
243264
https://hub.docker.com/r/avhost/docker-matrix/tags/
244265

245266
Slavi Pantaleev has created an Ansible playbook,
246267
which installs the offical Docker image of Matrix Synapse
247-
along with many other Matrix-related services (Postgres database, riot-web, coturn, mxisd, SSL support, etc.).
268+
along with many other Matrix-related services (Postgres database, Element, coturn,
269+
ma1sd, SSL support, etc.).
248270
For more details, see
249271
https://github.com/spantaleev/matrix-docker-ansible-deploy
250272

@@ -277,22 +299,27 @@ The fingerprint of the repository signing key (as shown by `gpg
277299
/usr/share/keyrings/matrix-org-archive-keyring.gpg`) is
278300
`AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058`.
279301

280-
#### Downstream Debian/Ubuntu packages
302+
#### Downstream Debian packages
281303

282-
For `buster` and `sid`, Synapse is available in the Debian repositories and
283-
it should be possible to install it with simply:
304+
We do not recommend using the packages from the default Debian `buster`
305+
repository at this time, as they are old and suffer from known security
306+
vulnerabilities. You can install the latest version of Synapse from
307+
[our repository](#matrixorg-packages) or from `buster-backports`. Please
308+
see the [Debian documentation](https://backports.debian.org/Instructions/)
309+
for information on how to use backports.
310+
311+
If you are using Debian `sid` or testing, Synapse is available in the default
312+
repositories and it should be possible to install it simply with:
284313

285314
```
286315
sudo apt install matrix-synapse
287316
```
288317

289-
There is also a version of `matrix-synapse` in `stretch-backports`. Please see
290-
the [Debian documentation on
291-
backports](https://backports.debian.org/Instructions/) for information on how
292-
to use them.
318+
#### Downstream Ubuntu packages
293319

294-
We do not recommend using the packages in downstream Ubuntu at this time, as
295-
they are old and suffer from known security vulnerabilities.
320+
We do not recommend using the packages in the default Ubuntu repository
321+
at this time, as they are old and suffer from known security vulnerabilities.
322+
The latest version of Synapse can be installed from [our repository](#matrixorg-packages).
296323

297324
### Fedora
298325

@@ -405,13 +432,11 @@ so, you will need to edit `homeserver.yaml`, as follows:
405432
```
406433

407434
* You will also need to uncomment the `tls_certificate_path` and
408-
`tls_private_key_path` lines under the `TLS` section. You can either
409-
point these settings at an existing certificate and key, or you can
410-
enable Synapse's built-in ACME (Let's Encrypt) support. Instructions
411-
for having Synapse automatically provision and renew federation
412-
certificates through ACME can be found at [ACME.md](docs/ACME.md).
413-
Note that, as pointed out in that document, this feature will not
414-
work with installs set up after November 2019.
435+
`tls_private_key_path` lines under the `TLS` section. You will need to manage
436+
provisioning of these certificates yourself — Synapse had built-in ACME
437+
support, but the ACMEv1 protocol Synapse implements is deprecated, not
438+
allowed by LetsEncrypt for new sites, and will break for existing sites in
439+
late 2020. See [ACME.md](docs/ACME.md).
415440

416441
If you are using your own certificate, be sure to use a `.pem` file that
417442
includes the full certificate chain including any intermediate certificates
@@ -421,6 +446,60 @@ so, you will need to edit `homeserver.yaml`, as follows:
421446
For a more detailed guide to configuring your server for federation, see
422447
[federate.md](docs/federate.md).
423448

449+
## Client Well-Known URI
450+
451+
Setting up the client Well-Known URI is optional but if you set it up, it will
452+
allow users to enter their full username (e.g. `@user:<server_name>`) into clients
453+
which support well-known lookup to automatically configure the homeserver and
454+
identity server URLs. This is useful so that users don't have to memorize or think
455+
about the actual homeserver URL you are using.
456+
457+
The URL `https://<server_name>/.well-known/matrix/client` should return JSON in
458+
the following format.
459+
460+
```
461+
{
462+
"m.homeserver": {
463+
"base_url": "https://<matrix.example.com>"
464+
}
465+
}
466+
```
467+
468+
It can optionally contain identity server information as well.
469+
470+
```
471+
{
472+
"m.homeserver": {
473+
"base_url": "https://<matrix.example.com>"
474+
},
475+
"m.identity_server": {
476+
"base_url": "https://<identity.example.com>"
477+
}
478+
}
479+
```
480+
481+
To work in browser based clients, the file must be served with the appropriate
482+
Cross-Origin Resource Sharing (CORS) headers. A recommended value would be
483+
`Access-Control-Allow-Origin: *` which would allow all browser based clients to
484+
view it.
485+
486+
In nginx this would be something like:
487+
```
488+
location /.well-known/matrix/client {
489+
return 200 '{"m.homeserver": {"base_url": "https://<matrix.example.com>"}}';
490+
add_header Content-Type application/json;
491+
add_header Access-Control-Allow-Origin *;
492+
}
493+
```
494+
495+
You should also ensure the `public_baseurl` option in `homeserver.yaml` is set
496+
correctly. `public_baseurl` should be set to the URL that clients will use to
497+
connect to your server. This is the same URL you put for the `m.homeserver`
498+
`base_url` above.
499+
500+
```
501+
public_baseurl: "https://<matrix.example.com>"
502+
```
424503

425504
## Email
426505

@@ -439,7 +518,7 @@ email will be disabled.
439518

440519
## Registering a user
441520

442-
The easiest way to create a new user is to do so from a client like [Riot](https://riot.im).
521+
The easiest way to create a new user is to do so from a client like [Element](https://element.io/).
443522

444523
Alternatively you can do so from the command line if you have installed via pip.
445524

README.rst

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ which handle:
4545
- Eventually-consistent cryptographically secure synchronisation of room
4646
state across a global open network of federated servers and services
4747
- Sending and receiving extensible messages in a room with (optional)
48-
end-to-end encryption[1]
48+
end-to-end encryption
4949
- Inviting, joining, leaving, kicking, banning room members
5050
- Managing user accounts (registration, login, logout)
5151
- Using 3rd Party IDs (3PIDs) such as email addresses, phone numbers,
@@ -82,9 +82,6 @@ at the `Matrix spec <https://matrix.org/docs/spec>`_, and experiment with the
8282

8383
Thanks for using Matrix!
8484

85-
[1] End-to-end encryption is currently in beta: `blog post <https://matrix.org/blog/2016/11/21/matrixs-olm-end-to-end-encryption-security-assessment-released-and-implemented-cross-platform-on-riot-at-last>`_.
86-
87-
8885
Support
8986
=======
9087

@@ -115,12 +112,11 @@ Unless you are running a test instance of Synapse on your local machine, in
115112
general, you will need to enable TLS support before you can successfully
116113
connect from a client: see `<INSTALL.md#tls-certificates>`_.
117114

118-
An easy way to get started is to login or register via Riot at
119-
https://riot.im/app/#/login or https://riot.im/app/#/register respectively.
115+
An easy way to get started is to login or register via Element at
116+
https://app.element.io/#/login or https://app.element.io/#/register respectively.
120117
You will need to change the server you are logging into from ``matrix.org``
121118
and instead specify a Homeserver URL of ``https://<server_name>:8448``
122119
(or just ``https://<server_name>`` if you are using a reverse proxy).
123-
(Leave the identity server as the default - see `Identity servers`_.)
124120
If you prefer to use another client, refer to our
125121
`client breakdown <https://matrix.org/docs/projects/clients-matrix>`_.
126122

@@ -137,7 +133,7 @@ it, specify ``enable_registration: true`` in ``homeserver.yaml``. (It is then
137133
recommended to also set up CAPTCHA - see `<docs/CAPTCHA_SETUP.md>`_.)
138134

139135
Once ``enable_registration`` is set to ``true``, it is possible to register a
140-
user via `riot.im <https://riot.im/app/#/register>`_ or other Matrix clients.
136+
user via a Matrix client.
141137

142138
Your new user name will be formed partly from the ``server_name``, and partly
143139
from a localpart you specify when you create the account. Your name will take
@@ -183,30 +179,6 @@ versions of synapse.
183179

184180
.. _UPGRADE.rst: UPGRADE.rst
185181

186-
187-
Using PostgreSQL
188-
================
189-
190-
Synapse offers two database engines:
191-
* `SQLite <https://sqlite.org/>`_
192-
* `PostgreSQL <https://www.postgresql.org>`_
193-
194-
By default Synapse uses SQLite in and doing so trades performance for convenience.
195-
SQLite is only recommended in Synapse for testing purposes or for servers with
196-
light workloads.
197-
198-
Almost all installations should opt to use PostgreSQL. Advantages include:
199-
200-
* significant performance improvements due to the superior threading and
201-
caching model, smarter query optimiser
202-
* allowing the DB to be run on separate hardware
203-
* allowing basic active/backup high-availability with a "hot spare" synapse
204-
pointing at the same DB master, as well as enabling DB replication in
205-
synapse itself.
206-
207-
For information on how to install and use PostgreSQL, please see
208-
`docs/postgres.md <docs/postgres.md>`_.
209-
210182
.. _reverse-proxy:
211183

212184
Using a reverse proxy with Synapse
@@ -255,10 +227,9 @@ email address.
255227
Password reset
256228
==============
257229

258-
If a user has registered an email address to their account using an identity
259-
server, they can request a password-reset token via clients such as Riot.
260-
261-
A manual password reset can be done via direct database access as follows.
230+
Users can reset their password through their client. Alternatively, a server admin
231+
can reset a users password using the `admin API <docs/admin_api/user_admin_api.rst#reset-password>`_
232+
or by directly editing the database as shown below.
262233

263234
First calculate the hash of the new password::
264235

UPGRADE.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ for example:
7575
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
7676
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
7777
78+
Upgrading to v1.18.0
79+
====================
80+
81+
Docker `-py3` suffix will be removed in future versions
82+
-------------------------------------------------------
83+
84+
From 10th August 2020, we will no longer publish Docker images with the `-py3` tag suffix. The images tagged with the `-py3` suffix have been identical to the non-suffixed tags since release 0.99.0, and the suffix is obsolete.
85+
86+
On 10th August, we will remove the `latest-py3` tag. Existing per-release tags (such as `v1.18.0-py3`) will not be removed, but no new `-py3` tags will be added.
87+
88+
Scripts relying on the `-py3` suffix will need to be updated.
89+
90+
Redis replication is now recommended in lieu of TCP replication
91+
---------------------------------------------------------------
92+
93+
When setting up worker processes, we now recommend the use of a Redis server for replication. **The old direct TCP connection method is deprecated and will be removed in a future release.**
94+
See `docs/workers.md <docs/workers.md>`_ for more details.
95+
7896
Upgrading to v1.14.0
7997
====================
8098

0 commit comments

Comments
 (0)