Matrix (Synapse backend)

Matrix is a decentralized, federated chat platform built on open standards. This 1-Click App includes everything you need to self-host your own Matrix system.

This image contains a database (PostgreSQL), a matrix server (Synapse), a matrix web client (Element Web), and a reverse proxy (Caddy). After walking through the simple setup procedure, you will be able to login to your own Matrix web client and chat on the fediverse!

Software Included

Package Version License
Synapse 1.58.1 Apache License 2.0
Element Web 1.10.12 Apache License 2.0
Caddy 2.5.1 Apache License 2.0
PostgreSQL 11 PostgreSQL License

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the Matrix (Synapse backend) 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB Matrix (Synapse backend) Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "sharklabs-matrixsynapsebac-10"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying Matrix (Synapse backend)

Hardware Requirements

Keep in mind when selecting a monthly plan that the more resources you can provide, the better the chat quality will be. 2GB+ RAM is highly recommended.

Dependencies

  • A new DNS domain you’d like to use exclusively for Matrix (it is recommended and also very cute to buy a .town, .space, or similar domain for this purpose)
  • You must be capable of managing the DNS records for the domain you’d like to use
  • openssh (or putty)
  • 5 minutes

Finishing Setup

  1. Login to your droplet via ssh root@your_droplet_public_ipv4
  2. Run ./finish-setup
  3. When directed, set up your DNS records
  4. Read the operation guide cat /root/README.txt
  5. ???
  6. Profit!

Upgrades

It is recommended to upgrade your system once a month.

Please watch out for security vulnerabilities: https://matrix.org/blog/category/security

Upgrading is fairly straightforward:

# upgrade the OS, synapse, and caddy
apt update
apt upgrade
# upgrade element
./upgrade-element <version>

.