# element-hq/synapse

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/element-hq-synapse).**

4,314 stars · 555 forks · Python · AGPL-3.0

## Links

- GitHub: https://github.com/element-hq/synapse
- Homepage: https://element-hq.github.io/synapse
- awesome-repositories: https://awesome-repositories.com/repository/element-hq-synapse.md

## Description

Synapse is a Matrix homeserver implementation that provides the infrastructure for decentralized, real-time communication and messaging. It functions as a federated chat server that synchronizes room data and event streams across independent server instances to enable cross-domain interoperability.

The server utilizes a hybrid core that integrates performance-critical logic in Rust with a Python orchestration layer. It employs a PostgreSQL relational database for persisting user accounts and conversation history, and uses a Redis-based messaging system to distribute tasks across horizontal workers.

The project covers a broad range of capabilities, including secure identity management with SAML and OpenID Connect integration, comprehensive administrative tools for content moderation and room management, and automated media handling. It also includes systems for decentralized federation, asynchronous database schema migration, and telemetry export for performance monitoring.

## Tags

### Networking & Communication

- [Communication Node Implementations](https://awesome-repositories.com/f/networking-communication/communication-node-implementations.md) — Implements a full server version of the Matrix open standard for decentralized, real-time communication. ([source](https://cdn.jsdelivr.net/gh/element-hq/synapse@develop/README.md))
- [Matrix Protocol Implementations](https://awesome-repositories.com/f/networking-communication/matrix-protocol-implementations.md) — Implements the Matrix open standard for decentralized, real-time communication and cross-domain interoperability.
- [Membership Management](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/membership-management.md) — Tracks and lists the rooms a user has joined, including historical membership states. ([source](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html))
- [Decentralized Messaging Systems](https://awesome-repositories.com/f/networking-communication/decentralized-messaging-systems.md) — Provides a decentralized communication platform that stores chat records and identities on a federated network.
- [Federated Protocols](https://awesome-repositories.com/f/networking-communication/federated-protocols.md) — Implements a decentralized protocol to synchronize room state and event streams across independent server instances.
- [Server Federation](https://awesome-repositories.com/f/networking-communication/server-federation.md) — Implements mechanisms for independent server nodes to synchronize data and enable cross-domain communication. ([source](https://cdn.jsdelivr.net/gh/element-hq/synapse@develop/README.md))
- [Automated Room Joining](https://awesome-repositories.com/f/networking-communication/automated-room-joining.md) — Automatically adds newly registered users to a specified list of default rooms or spaces. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Push Notification Managers](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/notification-delivery-services/push-notification-providers/web-push-notifications/push-notification-managers.md) — Calculates and sends push notifications and unread counts to clients with optional jitter. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Default Encryption](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/access-controlled-rooms/default-encryption.md) — Automatically applies end-to-end encryption to locally created communication rooms based on predefined policies. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Room Access Blocking](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/access-controlled-rooms/room-access-blocking.md) — Prevents users from joining specific rooms even if the room is not yet known to the server. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Room Metadata Retrieval](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/room-metadata-retrieval.md) — Retrieves room metadata including topic, avatar, encryption status, and lifecycle state. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Administrative Event Retrieval](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/room-metadata-retrieval/administrative-event-retrieval.md) — Allows administrators to fetch specific events from a room regardless of their own membership status. ([source](https://element-hq.github.io/synapse/latest/admin_api/fetch_event.html))
- [Room Member Listing](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/room-metadata-retrieval/room-member-listing.md) — Retrieves a complete list of all user IDs belonging to a specific room. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Room Message Retrieval](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/room-metadata-retrieval/room-message-retrieval.md) — Fetches room messages within a specified timeframe using pagination and event filters. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Room Removals](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/room-removals.md) — Implements the permanent removal of rooms with options to purge history or migrate users. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Room Alias Deletion](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-management/room-removals/room-alias-deletion.md) — Allows removing a room from the directory to free up its alias for reuse. ([source](https://element-hq.github.io/synapse/latest/usage/administration/admin_faq.html))
- [Room State Retrieval](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/group-membership-management/room-state-inspection/room-state-retrieval.md) — Retrieves current shared state events of a room with optional filtering by event types. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Federated Server Discovery](https://awesome-repositories.com/f/networking-communication/federated-server-discovery.md) — Implements mechanisms for servers to identify and establish connections with other peer servers in a decentralized network. ([source](https://element-hq.github.io/synapse/latest/federate.html))
- [TURN Server Integrations](https://awesome-repositories.com/f/networking-communication/internal-call-routing/turn-server-integrations.md) — Integrates with TURN servers to ensure reliable voice and video call connectivity across different networks. ([source](https://element-hq.github.io/synapse/latest/setup/installation.html))
- [Event History Persistence](https://awesome-repositories.com/f/networking-communication/messaging-channel-management/event-history-persistence.md) — Removes historic communication events from the database up to a specified timestamp to manage storage. ([source](https://element-hq.github.io/synapse/latest/admin_api/purge_history_api.html))
- [Network Listeners](https://awesome-repositories.com/f/networking-communication/network-listeners.md) — Defines TCP ports, bind addresses, and HTTP resources for client, federation, and administrative APIs. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Remote Media Caching](https://awesome-repositories.com/f/networking-communication/remote-media-caching.md) — Caches copies of media and thumbnails from remote servers locally to reduce latency and improve access speeds. ([source](https://element-hq.github.io/synapse/latest/media_repository.html))
- [Stale Cache Purging](https://awesome-repositories.com/f/networking-communication/remote-media-caching/stale-cache-purging.md) — Automatically purges local and remote cached media files that have not been accessed within a specified timeframe. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Well-Known Delegations](https://awesome-repositories.com/f/networking-communication/server-discovery/well-known-delegations.md) — Serves well-known URIs and DNS records to allow clients to automatically discover the homeserver. ([source](https://element-hq.github.io/synapse/latest/setup/installation.html))
- [Server Identity Delegation](https://awesome-repositories.com/f/networking-communication/server-identity-delegation.md) — Redirects server-to-server traffic to a specific instance using HTTPS files or DNS records. ([source](https://element-hq.github.io/synapse/latest/delegate.html))

### Data & Databases

- [Asynchronous Database Migrations](https://awesome-repositories.com/f/data-databases/asynchronous-database-migrations.md) — Performs database schema updates as non-blocking background tasks to ensure high availability during migrations.
- [Communication Data Management](https://awesome-repositories.com/f/data-databases/communication-data-management.md) — Implements systems for the persistence and lifecycle management of conversation history and associated media.
- [Worker Process Sharding](https://awesome-repositories.com/f/data-databases/horizontal-scaling/worker-process-sharding.md) — Distributes specific computational tasks like push notifications and federation across multiple worker processes. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Communication State Persistence](https://awesome-repositories.com/f/data-databases/persistent-storage-backends/pluggable-database-backends/mongodb-and-postgresql-backends/postgresql-adapters/communication-state-persistence.md) — Uses a PostgreSQL relational database to persist user accounts, room states, and message history.
- [Relational Data Storage](https://awesome-repositories.com/f/data-databases/relational-data-storage.md) — Uses a PostgreSQL relational database to persist communication state and extensive event history.
- [SQLite or PostgreSQL Storage](https://awesome-repositories.com/f/data-databases/sqlite-drivers/sqlite-storage-adapters/sqlite-or-postgresql-storage.md) — Supports both SQLite for testing and PostgreSQL for production as interchangeable relational database backends. ([source](https://element-hq.github.io/synapse/latest/setup/installation.html))
- [Automated Data Purging](https://awesome-repositories.com/f/data-databases/automated-data-purging.md) — Permanently deletes redacted events, forgotten rooms, and expired messages to optimize storage and performance. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Conversation Full-Text Indexes](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/full-text-search-indexes/conversation-full-text-indexes.md) — Creates a searchable index of conversational messages to enable instant keyword lookups. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Expired Record Purging](https://awesome-repositories.com/f/data-databases/database-record-management/expired-record-purging.md) — Automatically removes outdated message records from the database based on defined lifetime thresholds. ([source](https://element-hq.github.io/synapse/latest/message_retention_policies.html))
- [Distributed Databases](https://awesome-repositories.com/f/data-databases/distributed-databases.md) — Splits the datastore across multiple physical database nodes to improve horizontal scalability and performance. ([source](https://element-hq.github.io/synapse/latest/development/database_schema.html))
- [Media File Storages](https://awesome-repositories.com/f/data-databases/file-based-storage-systems/media-file-storages.md) — Manages the storage of uploaded and downloaded media files across diverse providers and local directories. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Schema Version Tracking](https://awesome-repositories.com/f/data-databases/schema-version-tracking.md) — Tracks applied database schema updates via unique identifiers to ensure codebase and database compatibility. ([source](https://element-hq.github.io/synapse/latest/development/database_schema.html))
- [Public Room Discovery](https://awesome-repositories.com/f/data-databases/search-indexing-technologies/search-indexing/search-and-indexing/public-room-discovery.md) — Controls the visibility and discovery of public chat rooms in the directory using specific filtering rules. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))

### Development Tools & Productivity

- [Performance Hybrid Cores](https://awesome-repositories.com/f/development-tools-productivity/compilers-toolchains/c-extension-interfaces/c-extension-development/rust-python-extension-developers/performance-hybrid-cores.md) — Integrates a Rust-based performance core for CPU-intensive tasks with a Python orchestration layer.
- [Hybrid Server Implementations](https://awesome-repositories.com/f/development-tools-productivity/compilers-toolchains/c-extension-interfaces/c-extension-development/rust-python-extension-developers/hybrid-server-implementations.md) — Employs a hybrid server architecture combining Python orchestration with performance-critical Rust logic.

### DevOps & Infrastructure

- [Redis-Backed Scaling](https://awesome-repositories.com/f/devops-infrastructure/high-availability-deployments/horizontal-scaling-deployments/redis-backed-scaling.md) — Relays replication commands between the main process and workers via a Redis message broker. ([source](https://element-hq.github.io/synapse/develop/upgrade.html))
- [Background Processing](https://awesome-repositories.com/f/devops-infrastructure/background-processing.md) — Uses a background worker pattern to handle compute-intensive maintenance and data updates without blocking the main request thread. ([source](https://element-hq.github.io/synapse/develop/upgrade.html))

### Programming Languages & Runtimes

- [Asynchronous Event Loops](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/asynchronous-event-loops.md) — Utilizes a Twisted-based non-blocking event loop to manage concurrent network connections and asynchronous I/O.
- [Partial State Synchronization](https://awesome-repositories.com/f/programming-languages-runtimes/data-compression-and-decompression/incremental-stream-processing/partial-state-synchronization.md) — Processes partial event streams to allow immediate access to conversations before full data synchronization is complete. ([source](https://element-hq.github.io/synapse/latest/development/synapse_architecture/faster_joins.html))

### Security & Cryptography

- [Account Data Access](https://awesome-repositories.com/f/security-cryptography/account-data-access.md) — Provides secure access to global and room-specific user account data, preference settings, and secret keys. ([source](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html))
- [User Account Management](https://awesome-repositories.com/f/security-cryptography/user-account-management.md) — Provides comprehensive management of user accounts, including profile modification, querying, and locking status. ([source](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html))
- [User Account Registrations](https://awesome-repositories.com/f/security-cryptography/user-account-registrations.md) — Provides multiple pathways for creating new user accounts via client-facing toggles or secure command-line utilities. ([source](https://element-hq.github.io/synapse/latest/setup/installation.html))
- [Registration Flow Controls](https://awesome-repositories.com/f/security-cryptography/user-account-registrations/registration-flow-controls.md) — Provides configurable controls for user registration, including email verification, captchas, and token-based onboarding. ([source](https://element-hq.github.io/synapse/develop/upgrade.html))
- [User Identity Management](https://awesome-repositories.com/f/security-cryptography/user-identity-management.md) — Implements systems for managing user profiles and resolving identities via external provider IDs, emails, and phone numbers. ([source](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html))
- [Rate Limit Overrides](https://awesome-repositories.com/f/security-cryptography/api-rate-limiters/rate-limit-overrides.md) — Provides administrative capabilities to adjust or disable API request limits for specific users to allow higher traffic volumes. ([source](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html))
- [CAS Integrations](https://awesome-repositories.com/f/security-cryptography/cas-integrations.md) — Delegates user authentication to external CAS servers to enable centralized identity management. ([source](https://element-hq.github.io/synapse/latest/development/cas.html))
- [External Identity Provider Integration](https://awesome-repositories.com/f/security-cryptography/external-identity-provider-integration.md) — Integrates with external identity providers and OpenID Connect to handle secure user login. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [OIDC Identity Integrations](https://awesome-repositories.com/f/security-cryptography/oidc-identity-integrations.md) — Integrates OpenID Connect, SAML, and JWT for secure, centralized user identity management.
- [Username and Password Policy Enforcements](https://awesome-repositories.com/f/security-cryptography/password-management/password-policies/username-and-password-policy-enforcements.md) — Validates passwords against complexity criteria, including minimum length and character variety, during account creation and updates. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Request Rate Limiting](https://awesome-repositories.com/f/security-cryptography/request-rate-limiting.md) — Implements per-second and burst limits on incoming client requests to prevent system abuse and ensure availability. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [SAML Authentication](https://awesome-repositories.com/f/security-cryptography/saml-authentication.md) — Supports single sign-on by connecting to external identity providers using the SAML protocol. ([source](https://element-hq.github.io/synapse/latest/development/saml.html))
- [JWT Token Validators](https://awesome-repositories.com/f/security-cryptography/security/policies/token-validation/bearer-token-validators/jwt-token-validators.md) — Validates JSON Web Tokens to verify user identity and claims for passwordless access. ([source](https://element-hq.github.io/synapse/latest/jwt.html))
- [JWT Authentications](https://awesome-repositories.com/f/security-cryptography/token-authentication/jwt-authentications.md) — Uses signed JWTs to grant user access and maintain stateless sessions across distributed requests.

### Software Engineering & Architecture

- [Asynchronous Background Processors](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-background-processors.md) — Offloads time-consuming operations like database migrations and history purges to background processes to maintain responsiveness.
- [Request Delegation](https://awesome-repositories.com/f/software-engineering-architecture/server-side-logic-frameworks/request-delegation.md) — Routes specific requests to dedicated worker processes to improve overall system responsiveness and speed. ([source](https://element-hq.github.io/synapse/develop/upgrade.html))
- [State Set Optimizations](https://awesome-repositories.com/f/software-engineering-architecture/state-difference-calculations/state-set-optimizations.md) — Uses specialized algorithms to calculate differences between complex state sets, reducing synchronization overhead. ([source](https://element-hq.github.io/synapse/latest/auth_chain_difference_algorithm.html))
- [Database Schema Migrations](https://awesome-repositories.com/f/software-engineering-architecture/data-migrators/database-schema-migrations.md) — Applies sequential SQL or Python delta files to automatically update and version the database schema. ([source](https://element-hq.github.io/synapse/latest/development/database_schema.html))
- [Worker Messaging Backends](https://awesome-repositories.com/f/software-engineering-architecture/distributed-coordination-systems/task-coordinations/master-worker-coordination/redis-backed-master-worker-coordinations/worker-messaging-backends.md) — Uses Redis as a messaging backend to relay replication commands between the main process and distributed workers.
- [Module-Based Extensions](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/developer-authoring-interfaces/custom-module-implementations/module-functionality-extenders/module-based-extensions.md) — Allows extending server functionality by integrating external packages as modules. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Database Change Notifications](https://awesome-repositories.com/f/software-engineering-architecture/schema-based-state-validation/cross-state-validation/state-change-triggers/database-change-notifications.md) — Broadcasts notifications when database state changes to trigger responses from distributed worker processes. ([source](https://element-hq.github.io/synapse/latest/development/synapse_architecture/streams.html))

### Business & Productivity Software

- [Chat Room Administration](https://awesome-repositories.com/f/business-productivity-software/messaging-channel-administration/channel-lifecycle-management/chat-room-administration.md) — Provides administrative tools for managing the internal state of chat rooms, including topics and member lists.
- [Administrative Power Level Assignment](https://awesome-repositories.com/f/business-productivity-software/messaging-channel-administration/channel-lifecycle-management/chat-room-administration/administrative-power-level-assignment.md) — Enables assigning the highest available local power level to a specified user within a room. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Administrative Room Membership](https://awesome-repositories.com/f/business-productivity-software/messaging-channel-administration/channel-lifecycle-management/chat-room-administration/administrative-room-membership.md) — Provides the ability to force local user accounts to join specific rooms using administrative privileges. ([source](https://element-hq.github.io/synapse/latest/admin_api/room_membership.html))
- [Room Listings](https://awesome-repositories.com/f/business-productivity-software/messaging-channel-administration/channel-lifecycle-management/chat-room-administration/room-listings.md) — Provides paginated listings of rooms filtered by visibility, membership, or search terms. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Application Service Integration](https://awesome-repositories.com/f/business-productivity-software/third-party-application-integrations/application-service-integration.md) — Links external bots and third-party application services to the server via configuration and namespace management. ([source](https://element-hq.github.io/synapse/latest/application_services.html))

### Content Management & Publishing

- [Permanent Media Removers](https://awesome-repositories.com/f/content-management-publishing/media-content-deletion/permanent-media-removers.md) — Permanently removes media files and their corresponding database records from the server based on age or specific IDs. ([source](https://element-hq.github.io/synapse/latest/admin_api/media_admin_api.html))

### System Administration & Monitoring

- [Active User Quotas](https://awesome-repositories.com/f/system-administration-monitoring/active-user-quotas.md) — Enforces global limits on the total number of unique active users allowed on the system within a monthly timeframe. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
- [Administrative APIs](https://awesome-repositories.com/f/system-administration-monitoring/administrative-apis.md) — Provides authenticated programmatic interfaces for managing server operations and configurations. ([source](https://element-hq.github.io/synapse/latest/reverse_proxy.html))
- [Space Hierarchy Retrieval](https://awesome-repositories.com/f/system-administration-monitoring/chat-space-management/space-hierarchy-retrieval.md) — Retrieves the depth-first tree structure of a space and its child rooms without requiring membership. ([source](https://element-hq.github.io/synapse/latest/admin_api/rooms.html))
- [Privilege Promotions](https://awesome-repositories.com/f/system-administration-monitoring/user-account-administration/privilege-promotions.md) — Provides administrative operations to elevate user account permissions to grant server management privileges. ([source](https://element-hq.github.io/synapse/latest/usage/administration/admin_faq.html))
- [User Presence Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/user-presence-monitoring.md) — Monitors and broadcasts the real-time online or offline status of both local and remote users. ([source](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html))
