Skip to main content

Matrix Homeservers

A homeserver is the backbone of your Matrix experience - it stores your account, messages, and handles federation with other servers.

What is a Homeserver?

Your homeserver:

  • Stores your account and authentication
  • Persists messages from rooms you're in
  • Federates with other homeservers
  • Handles media uploads and downloads
  • Manages encryption keys and device verification

Homeserver Options

Use a Public Homeserver

The easiest option - just sign up:

HomeserverRegistrationNotes
matrix.orgOpenLargest, run by Matrix.org Foundation
envs.netOpenPrivacy-focused, no phone required
tchncs.deOpenGerman, privacy-respecting
nitro.chatOpenFast, US-based
matrix.imOpenCommunity server
tip

For privacy, consider smaller homeservers. matrix.org is popular but high-traffic means more metadata exposure.

Run Your Own Homeserver

Full control over your data:

ImplementationLanguageBest For
SynapsePythonFeatures, compatibility
DendriteGoEfficiency, scaling
ConduitRustSimplicity, performance

Quick Comparison

FeatureSynapseDendriteConduit
MaturityStableStableBeta
FeaturesCompleteMostCore
RAM (idle)300MB+50MB20MB
SetupModerateEasyEasiest
FederationFullFullFull
AppservicesFullFullBasic
DocumentationExtensiveGoodGrowing

Choosing Your Approach

When to Use a Public Server

  • Testing Matrix - Try before self-hosting
  • Low maintenance - No server to manage
  • Quick start - Instant account creation

When to Self-Host

  • Privacy - Full control over data
  • Compliance - Meet regulatory requirements
  • Customization - Configure everything
  • Communities - Run servers for your group
  • Learning - Understand the protocol

Hardware Requirements

Minimum (Small Instance)

For personal use or small groups:

ResourceSynapseDendriteConduit
RAM1 GB512 MB256 MB
CPU1 core1 core1 core
Storage10 GB5 GB5 GB

For communities up to ~1000 users:

ResourceSynapseDendriteConduit
RAM4 GB2 GB1 GB
CPU2 cores2 cores1 core
Storage50 GB30 GB20 GB

Production (Large Instance)

For organizations or large communities:

ResourceSynapseDendrite
RAM8+ GB4+ GB
CPU4+ cores2+ cores
Storage100+ GB SSD50+ GB SSD
DatabasePostgreSQLPostgreSQL

Domain Setup

You'll need a domain for your homeserver:

example.com              → Your main domain
matrix.example.com → Homeserver address
element.example.com → (Optional) Web client

Well-Known Delegation

If you want Matrix IDs like @user:example.com but host on matrix.example.com:

Option 1: .well-known file

Create https://example.com/.well-known/matrix/server:

{
"m.server": "matrix.example.com:443"
}

Option 2: SRV record

_matrix._tcp.example.com. 3600 IN SRV 10 0 443 matrix.example.com.

Essential Services

Database

HomeserverSQLitePostgreSQL
SynapseDev onlyRecommended
DendriteSmallRecommended
ConduitBuilt-inNot needed
warning

Never use SQLite for Synapse in production. It will become extremely slow.

Reverse Proxy

A reverse proxy (nginx, Caddy, Traefik) handles:

  • SSL/TLS termination
  • Federation port (8448)
  • Client API port (443)
  • Rate limiting

Media Storage

Options for media storage:

  • Local disk - Simple, good for small instances
  • S3/MinIO - Scalable, good for large instances
  • CDN - Best performance for global access

Security Considerations

Network Security

Ports needed:
- 443 → Client API (HTTPS)
- 8448 → Federation (HTTPS)

Optional:
- 3478 → TURN server (VoIP)
- 5349 → TURN TLS

Data Protection

  • Enable E2EE by default for new rooms
  • Regular backups of database and media
  • Key backup setup for users
  • Access logs for audit trails

Rate Limiting

Protect against abuse:

  • Login attempts
  • Registration (if open)
  • Message sending
  • Federation requests

Monitoring

Track homeserver health:

MetricTool
SynapsePrometheus + Grafana
DendritePrometheus + Grafana
ConduitMetrics endpoint

Key metrics to watch:

  • Federation lag
  • Database size
  • Memory usage
  • API response times

Next Steps


Continue: Synapse | Dendrite | Conduit