Self-hosted messenger

A private chat server with Matrix Synapse and Element, run as a project from planning and test concept to the finished result.

Context
School project, module 306 (project management)
School
Technische Fachschule Bern
Status
Completed
Tools
Matrix Synapse, Element, Docker, virtual machine

The task

Module 306 is about running an IT project properly: planning it, carrying it out, testing it and documenting it. The project was a messenger of our own, so messages stay on a server we control instead of with a large provider.

How it's built

  • The server runs in a virtual machine, with Docker wherever it made sense.
  • Matrix Synapse is the chat server, Element is the client on computers and phones.
  • Besides the setup, the project includes documentation, a test concept and a test report.
  1. Element clientOn computers and phones.
  2. Encrypted connectionHTTPS with the project's own certificate.
  3. Matrix SynapseChat server in Docker on a virtual machine.
How a message gets from the client to the server.

Challenges and solutions

The app didn't trust the certificate

The server used a certificate that wasn't issued by a public certificate authority. Browsers can be told to accept it, but the client app refused to connect.

Solution: The certificate was installed manually as trusted on the client devices. After that, the app connected without errors.

What I learned

  • Running a projectPlanning in phases, keeping to the plan, and closing the project properly.
  • Certificates and trustWhy a device only trusts certain certificates, and how to add your own.
  • Testing systematicallyWriting a test concept first, then testing against it and recording the results.
  • Documenting for othersWriting documentation that someone else can follow without asking.

What I'd do differently

I would use a certificate from a public certificate authority, for example Let's Encrypt. Then nobody has to install it on their devices by hand.