Running My Own Matrix Chat Server

Author: Kalin

2024-04-07 14:23:00 +0200 CEST

Chat is something we are very used to today. We use Facebook, WhatsApp, and Telegram. But, what if we wanted to host our own chat server? Is it worth the effort, and just how hard is it to set up and maintain your own chat server?

Chat server doesn't need to be hard.. Remember IRC? It used to be as easy as running a simple process.

Back the basic - check out https://matrix.org/ and more specifically its ecosystem. We have servers, clients and even chat bridges that can connect other services. Interoperability is key.

How hard?

It's as easy as that:

  1. Compile Go binary
go install ./cmd/dendrite
  1. Configure one yaml file - see https://github.com/matrix-org/dendrite/blob/main/dendrite-sample.yaml
  2. Run the binary
./dendrite

That's it! You have a running server. Connect a client such as https://element.io/ to it and you're in the Matrix. Literally.

Running your own chat means that messages are stored on your server, not in 3rd party services. They are not shared, no one can read them but you and if someone wants to have the extra privacy then they can create private room with end-to-end encryption so that is encrypted all the time, even at rest (in the server database).