This documentation may be out of date!

This documentation site is for the versions of Synapse maintained by the Matrix.org Foundation (github.com/matrix-org/synapse), available under the Apache 2.0 licence.

Since version 1.99, Synapse is now maintained by Element under a new licence (github.com/element-hq/synapse).

If you are interested in the documentation for a later version of Synapse, please click here to navigate to this same page on the latest Element Synapse documentation site, if it's available.

Installation Instructions

Choosing your server name

It is important to choose the name for your server before you install Synapse, because it cannot be changed later.

The server name determines the "domain" part of user-ids for users on your server: these will all be of the format @user:my.domain.name. It also determines how other matrix servers will reach yours for federation.

For a test configuration, set this to the hostname of your server. For a more production-ready setup, you will probably want to specify your domain (example.com) rather than a matrix-specific hostname here (in the same way that your email address is probably user@example.com rather than user@email.example.com) - but doing so may require more advanced setup: see Setting up Federation.

Installing Synapse

Prebuilt packages

Prebuilt packages are available for a number of platforms. These are recommended for most users.

Docker images and Ansible playbooks

There is an official synapse image available at https://hub.docker.com/r/matrixdotorg/synapse or at ghcr.io/matrix-org/synapse which can be used with the docker-compose file available at contrib/docker. Further information on this including configuration options is available in the README on hub.docker.com.

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

Slavi Pantaleev has created an Ansible playbook, which installs the official Docker image of Matrix Synapse along with many other Matrix-related services (Postgres database, Element, coturn, ma1sd, SSL support, etc.). For more details, see https://github.com/spantaleev/matrix-docker-ansible-deploy

Debian/Ubuntu

Matrix.org packages

Matrix.org provides Debian/Ubuntu packages of Synapse, for the amd64 architecture via https://packages.matrix.org/debian/.

To install the latest release:

sudo apt install -y lsb-release wget apt-transport-https
sudo wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main" |
    sudo tee /etc/apt/sources.list.d/matrix-org.list
sudo apt update
sudo apt install matrix-synapse-py3

Packages are also published for release candidates. To enable the prerelease channel, add prerelease to the sources.list line. For example:

sudo wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main prerelease" |
    sudo tee /etc/apt/sources.list.d/matrix-org.list
sudo apt update
sudo apt install matrix-synapse-py3

The fingerprint of the repository signing key (as shown by gpg /usr/share/keyrings/matrix-org-archive-keyring.gpg) is AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058.

When installing with Debian packages, you might prefer to place files in /etc/matrix-synapse/conf.d/ to override your configuration without editing the main configuration file at /etc/matrix-synapse/homeserver.yaml. By doing that, you won't be asked if you want to replace your configuration file when you upgrade the Debian package to a later version.

Downstream Debian packages

Andrej Shadura maintains a matrix-synapse package in the Debian repositories. For bookworm and sid, it can be installed simply with:

sudo apt install matrix-synapse

Synapse is also available in bullseye-backports. Please see the Debian documentation for information on how to use backports.

matrix-synapse is no longer maintained for buster and older.

Downstream Ubuntu packages