Translation(s): English - EspaƱol

Matrix Synapse (Chat Server)

Matrix Synapse icon

Available since: version 0.14.0

What is Matrix?

Matrix is an open standard for interoperable, decentralized, real-time communication over IP. Synapse is the reference implementation of a Matrix server. It can be used to setup instant messaging on FreedomBox to host large chat rooms, end-to-end encrypted communication and audio/video calls. Matrix Synapse is a federated application where chat rooms can exist on any server and users from any server in the federated network can join them. Learn more about Matrix.

How to access your Matrix Synapse server?

We recommend the Element client to access the Matrix Synapse server. You can download Element for desktops. Mobile applications for Android and iOS are available from their respective app stores.

Port Forwarding

If your FreedomBox is behind a router, you will need to set up port forwarding on your router. You should forward the following ports for Matrix:

Setting up Matrix Synapse on your FreedomBox

To enable Matrix, first navigate to the Chat Server (Matrix Synapse) page and install it. Matrix needs a valid domain name to be configured. After installation, you will be asked to configure it. You will be able to select a domain from a drop down menu of available domains. Domains are configured using System -> Configure page. After configuring a domain, you will see that the service is running. The service will be accessible on the configured FreedomBox domain. Currently, you will not be able to change the domain once is it configured.

Your router has to be configured to forward port 8448.

All the registered users of your FreedomBox will have their Matrix IDs as @username:domain. If public registration is enabled, also your chosen client can be used to register a user account.

Federating with other Matrix instances

You will be able to interact with any other person running another Matrix instance. This is done by simply starting a conversation with them using their matrix ID which is of the format @their-username:their-domain. You can also join rooms which are in another server and have audio/video calls with contacts on other server.

Memory usage

The Synapse reference server implemented in Python is known to be quite RAM hungry, especially when loading large rooms with thousands of members like It is recommended to avoid joining such rooms if your FreedomBox device only has 1 GiB RAM or less. Rooms with up to a hundred members should be safe to join. The Matrix team is working on a new implementation of the Matrix server written in Go called Dendrite which might perform better in low-memory environments.

Some large public rooms in the Matrix network are also available as IRC channels (e.g. is also available as #freedombox on It is better to use IRC instead of Matrix for such large rooms. You can join the IRC channels using Quassel.

Advanced usage

  1. If you wish to create a large number of users on your Matrix Synapse server, use the following commands on a remote shell as root user:
    • cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 | sed "s+^+registration_shared_secret: +" > /etc/matrix-synapse/conf.d/registration_shared_secret.yaml
      chmod 600 /etc/matrix-synapse/conf.d/registration_shared_secret.yaml
      chown matrix-synapse:nogroup /etc/matrix-synapse/conf.d/registration_shared_secret.yaml
      systemctl restart matrix-synapse
      register_new_matrix_user -c /etc/matrix-synapse/conf.d/registration_shared_secret.yaml
  2. If you wish to see the list of users registered in Matrix Synapse, the following as root user:
    • apt install sqlite3
      echo 'select name from users' | sqlite3 /var/lib/matrix-synapse/homeserver.db  
  3. If you wish to create a community in Matrix Synapse, a Matrix user with server admin privileges is needed. In order to grant such privileges to username run the following commands as root user:

    • sudo apt install sqlite3
      echo "UPDATE users SET admin=1 WHERE name='@username:domainname'" | sudo sqlite3 /var/lib/matrix-synapse/homeserver.db  

Back to Features introduction or manual pages.








Live Help

Where To Start








To Do








FreedomBox for Communities

FreedomBox Developer Manual

HELP & DISCUSSIONS: Discussion Forum - Mailing List - #freedombox | CONTACT Foundation | JOIN Project

Next call: Sunday, May 23 at 17:00 UTC

Latest news: Help translate - 2020-08-01

This page is copyright its contributors and is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.