TiloBox
Back to directory
Synapse project preview

Synapse

A Matrix homeserver that manages users, rooms, federation, events, media, authentication, and client APIs.

LicenseAGPL-3.0
GitHub stars4.6k
Last commit1 weeks ago
Tags7 topics
MatrixFederationProductivityOpen SourceDeveloper ToolsPythonHomeserver
Overview

Why consider Synapse?

Synapse is the reference Matrix homeserver implementation written in Python and Rust for decentralized chat. It provides federated real-time messaging, end-to-end encryption support, and self-hosted communication infrastructure.

Guided learning

Learn Synapse by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

4 min read 4 sections
In this guide4 sections

Overview and Architecture

Synapse serves as the reference open source Matrix homeserver implementation maintained by Element for decentralized communication. Operating as the foundational server implementation for the Matrix protocol, Synapse empowers teams to establish private, federated, and encrypted communication backbones with complete ownership over data storage and routing policies. Full overview documentation is available in https://raw.githubusercontent.com/element-hq/synapse/develop/README.rst and source development is hosted on https://github.com/element-hq/synapse.

The open source distribution of Synapse is licensed under the GNU Affero General Public License version 3 to ensure server software transparency. Under this copyleft license, self-hosted deployments and network service modifications remain accessible to the community, with complete license terms documented at https://raw.githubusercontent.com/element-hq/synapse/develop/LICENSE-AGPL-3.0.

Release version v1.159.0 ships active homeserver updates with complete changelog records in the element-hq repository. Upgrading production nodes promptly ensures environments benefit from ongoing performance optimizations and security patches published at https://github.com/element-hq/synapse/releases/tag/v1.159.0.

Server Identity and Virtualenv Installation

Before initializing your homeserver configuration, establishing an accurate domain name is mandatory. The server name permanently defines the domain portion of all user IDs and governs federation discoverability across the Matrix network. Because this value cannot be migrated after state creation, administrators should review the official naming guidance in https://raw.githubusercontent.com/element-hq/synapse/develop/docs/setup/installation.md.

Synapse relies on a POSIX-compliant Python runtime alongside PostgreSQL for robust production database storage. To prepare an isolated Python environment on Linux or macOS systems, execute the standard package installation commands from https://raw.githubusercontent.com/element-hq/synapse/develop/docs/setup/installation.md:

sh
1mkdir -p ~/synapse
2virtualenv -p python3 ~/synapse/env
3source ~/synapse/env/bin/activate
4pip install --upgrade pip
5pip install --upgrade setuptools
6pip install matrix-synapse

PostgreSQL Database Configuration

PostgreSQL databases backing Synapse must be provisioned with UTF8 encoding and C locale to store federated event data correctly. Create the dedicated database user role and UTF8 database schema using the official instructions at https://raw.githubusercontent.com/element-hq/synapse/develop/docs/postgres.md:

sh
1# this will prompt for a password for the new user
2createuser --pwprompt synapse_user
3
4createdb --encoding=UTF8 --locale=C --template=template0 --owner=synapse_user synapse

Synapse uses psycopg2 connection pooling parameters to manage concurrent database worker connections. Populate the database configuration section inside homeserver.yaml with the connection arguments specified in https://raw.githubusercontent.com/element-hq/synapse/develop/docs/postgres.md:

yaml
1database:
2 name: psycopg2
3 args:
4 user: <user>
5 password: <pass>
6 dbname: <db>
7 host: <host>
8 cp_min: 5
9 cp_max: 10

Reverse Proxy Setup

Deploying a reverse proxy exposes standard HTTPS port 443 to client applications without requiring Synapse processes to bind privileged ports or run as root. A fronting Nginx server routes client and federation traffic to internal listener port 8008 while terminating TLS certificates, matching the reference configuration from https://raw.githubusercontent.com/element-hq/synapse/develop/docs/reverse_proxy.md:

nginx
1server {
2 listen 443 ssl;
3 listen [::]:443 ssl;
4
5 # For the federation port
6 listen 8448 ssl default_server;
7 listen [::]:8448 ssl default_server;
8
9 server_name matrix.example.com;
10
11 location ~ ^(/_matrix|/_synapse/client) {
12 # note: do not add a path (even a single /) after the port in `proxy_pass`,
13 # otherwise nginx will canonicalise the URI and cause signature verification
14 # errors.
15 proxy_pass http://localhost:8008;
16 proxy_set_header X-Forwarded-For $remote_addr;
17 proxy_set_header X-Forwarded-Proto $scheme;
18 proxy_set_header Host $host:$server_port;
19
20 # Nginx by default only allows file uploads up to 1M in size
21 # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
22 client_max_body_size 50M;
23
24 # Synapse responses may be chunked, which is an HTTP/1.1 feature.
25 proxy_http_version 1.1;
26 }
27}

The official Synapse website redirects administrators and developers to the latest documentation portal. Operators can access comprehensive guides on room versioning, clustering workers, and operational administration at https://element-hq.github.io/synapse and browse source repositories via https://github.com/element-hq/synapse.

Related tools

More options with a similar category or technology profile.

Synapse FAQs

Synapse is listed as a Communication tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository and official website for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

Synapse is listed under the AGPL-3.0 license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

Synapse is listed as an alternative to Slack. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.