Self-host matrix-docker-ansible-deploy
2026-10-19Ansible playbook for self-hosted Matrix homeserver
- Stars
- 6 519
- RAM
- 2GB
- Ports
- 80 (Traefik HTTP), 443 (Traefik HTTPS), 8448 (Matrix federation)
- Requires
- Exim, PostgreSQL, Traefik
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
ConduitA self-hosted, open-source Matrix homeserver written in Rust, shipped as Docker images, Debian packages and static Linux binaries; easy to set up and federation-capable.CompareConduit with matrix-docker-ansible-deploy
HomelabOSOpen-source Ansible toolkit for a self-hosted homelab: deploys 100+ Docker services behind Traefik with Let's Encrypt HTTPS, Tor access, and nightly restic backups.CompareHomelabOS with matrix-docker-ansible-deploy
yantrYantr is a self-hosted homelab app store running as a rootless Podman container alongside your Linux OS — no appliance, no root daemon, ~140 MB RAM at idle.Compareyantr with matrix-docker-ansible-deploy
synapse-adminOpen-source, self-hosted web admin console for Matrix Synapse homeservers, built on react-admin and served as a static site or Docker container.Comparesynapse-admin with matrix-docker-ansible-deploy
MaelstromOpen-source Rust Matrix homeserver that scales horizontally via stateless nodes, SurrealDB on TiKV, and UDP gossip clustering.CompareMaelstrom with matrix-docker-ansible-deploy
HomelabARR CEA free, open-source dashboard for one-click deployment of 100+ self-hosted apps like Plex, Jellyfin, and Sonarr on your own Linux server via Docker Compose.CompareHomelabARR CE with matrix-docker-ansible-deploy
dockgeA self-hosted, open-source web UI for Docker Compose stacks: create, edit and deploy compose.yaml files, with a live web terminal and multi-host agents.Comparedockge with matrix-docker-ansible-deploy
lab-dashSelf-hosted dashboard for managing homelab applications with customizable grid layout, service health checks, and PWA support.Comparelab-dash with matrix-docker-ansible-deploy
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
Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
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
Matrix IRC BridgeSelf-hosted, open-source IRC bridge that connects Matrix homeservers to IRC networks with two-way messaging, private messages, and dynamic channel mapping.
Matrix SynapseSelf-hosted, open-source Matrix homeserver that runs your own federated chat server, with SAML/OIDC/CAS single sign-on, an admin API and PostgreSQL-backed worker scaling.
mattermostMattermost is a self-hosted collaboration platform with channels, threads, file sharing, voice calls and playbooks for DevSecOps, IT service desk and incident response.
mautrix-metaSelf-hosted open-source Matrix bridge for Facebook Messenger and Instagram DMs, syncing media, reactions, edits and history, with end-to-bridge encryption.
Mesh-BotSelf-hosted, open-source Python bot for Meshtastic mesh networks with network testing, BBS messaging, games, weather alerts, AI, and radio monitoring.
MeshChatXSelf-hosted Reticulum client with LXMF messaging, LXST calls, NomadNet browsing, relay chat, and mapping. Run via Docker, Python wheels, Flatpak, AppImage, or Android APK
metronomeMetronome IM is a self-hosted, open-source XMPP server forked from Prosody with microblogging, MUC, PubSub, and HTTP APIs.
MindRoomSelf-hosted AI agent platform with persistent memory, 100+ tool integrations, and Matrix-based chat. Run locally or on your servers with local or cloud models per agent.
mira-OSSMIRA is a self-hosted, open-source AI assistant with a single continuous conversation thread, first-person long-term memory, and autonomous tool use.
MoltisSelf-hosted, open-source AI agent server in a single Rust binary: multi-provider LLMs, voice, memory, MCP tools, and Telegram/Discord/Slack channels.
moltnetMoltnet is a self-hosted, open-source chat network giving AI agents shared rooms, DMs, and persistent history from a single binary with a browser console.
MongooseIMMongooseIM is a self-hosted, open-source XMPP server built for massive scale and enterprise use, supporting clustering, multi-tenancy, and multiple auth methods.

0 comments