# spantaleev/matrix-docker-ansible-deploy architecture

> Architecture diagram of the GitHub repository spantaleev/matrix-docker-ansible-deploy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/spantaleev/matrix-docker-ansible-deploy
- Repository: https://github.com/spantaleev/matrix-docker-ansible-deploy

## Overview

This repository is an Ansible playbook for deploying and maintaining a self-hosted Matrix server and related services in Docker. The main workflow is an operator running the playbook to configure a homeserver and supporting services; users then connect through hosted Matrix clients. The README documents the major service roles and a few key relationships, but the supplied source excerpts do not include the playbook’s runtime task wiring, so the graph limits connections to documented relationships.

Main entry points: [`roles/custom/matrix-base`](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-base) (Ansible playbook), [`roles/custom/matrix-client-element`](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-client-element) (Web clients), [`roles/custom/matrix-synapse`](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-synapse) (Synapse), [`roles/custom/matrix-conduit`](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-conduit) (Conduit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Homeserver"]
  node_playbook["Ansible playbook"]
  node_synapse["Synapse"]
  node_conduit["Conduit"]
  node_continuwuity["continuwuity"]
  node_tuwunel["Tuwunel"]
  node_dendrite["Dendrite"]
end

subgraph group_access["Client Access"]
  node_webclients["Web clients"]
  node_traefik["Traefik"]
end

subgraph group_support["Server Services"]
  node_certificates["TLS certificates"]
  node_postgres[("PostgreSQL")]
  node_email["Outgoing email"]
end

subgraph group_integrations["Optional Services"]
  node_bridges["Messaging bridges"]
  node_bots["Matrix bots"]
  node_authentication["Authentication service"]
  node_media["Media repository"]
end

node_operator(("Server operator"))
node_users(("Matrix users"))

node_operator -->|"runs"| node_playbook
node_playbook -->|"configures"| node_synapse
node_playbook -->|"configures"| node_conduit
node_playbook -->|"configures"| node_continuwuity
node_playbook -->|"configures"| node_tuwunel
node_playbook -->|"configures"| node_dendrite
node_playbook -->|"configures"| node_webclients
node_playbook -->|"configures"| node_traefik
node_playbook -->|"configures"| node_certificates
node_playbook -->|"configures"| node_postgres
node_playbook -->|"configures"| node_email
node_playbook -->|"configures"| node_bridges
node_playbook -->|"configures"| node_bots
node_playbook -->|"configures"| node_authentication
node_playbook -->|"configures"| node_media
node_traefik -->|"fronts services"| node_webclients
node_certificates -->|"secures"| node_webclients
node_postgres -->|"stores data"| node_synapse
node_email -->|"sends mail"| node_synapse
node_users -->|"connect through"| node_webclients

click node_playbook "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-base"
click node_synapse "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-synapse"
click node_conduit "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-conduit"
click node_continuwuity "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-continuwuity"
click node_tuwunel "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-tuwunel"
click node_dendrite "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-dendrite"
click node_webclients "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-client-element"
click node_bridges "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-bridge-mautrix-discord"
click node_bots "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-bot-draupnir"
click node_authentication "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-authentication-service"
click node_media "https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-media-repo"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_playbook,node_synapse,node_conduit,node_continuwuity,node_tuwunel,node_dendrite,node_users toneBlue
class node_webclients,node_traefik toneAmber
class node_certificates,node_postgres,node_email,node_operator toneMint
class node_bridges,node_bots,node_authentication,node_media toneRose
```

## Components

### Homeserver

- [Ansible playbook](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-base): `roles/custom/matrix-base`
- [Synapse](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-synapse): `roles/custom/matrix-synapse`
- [Conduit](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-conduit): `roles/custom/matrix-conduit`
- [continuwuity](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-continuwuity): `roles/custom/matrix-continuwuity`
- [Tuwunel](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-tuwunel): `roles/custom/matrix-tuwunel`
- [Dendrite](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-dendrite): `roles/custom/matrix-dendrite`

### Client Access

- [Web clients](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-client-element): `roles/custom/matrix-client-element`
- **Traefik**

### Server Services

- **TLS certificates**
- **PostgreSQL**
- **Outgoing email**

### Optional Services

- [Messaging bridges](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-bridge-mautrix-discord): `roles/custom/matrix-bridge-mautrix-discord`
- [Matrix bots](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-bot-draupnir): `roles/custom/matrix-bot-draupnir`
- [Authentication service](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-authentication-service): `roles/custom/matrix-authentication-service`
- [Media repository](https://github.com/spantaleev/matrix-docker-ansible-deploy/tree/master/roles/custom/matrix-media-repo): `roles/custom/matrix-media-repo`

### Other components

- **Server operator**
- **Matrix users**

## Connections

- Server operator → Ansible playbook: runs
- Ansible playbook → Synapse: configures
- Ansible playbook → Conduit: configures
- Ansible playbook → continuwuity: configures
- Ansible playbook → Tuwunel: configures
- Ansible playbook → Dendrite: configures
- Ansible playbook → Web clients: configures
- Ansible playbook → Traefik: configures
- Ansible playbook → TLS certificates: configures
- Ansible playbook → PostgreSQL: configures
- Ansible playbook → Outgoing email: configures
- Ansible playbook → Messaging bridges: configures
- Ansible playbook → Matrix bots: configures
- Ansible playbook → Authentication service: configures
- Ansible playbook → Media repository: configures
- Traefik → Web clients: fronts services
- TLS certificates → Web clients: secures
- PostgreSQL → Synapse: stores data
- Outgoing email → Synapse: sends mail
- Matrix users → Web clients: connect through
