Black Branch/Docs
All sections

Matrix (built in)

This page is for an owner who wants to know what the chat server inside every install is, and whether to open it to the rest of the Matrix network. There is nothing to register or connect: the installer sets the server up, and the setup pages create your community on it. After reading, you will know how it fits with your site, the one choice it leaves you (federation), and which other apps your members can use with it.

What Matrix is

Matrix is an open standard for chat, the way email is an open standard for mail. No single company owns it. Anyone can run a Matrix server, and any Matrix app can talk to any Matrix server. The Matrix.org Foundation looks after the standard; its introduction is at matrix.org and Matrix for instant messaging.

For you this means three things:

What ships in the install

Two programs make up your chat server, Synapse (the homeserver, which stores rooms and messages) and MAS (the sign-in service). Both run on your server beside the site, and the install's updates keep them current. Their addresses for a site at example.com:

The server name can never change, because every account, room and message carries it. That is why your domain is permanent for the install. How the two programs are configured, and what their signing key is, is on The homeserver.

How it fits with your site

Federation: off by default

Federation is off on a new install. Your homeserver then serves your own community: accounts made on your site take part in your rooms, and your server exchanges messages with no other Matrix server until you switch federation on.

With federation on, people with an account on another Matrix server (for example matrix.org) can join your public rooms and message your members without making an account on your site, and your members can join rooms elsewhere with their @name:example.com account. Your server name stays the same, and existing accounts do not change.

The trade-offs:

On Off
Your community is reachable from the whole Matrix network Only your site's accounts take part
Your mods deal with people your site knows nothing about; spam and raids can arrive from other servers Everyone in your rooms has an account you can ban at the source
Messages in a room with outside members are copied to their servers. A deletion is a request those servers are expected to honour, but you cannot force it Messages stay on your server
Members who join big rooms elsewhere make your server store and process those rooms too, which costs disk space and memory Your server only carries your own community

Turning it back off cuts outside members off from your rooms, but copies of messages already on their servers stay there.

How to switch it, and how to check it from outside, is on The homeserver. In short: sudo blackbranch federation on (or off) on the server, or the Federation switch in Admin Panel → Site → Community, card Federation and sign-up. The Doctor row Federation matches its switch confirms it.

Other Matrix apps

Your members can use any Matrix app that supports the modern Matrix sign-in, which is what MAS provides. Federation does not need to be on for this: the app signs in to your own server.

App Where Note
Element Phone, desktop and web Full-featured
Element X iPhone and Android Newer, faster Element
Cinny Web Clean web app, works in any browser
SchildiChat Phone, desktop and web A version of Element with a chat-app feel

To sign in, a member installs the app, chooses Other or Edit homeserver (the wording varies), types the server name (example.com) and signs in with their usual site username and password on the sign-in page that opens. Apps that only support the older password-only sign-in, such as FluffyChat, cannot sign in. The wider list of apps is at Matrix.org: clients.

Members can also install your site itself as an app on their phone; see The phone app.

Common problems

What you see What it means What to do
The community step says the server could not make the community The homeserver was not ready, or the site could not ask the server Wait a minute and press Make the community again. If the page says the install cannot ask its server, run sudo blackbranch matrix bootstrap on the server.
A Matrix app says it cannot find the homeserver The member typed matrix.example.com, or your site's discovery files are not reachable Type the bare domain, example.com. Check the Doctor's Matrix rows.
A Matrix app opens no sign-in page, or asks only for a password and fails The app does not support the modern Matrix sign-in Use one of the apps above.
Doctor: Federation matches its switch is red The switch and the homeserver's configuration disagree Wait a minute and press Check again. If it stays red, run sudo blackbranch render.

Next: Discord

← Connect your platforms