Madic-.matrix-synapse-auto-deploy
Auto-deployment for matrix-org/synapse
This Ansible role sets up a ready-to-use Matrix server on any server. Unlike the matrix-docker-ansible-deploy, it does not use Docker but instead utilizes a Python 3 virtual environment for Synapse.
Services
This role configures the following services on your server:
Synapse: The official Matrix "homeserver" from the core development team at matrix.org.
Coturn: A STUN/TURN server for WebRTC audio and video calls.
mxisd: A federated Matrix Identity server to enhance privacy (doc).
nginx: A web server for riot.web and a reverse proxy for Synapse and mxisd.
PostgreSQL: The database used by Synapse and mxisd.
Riot: A web UI set up for your homeserver.
Let's Encrypt: Provides TLS certificates for Riot and Synapse.
You can find a small Architecture Overview.
Pre-requirements
- Git
- Ansible version 2.6 or higher
- DNS Entries
- A Records
- A Record for matrix-machine.yourdomain.tld.
- A Record for riot-webclient.yourdomain.tld.
- SRV Record
_matrix._tcp.yourdomain.tld. 3600 IN SRV 10 5 443 matrix-machine.yourdomain.tld.
_matrix-identity._tcp.yourdomain.tld. 3600 IN SRV 10 5 443 matrix-machine.yourdomain.tld.
- A Records
You need an SRV entry to tell other homeservers which port to use. Additionally, .well-known files will be created under {{ matrix_well_known_location }}. You will need to move these files to the server that serves your main domain.
Supported Operating Systems
- Ubuntu 18.04
- Debian 9
It should also work well on any systemd-based OS. Feel free to test it and provide feedback (or submit a pull request to support your favorite system).
Installation
All variables are listed in roles/matrix-synapse-auto-deploy/defaults/main.yml. You need to customize them for your setup. Check the playbook.example.yml file for the most important variables.
ansible-playbook playbook.example.yml --extra-vars "host=matrix.domain.com" -b -K
Enjoy
You can now connect to your homeserver using the Riot web client or by setting your homeserver in any other client.