TL;DR — Quick Summary

Deploy Element and Matrix Synapse for self-hosted end-to-end encrypted messaging. Federated communication with bridges to Slack, Discord, and Telegram.

Element + Matrix — Encrypted, Decentralized Messaging

services:
  synapse:
    image: matrixdotorg/synapse:latest
    container_name: synapse
    restart: always
    ports:
      - "8008:8008"
    volumes:
      - synapse-data:/data
    environment:
      - SYNAPSE_SERVER_NAME=matrix.yourdomain.com
      - SYNAPSE_REPORT_STATS=no

  element:
    image: vectorim/element-web:latest
    container_name: element
    restart: always
    ports:
      - "8080:80"
    volumes:
      - ./element-config.json:/app/config.json

  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: synapse
      POSTGRES_USER: synapse
      POSTGRES_PASSWORD: synapse
    volumes:
      - synapse-db:/var/lib/postgresql/data

volumes:
  synapse-data:
  synapse-db:

Features

Feature Description
E2E encryption End-to-end encrypted by default
Federation Communicate across servers
Bridges Slack, Discord, Telegram, WhatsApp
Rooms & Spaces Organize conversations
Voice/Video Built-in calls with Jitsi
Threads Organized threaded replies
Bots Automation and integrations
Clients Web, iOS, Android, Desktop