Skip to main content
[ PIER ]

Matrix Synapse (SQLite)

A single-container Matrix homeserver — for personal use and tests.

Service #chat#messaging#matrix#federation#communication

Matrix Synapse with the default SQLite backend in one container. Lightweight, zero-dependency setup for personal homeservers, small family/friend communities, and protocol testing. For production federation or busy rooms, use the matrix-synapse-postgresql template instead.

Deploy with Pier

  1. 1 Open the Pier dashboard and click Add service.
  2. 2 Pick Matrix Synapse (SQLite) from the template list.
  3. 3 Choose the version, set a service name, and Pier provisions the container, storage, and ports automatically.
  4. 4 Attach a domain if you want HTTPS. Traefik auto-provisions the Let's Encrypt certificate.

What is Matrix Synapse (SQLite)?

Same Synapse — the reference Matrix homeserver — but configured with the default SQLite backend instead of PostgreSQL. The result is a single container, easy to deploy, easy to back up, perfect for personal homeservers, small communities, or development work.

You still get the full Matrix protocol — federation with every other homeserver on the network, end-to-end encryption, voice and video, bridges to Telegram/Discord/WhatsApp/Signal — just at a smaller scale.

How Pier deploys it

This template runs the official matrixdotorg/synapse image with the default SQLite store. Default port: 8008 (HTTP, behind Traefik with TLS when you attach a custom domain).

The data volume mounts at /data and contains homeserver.db, homeserver.yaml, and the media store. Backups are trivial — a copy of the volume while the container is paused.

After the first launch, run register_new_matrix_user via docker exec to create the admin user, then point Element clients at the homeserver URL.

When NOT to use this template

The moment you have more than a handful of active users, or you start joining busy public rooms with many federated participants, SQLite becomes the bottleneck. Migrate to the matrix-synapse-postgresql template — Synapse ships a synapse_port_db script that does the conversion in one pass.

For experimental lightweight homeservers, Dendrite (Go) and Conduit (Rust) offer alternatives. For hosted Matrix without ops work, Element Matrix Services exists. Self-hosted SQLite Synapse hits the sweet spot for single-user and small-group homeservers.

Key features

Single container

Synapse + SQLite in one image. No separate database to provision, back up, or coordinate restarts with. Easiest possible self-host.

Full Matrix protocol

Federation, E2EE, bridges, voice/video calls, room versions — all the spec features Synapse supports work the same as on Postgres builds.

Element clients work everywhere

Point Element Web / iOS / Android / desktop at your homeserver URL — full E2EE chat, voice, video, file sharing.

Bridges to other platforms

Telegram, Discord, WhatsApp, Signal, IRC, Slack, XMPP bridges all run as separate services that talk to Synapse via the appservice API.

Tiny resource footprint

~200 MB RAM idle, sub-1 GB under typical personal use. Runs comfortably on a $5 VPS for a homeserver shared with a few friends.

Use cases

Personal homeserver

A homeserver for one user (you) plus a few friends. Lightweight, low-maintenance, federated with the rest of Matrix.

Family / household chat

Run a homeserver for your family so kids and grandparents share one Element app instead of WhatsApp + iMessage + SMS.

Protocol testing & development

Spin up a throwaway homeserver to test Matrix bots, bridges, clients, or appservices without paying for hosted Matrix.

Small community

Self-hosted homeserver for a discord server you're moving off, a small subreddit moving to Matrix, or a private interest group.

Code examples

First-user registration (admin) bash
docker exec -it pier-synapse-sqlite \
  register_new_matrix_user \
    -u alice \
    -p strongpassword \
    -a \
    -c /data/homeserver.yaml \
    http://localhost:8008
Discovery .well-known files bash
# /.well-known/matrix/server (served at apex domain)
{"m.server": "matrix.example.com:443"}

# /.well-known/matrix/client
{"m.homeserver": {"base_url": "https://matrix.example.com"}}
Federation health check bash
curl https://federationtester.matrix.org/api/report?server_name=matrix.example.com | jq '.FederationOK'
Bridging to Telegram (separate appservice) yaml
# Run mautrix-telegram as a second Pier service
# docker-compose snippet (simplified)
services:
  mautrix-telegram:
    image: dock.mau.dev/mautrix/telegram:latest
    environment:
      HOMESERVER_URL: http://synapse:8008
    volumes:
      - ./tg:/data

How it compares

vs matrix-synapse-postgresql (this catalog) Use the PostgreSQL template for any production deployment with federation or large rooms. SQLite is fine for personal/testing use but cannot keep up with federation traffic on busy rooms.
vs Dendrite, Conduit Alternative Matrix homeservers in Go and Rust. Lighter resource footprint than Synapse, but less feature-complete and less battle-tested. Synapse remains the reference implementation.
vs matrix.org hosted homeservers (Element Matrix Services) Hosted Matrix is fast to start but you give up data sovereignty and pay per user. Self-hosting is free except for the VPS bill.

Frequently asked questions

Why would I choose SQLite over PostgreSQL?
Simpler deployment (one container), lower idle resource use, no separate database to back up. The trade-off is performance under federation load — fine for a personal server, not for a busy public homeserver.
Can I migrate from SQLite to PostgreSQL later?
Yes — Synapse ships a synapse_port_db script that migrates the database. You'll redeploy as the postgresql template and run the migration once.
How many users can a SQLite homeserver realistically handle?
Single-digit users actively using it is comfortable. A dozen low-activity users still works. Beyond that, federation joins on big rooms start choking SQLite and you should migrate.
Do bridges work?
Yes — bridges are separate appservices that talk to Synapse via HTTP, independent of the database backend. Telegram, Discord, WhatsApp, Signal bridges all work the same.
What about voice and video?
1-to-1 WebRTC calls work out of the box. Group calls need Element Call or Jitsi as a separate service. A coturn TURN server is needed for users behind strict NAT.
Backups?
Back up the data volume (homeserver.db + media store). SQLite makes this easy — a copy of the .db file with the server stopped is a consistent backup.

Related services

Deploy on your VPS

Matrix Synapse with the default SQLite backend in one container. Lightweight, zero-dependency setup for personal homeservers, small family/friend communities, and protocol testing. For production federation or busy rooms, use the matrix-synapse-postgresql template instead.

Deploy this service →