The CH405Labs Matrix Server

The CH405Labs Matrix Server

We set up a shiny new chat server for our people and also our friends at BalCCon. Feel free to join our open channels. In this article we will discuss how, in case you are not familiar with matrix.

💡
TL;DR: Install a client of your liking from https://matrix.org/ecosystem/clients/ and make an account with a matrix server that you like from this list https://servers.joinmatrix.org/. Then join the CH405 Labs space and The Raven Hotel room.

Matrix is an open network for secure, decentralised communication. This means, that there are multiple servers hosted by a wide variety of people. As the matrix protocol is an open standard, there are also various clients for you to use to chat. More about this later.

Core Concepts

In this chapter we will briefly discuss the core concepts of Matrix. If you just want to get going feel free to skip ahead to the chapter "Client Setup" and come back any time later.

Openness: Matrix is a protocol for communication using text, audio and video. Its specification is public and open source. This means, that there is not a single client or server application that one needs to use, but anyone can develop its own client or server software. Thus a variety of those exist to choose from. Also matrix can be extended with additional functionality. When choosing a client (or server) software one should consider which protocol version the software supports (ideally the latest), what features it implements (not every software supports all features and usually has different extension built in) and how actively it is developed (you want new protocol versions and features adapted as soon as possible).

Decentralisation: In the most simple setup, matrix clients connect to matrix servers. Every user needs to choose a home server. The home server is the server that hosts the user account. Also, rooms are initially opened on a server. Usually users open rooms on their home server. Whenever someone joins a room, that users home server makes a copy of the room on this users home server - unless there is already someone from the same home server in the room as the server only keeps one copy of the room, obviously. This means, that rooms are independent of the server they are created on. The same also goes for spaces - a means to group rooms and / or users.

Lets look at an example. Lets assume we have four users in there: user1 who has her user account on ch405labs.net, user2 who has her user account on matrix.org and user3 who has her user account on unredacted.org and user4 who has her account also on unredacted.org. user1 opens a room called "The Raven Hotel" on its home server ch405labs.net. She sets an image as the rooms avatar and a room description and sets the room to public so everyone who likes can join. She also publishes it to the home servers directory to allow others to find it. user2 learns about a new server ch405labs.net from this article and gets curios. She lists the public rooms, finds "The Raven Hotel" and joins it. A copy of the room is automatically generated on matrix.org and synchronised. That means for example, that the rooms avatar and conversations in the room now use space on ch405labs.net as well as matrix.org. Now user3 joins the room and a copy of the room is also created on unredacted.org. Due to an outage, the ch405labs.net goes down and becomes unavailable. While user1 can no longer access matrix, user2 and user3 can happily continue chatting, as the copies on their servers are still online. When ch405labs.net comes back online, the conversations (and potential changes to the room settings) get synced back and user1 will not have lost any history of the conversation. However, during the outage, user4 tried to join. As the ch405labs.net server is down and the room is only published to its directory, user4 cannot find it. Lets assume user4 does not know anyone and can thus not ask for an invite link. If before ch405labs.net went offline, user2 would have also published the room to matrix.orgs directory, then user4 could find it there and join, even if ch405labs.net were offline.

Security: As spaces and rooms are decentralised, the server admin can see all the data associated with these rooms - including the chats and shared images. This is fine for public rooms, as everyone can join and read them anyways. For private rooms this would be less than ideal. Therefore chats can be encrypted. In this case, the conversations is stored encrypted with the public keys of the participants in a room and can only be read by them. So encryption should be turned on for private rooms. However, public rooms should not be encrypted. While its possible to encrypt them as well, it just drains resources without an actual benefit, as everyone can join anyways.

Client Setup

If you want to participate in a chat, you need an account on one of those servers. In matrix lingo those are called "provider". Most people will make an account at matrix.org, as this is the best known provider. Howver, for a federate chat it is beneficial if people use different providers, among other reasons to distribute the load of the network. You find a list of some providers at https://servers.joinmatrix.org/. Make an account with one of them and either install a matrix client of your choice or use a web based client. A non exhaustive list of clients can be found at https://matrix.org/ecosystem/clients/. Choose one that you like. You can always switch later.

Asides chat rooms, matrix has the concept of "spaces" to group channels (and / or users) with a similar interest. To join the CH405Labs space, you can either search for it on the ch405labs.net server using you client, or use this direct link https://matrix.to/#/#ch405labs:ch405labs.net. You can then easily search for public rooms. This will not only list public rooms of the Ch405Labs space, but also others, for example from our firends at BalCCon. The main channel in the CH405Labs space ist The Raven Hotel. Feel free to drop by.