-
Patrick Cloke authored
And update the upgrade notes to point at old versions of the documentation.
Patrick Cloke authoredAnd update the upgrade notes to point at old versions of the documentation.
Upgrading Synapse
Before upgrading check if any special steps are required to upgrade from the version you currently have installed to the current version of Synapse. The extra instructions that may be required are listed later in this document.
-
Check that your versions of Python and PostgreSQL are still supported.
Synapse follows upstream lifecycles for Python and PostgreSQL, and removes support for versions which are no longer maintained.
The website https://endoflife.date also offers convenient summaries.
-
If Synapse was installed using prebuilt packages, you will need to follow the normal process for upgrading those packages.
-
If Synapse was installed from source, then:
-
Activate the virtualenv before upgrading. For example, if Synapse is installed in a virtualenv in
~/synapse/env
then run:source ~/synapse/env/bin/activate
-
If Synapse was installed using pip then upgrade to the latest version by running:
pip install --upgrade matrix-synapse
If Synapse was installed using git then upgrade to the latest version by running:
git pull pip install --upgrade .
-
Restart Synapse:
synctl restart
-
To check whether your update was successful, you can check the running server version with:
# you may need to replace 'localhost:8008' if synapse is not configured
# to listen on port 8008.
curl http://localhost:8008/_synapse/admin/v1/server_version
Rolling back to older versions
Rolling back to previous releases can be difficult, due to database schema changes between releases. Where we have been able to test the rollback process, this will be noted below.
In general, you will need to undo any changes made during the upgrade process, for example:
-
pip:
source env/bin/activate # replace `1.3.0` accordingly: pip install matrix-synapse==1.3.0
-
Debian:
# replace `1.3.0` and `stretch` accordingly: wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
Upgrading to v1.57.0
Changes to database schema for application services
Synapse v1.57.0 includes a change to the way transaction IDs are managed for application services. If your deployment uses a dedicated worker for application service traffic, it must be stopped when the database is upgraded (which normally happens when the main process is upgraded), to ensure the change is made safely without any risk of reusing transaction IDs.
Deployments which do not use separate worker processes can be upgraded as normal. Similarly, deployments where no applciation services are in use can be upgraded as normal.
Upgrading to v1.56.0
Open registration without verification is now disabled by default
Synapse will refuse to start if registration is enabled without email, captcha, or token-based verification unless the new config
flag enable_registration_without_verification
is set to "true".
Groups/communities feature has been deprecated
The non-standard groups/communities feature in Synapse has been deprecated and will be disabled by default in Synapse v1.58.0.
You can test disabling it by adding the following to your homeserver configuration:
experimental_features:
groups_enabled: false
Change in behaviour for PostgreSQL databases with unsafe locale
Synapse now refuses to start when using PostgreSQL with non-C
values for COLLATE
and
CTYPE
unless the config flag allow_unsafe_locale
, found in the database section of
the configuration file, is set to true
. See the PostgreSQL documentation
for more information and instructions on how to fix a database with incorrect values.
Upgrading to v1.55.0
synctl
script has been moved
The synctl
script
has been made an
entry point
and no longer exists at the root of Synapse's source tree. If you wish to use
synctl
to manage your homeserver, you should invoke synctl
directly, e.g.
synctl start
instead of ./synctl start
or /path/to/synctl start
.
You will need to ensure synctl
is on your PATH
.
- This is automatically the case when using Debian packages or docker images provided by Matrix.org.
- When installing from a wheel, sdist, or PyPI, a
synctl
executable is added to your Python installation'sbin
. This should be on yourPATH
automatically, though you might need to activate a virtual environment depending on how you installed Synapse.
Compatibility dropped for Mjolnir 1.3.1 and earlier
Synapse v1.55.0 drops support for Mjolnir 1.3.1 and earlier. If you use the Mjolnir module to moderate your homeserver, please upgrade Mjolnir to version 1.3.2 or later before upgrading Synapse.
Upgrading to v1.54.0
Legacy structured logging configuration removal
This release removes support for the structured: true
logging configuration
which was deprecated in Synapse v1.23.0. If your logging configuration contains
structured: true
then it should be modified based on the
structured logging documentation.
Upgrading to v1.53.0
webclient
listeners and non-HTTP(S) web_client_location
Dropping support for Per the deprecation notice in Synapse v1.51.0, listeners of type webclient
are no longer supported and configuring them is a now a configuration error.
Configuring a non-HTTP(S) web_client_location
configuration is is now a
configuration error. Since the webclient
listener is no longer supported, this
setting only applies to the root path /
of Synapse's web server and no longer
the /_matrix/client/
path.
Stablisation of MSC3231
The unstable validity-check endpoint for the Registration Tokens feature has been stabilised and moved from:
/_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity
to: