Differences between revisions 1 and 21 (spanning 20 versions)
Revision 1 as of 2017-03-23 06:33:43
Size: 2123
Editor: ?rahulde
Comment:
Revision 21 as of 2020-07-18 14:22:57
Size: 4536
Editor: fioddor
Comment: Better clue
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Decentralized & federated IM, Audio and Video (Matrix) == <<TableOfContents()>>
Line 3: Line 3:
=== What is the Matrix? === ## BEGIN_INCLUDE
Line 5: Line 5:
Unlike Morpheus, we can show you what the Matrix is. == Matrix Synapse (Chat Server) ==
||<tablestyle="float: right;"> {{attachment:Matrix-icon_en_V01.png|Matrix Synapse icon}} ||
Line 7: Line 8:
[[https://matrix.org/|Matrix]] is an open standard for interoperable, decentralized, real-time communication over IP. It can be used to power Instant Messaging, VoIP/WebRTC signalling, Internet of Things communication - or anywhere you need a standard HTTP API for publishing and subscribing to data whilst tracking the conversation history. === What is Matrix? ===
[[https://matrix.org/|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. [[https://matrix.org/docs/guides/faq.html|Learn more]] about Matrix.
Line 9: Line 12:
Matrix defines the standard, and provides open source reference implementations of Matrix-compatible Servers, Clients, Client SDKs and Application Services to help you create new communication solutions or extend the capabilities and reach of existing ones. '''Available since:''' version 0.14.0
Line 11: Line 14:
For more detailed info see [[https://matrix.org/docs/guides/faq.html|here]]. === How to access your Matrix Synapse server? ===
Line 13: Line 16:
=== How to access the Matrix ===
We recommend the [[https://riot.im|Riot]] client to access the Matrix as a less painful alternative to plugging into the Matrix. You can download Riot for Desktops from [[https://riot.im/desktop.html|here]] and is available in the Play store and App store for Android and iOS respectively.
We recommend the [[https://riot.im|Riot]] client to access the Matrix Synapse server. You can [[https://riot.im/desktop.html|download]] Riot for desktops. Mobile applications for Android and iOS are available from their respective app stores.
Line 16: Line 18:
=== Setting up your FreedomBox for Matrix ===
To enable Matrix, first navigate to the Federated IM, VoIP and Video server (matrix-synapse) page and install it. Matrix needs a valid domain name to be configured. If its not, you will be asked to configure it. After that a drop down menu of the available domains will be show and one needs to be selected.
=== Setting up Matrix Synapse on your FreedomBox ===
Line 19: Line 20:
After the page reload and under Status you will see that the service is running. 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.
Line 21: Line 22:
The service will be accessible on the configured FreedomBox domain. All the registered users will have their usernames as @username:domain. 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.
Line 25: Line 28:
Any other person running another Matrix instance can be added to this particular Matrix instance by using their matrix ID which is of the format @username:domain. 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 #matrix:matrix.org. 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. #freedombox:matrix.org is also available as #freedombox on irc.debian.org). It is better to use IRC instead of Matrix for such large rooms. You can join the IRC channels using [[FreedomBox/Manual/Quassel|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
}}}
 1. 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
}}}
 1. 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
   }}}

## END_INCLUDE

Matrix Synapse (Chat Server)

Matrix Synapse icon

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.

Available since: version 0.14.0

How to access your Matrix Synapse server?

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

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 #matrix:matrix.org. 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. #freedombox:matrix.org is also available as #freedombox on irc.debian.org). 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.


Intro

Information

Support

Contribute

Reports

Promote

Vision

Hardware

Live Help

Where To Start

Translate

Calls

Talks

Overview

Download

Q&A

To Do

Design

Releases

Press

Features

Manual

Contributors

Code

Blog

FreedomBox for Communities

FreedomBox Developer Manual

HELP & DISCUSSIONS: Discussion Forum - Matrix - Mailing List - #freedombox irc.debian.org | CONTACT Foundation | JOIN Project

Next call: Saturday, April 13 at 14:00 UTC

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


CategoryFreedomBox