selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
matrix-docker-ansible-deploy logo

Self-host matrix-docker-ansible-deploy

2026-10-19

Ansible playbook for self-hosted Matrix homeserver

ReleaseOpen SourceAGPL-3.0
Updated4 months ago
LanguageJinja
Setup difficultyAdvanced
Stars
6 519
RAM
2GB
Ports
80 (Traefik HTTP), 443 (Traefik HTTPS), 8448 (Matrix federation)
Requires
Exim, PostgreSQL, Traefik
matrix-docker-ansible-deploy screenshot 1

What is matrix-docker-ansible-deploy?

This Ansible playbook automates setting up a Matrix homeserver on your own hardware. It supports multiple server implementations including Synapse, Conduit, and Dendrite, and bundles a large collection of complementary services: web clients such as Element Web and Cinny, bridges to platforms like Discord, Slack, and Telegram, bots for moderation and reminders, and monitoring with Prometheus and Grafana. Everything runs in Docker containers managed by Ansible, with Traefik handling HTTPS via Let's Encrypt. The project targets Debian, Ubuntu, Arch, and RHEL-family distributions, offers a beginner-friendly quick-start path, and recommends at least 2 GB of RAM plus a domain name for federation.

matrix-docker-ansible-deploy alternatives

Should you self-host matrix-docker-ansible-deploy?

matrix-docker-ansible-deploy scores 71/100 on selfhost.directory (how scoring works) and ranks #6 of 110 in Chat. It has 6 519 GitHub stars, +23 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is AGPL-3.0-licensed and written mostly in Jinja.

Its closest alternative on selfhost.directory is Zulip (82/100, 26 189 stars). It scores higher overall, so compare the two before you pick. See matrix-docker-ansible-deploy vs Zulip side by side.

Features

  • Admin UI (Ketesa)
  • Automated SSL certificates
  • Backup with Borg
  • Bridges to external networks
  • Custom webserver support
  • LDAP Authentication
  • Matrix Authentication Service (OIDC/OAuth)
  • Matrix homeserver deployment
  • Monitoring with Prometheus and Grafana
  • Multiple homeserver choices
  • S3-compatible media storage
  • Self-hosted Matrix clients
  • Video conferencing (Jitsi)

matrix-docker-ansible-deploy README

Support room on Matrix donate REUSE status

Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker

🎯 Purpose

This Ansible playbook is meant to help you run your own Matrix homeserver, along with the various services related to that.

That is, it lets you join the Matrix network using your own user ID like @alice:example.com, all hosted on your own server (see prerequisites).

We run all supported services in Docker containers (see the container images we use), which lets us have a predictable and up-to-date setup, across multiple supported distros (see prerequisites) and architectures (x86/amd64 being recommended).

FAQ

Can I migrate an existing Synapse installation to this playbook?

Yes, the playbook provides guides for importing existing SQLite or PostgreSQL databases and media stores from other Synapse installations.

How do I keep my Matrix server updated?

You need to manually update by pulling the latest playbook changes and re-running the installation. The playbook does not update automatically.

Can I use my own webserver instead of Traefik?

Yes, you can configure the playbook to use your own webserver (nginx, Apache, etc.) instead of Traefik.

Can I use an external PostgreSQL server?

Yes, the playbook supports using an external PostgreSQL server instead of the containerized one.

Can I run this on a Raspberry Pi?

Yes, the playbook supports alternative architectures including ARM/Raspberry Pi, but performance depends on your use case.

What kind of server specs do I need?

At least 2GB RAM recommended. CPU and memory needs depend on the number of large federated rooms users join. For Jitsi, 2GB+ RAM is recommended.

Why use this playbook instead of installing Synapse manually?

The playbook installs and wires together many components (Synapse, PostgreSQL, Traefik, Element, bridges, etc.) automatically, handles SSL certificates, and provides predictable Docker-based deployments across distributions.

What is Ansible? How does it work?

Ansible is an automation tool that runs tasks on a remote server. This playbook is a collection of Ansible tasks that set up a Matrix server automatically.

What is Matrix? What is Element? What is Synapse?

Matrix is a decentralized real-time communication protocol. Element is a client program for Matrix. Synapse is the reference Matrix homeserver implementation.

More in Chat

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…