Element Web

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

13.3Kstars
2.7Kforks
GNU AGPLv3
TypeScript

Element Web is a full-featured Matrix protocol client for browsers and desktop that delivers end-to-end encrypted messaging, voice/video calls, and group collaboration without relying on any central authority. Built by New Vector Ltd (the company behind the Matrix standard), it is the reference implementation for what a Matrix client can be — rich, accessible, and deeply integrated with the protocol’s federation and encryption capabilities.

Organizations from government agencies to NGOs use Element to replace proprietary platforms like Microsoft Teams or Slack while retaining sovereignty over their data. Deployments range from a single Docker container serving a small team to multi-server federated environments spanning national infrastructure. Because Element speaks the open Matrix protocol, users on your Element instance can communicate with anyone on any other Matrix server worldwide.

The project is a TypeScript monorepo hosting the web app, Electron-wrapped desktop application, and a growing set of shared component packages. It ships on a weekly release cadence with long-term support branches, making it suitable for organizations that need predictable upgrade paths alongside mission-critical deployments.

What You Get

  • End-to-End Encrypted Messaging - All messages and media are encrypted using the Matrix protocol’s Olm and Megolm cryptographic primitives, ensuring that only the intended participants can read conversations — not even the server operator.
  • Decentralized Federation - Users on your self-hosted Element instance can communicate seamlessly with users on any other Matrix server globally, eliminating the walled gardens of proprietary chat platforms.
  • Flexible Deployment Options - Install from a release tarball on any web server, run the official Docker image, install the Debian package, or build from source — all without mandatory cloud dependencies.
  • Native Desktop Application - The Electron-wrapped desktop app mirrors the full web experience with system notification integration, offline support, and OS-level keybinding, available for macOS, Windows, and Linux.
  • Module Extension System - A documented module API allows organizations and third-party vendors to extend Element’s functionality — adding custom authentication flows, UI components, or enterprise features — without forking the codebase.
  • Comprehensive Encryption Management - Cross-signing, key backup, device verification, and key dehydration give users and administrators granular control over cryptographic identity across multiple devices and sessions.
  • Threaded Conversations and Spaces - Organize rooms into Spaces (similar to workspaces), use threads for focused discussions within a room, and apply rich filtering to manage large communities.
  • Element Call Integration - Native video conferencing powered by Element Call (WebRTC) is available directly within rooms, with support for large group calls without external infrastructure.

Common Use Cases

  • Sovereign Government Communications - A national ministry deploys Element on its own infrastructure to replace Microsoft Teams, ensuring all inter-agency communications remain within sovereign data centers and comply with local data residency laws.
  • Air-Gapped Defense Networks - A military organization runs Element on isolated networks with no internet connectivity, using a self-hosted Synapse homeserver to enable secure coordination entirely within a closed environment.
  • Cross-Organization NGO Collaboration - An international NGO connects field offices across multiple countries on a federated Matrix network, allowing staff using different homeservers to collaborate in shared rooms without centralizing data.
  • Enterprise Internal Chat Replacement - A mid-size company self-hosts Element with Active Directory OIDC integration to provide a branded internal chat platform with IT-controlled user management and full message audit capability.
  • Open-Source Community Hub - A large open-source project uses the public Matrix federation to host a community space accessible to contributors via Element Web, Element X, or any other Matrix client without lock-in.
  • Healthcare Secure Messaging - A hospital deploys Element on HIPAA-compliant infrastructure to enable encrypted clinical team communications, file sharing, and video calls without routing patient data through third-party servers.

Under The Hood

Architecture Element Web is organized as a layered, event-driven monorepo orchestrated with Nx, with clear separation between web application, Electron desktop wrapper, shared component packages, and pluggable module extensions. The core interaction model is a flux-style dispatcher feeding a rich collection of domain-specific async stores — covering room lists, notification state, widget lifecycle, OIDC session management, and more — each built on reusable base abstractions. React contexts propagate the MatrixClient instance and scoped room state downward through component trees, enabling granular re-renders without prop drilling. The module system provides documented lifecycle hooks so enterprise vendors can inject custom authentication flows, UI decorations, and crypto setup extensions without modifying core source code, a genuinely clean extension architecture for a project of this complexity.

Tech Stack The primary language is TypeScript throughout, running on React with a custom async store pattern rather than a general-purpose state library. Build orchestration uses webpack for the web bundle (with Nx caching) and Electron Builder for desktop packages. The Matrix JS SDK — backed by a Rust-based Olm/Megolm crypto layer compiled to WebAssembly — handles all protocol communication, sync, and encryption. End-to-end tests are written in Playwright across more than fifty test directories including dedicated crypto suites. Unit tests run in Vitest. SonarCloud provides continuous vulnerability scanning and coverage reporting. The Compound design system supplies accessible, themeable UI primitives, and PostHog handles analytics instrumentation.

Code Quality Test coverage is extensive, spanning Playwright end-to-end suites for critical crypto flows (device verification, key dehydration, history sharing, invisible crypto) and broad Vitest unit coverage across stores, utilities, and viewmodels. TypeScript strict mode is enforced across the entire monorepo. Custom ESLint plugins codify project-specific conventions, and SonarCloud gates the main branch against vulnerability and quality regressions. Error handling is generally explicit — failed crypto operations surface through structured dialogs rather than silent degradation — though the root MatrixChat orchestrator component has accumulated considerable size over the project’s decade-long history, reflecting the natural complexity of a full-featured Matrix client.

What Makes It Unique Element Web’s most distinctive technical characteristic is treating cryptography as a visible, first-class UI concern rather than an invisible background service. End-to-end encryption state is reflected in real time across the interface — room header icons change based on join rules, URL previews are toggled based on whether a room is encrypted, and event shields communicate the verification status of every message sender. The module extension API allows commercial builds to enhance the open-source base without forking, enabling Element to serve both community users and enterprise deployments from a single codebase. The room list store’s evolution to a v3 implementation using skip-list data structures reflects performance-driven architectural iteration that most clients at this maturity level simply don’t undertake.

Self-Hosting

Element Web is released under a triple license: the GNU Affero General Public License v3 (AGPL-3.0), the GNU General Public License v3 (GPL-3.0), and a paid commercial license available from Element. For most self-hosters, the AGPL-3.0 is the relevant choice. AGPL requires that if you run a modified version of the software as a network service, you must make your modifications available to users of that service — a stronger copyleft requirement than standard GPL. Organizations that simply deploy the unmodified Element Web to their own users are unlikely to be affected by this clause. However, teams building proprietary extensions or white-label products on top of Element Web would need either to open-source their modifications or purchase a commercial license from Element.

Running Element Web yourself requires a compatible Matrix homeserver — most commonly Synapse or Dendrite — which is a separate installation with its own operational requirements. The web client itself is a static build deployable on any web server or CDN, and the official Docker image simplifies this considerably. However, the homeserver component demands meaningful infrastructure: a PostgreSQL database, storage for media files, and capacity planning based on user count and federation activity. Organizations are responsible for uptime, database backups, TLS certificate management, and security patching of both the homeserver and the Element Web static files.

Compared to the hosted app.element.io service or the managed Element Server Suite (ESS), self-hosting gives you complete data sovereignty but trades away managed upgrades, built-in high-availability configurations, professional support SLAs, and the compliance certifications that Element offers enterprise customers. The commercial license and ESS tier also unlock additional enterprise features around access control, compliance logging, and white-labeling that are not present in the open-source build. Teams evaluating self-hosting should weigh the operational burden — particularly homeserver maintenance — against the significant benefit of keeping all communications data under their own control.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search