Skip to content

About

Matrix stack for NS8

Resources

Security policy

Stars

4 stars

Watchers

2 watching

Forks

Repository files navigation

ns8-matrix

⚠️ This project is a proof of concept to evaluate Matrix integration with NethServer 8. The goal is to provide a chat engine for NethVoice and NethCTI modules in the future, see NethServer/dev#7648. It is in early development and meant for testing only. Do not use it in production. ⚠️

A NethServer 8 module for Matrix chat, with LDAP authentication. It runs the Synapse homeserver, the Element and Cinny web clients, and optionally matrix2acrobits for NethVoice and LiveKit for Element Call.

flowchart LR
    U[Browsers and Matrix apps] -- "HTTPS :443" --> T["Traefik"]
    F[Other Matrix servers] -. "federation, :443" .-> T
    subgraph NS8["NS8 node"]
        T -- "synapse_domain_name" --> S
        T -- "element_domain_name" --> E
        T -- "cinny_domain_name" --> C
        T -- "/m2a, /_matrix/push/v1/notify" --> M
        T -- "/livekit/jwt" --> J
        T -- "/livekit/sfu" --> LK
        subgraph POD["matrix pod, pasta, ports on 127.0.0.1 only"]
            S[Synapse]
            E[Element web]
            C[Cinny]
            M[matrix2acrobits]
            J[lk-jwt-service]
            P[(PostgreSQL 18<br/>not published)]
            S --> P
        end
        LK["LiveKit<br/>host network"]
        J -- "OpenID check" --> T
        LK -- "webhook" --> J
        S -- "10.0.2.2, node loopback" --> L[LDAP proxy]
        S --> SM[Cluster smarthost]
    end
    U -. "call media<br/>7882/udp, 7881/tcp, 3478/udp" .-> LK
Loading

Every container runs in one rootless pod, except LiveKit. LiveKit runs in the node network, because call media must leave from the node address. Its media ports bypass Traefik. Legacy one to one calls go directly between clients or through the external TURN server.

Documentation

  • Admin guide: all the parameters, web clients, LDAP, federation, TURN, Element Call with LiveKit, mail, secrets, backup and restore, update, uninstall.
  • Architecture: network and ports, Traefik routes, systemd units, configuration rendering, module state, PostgreSQL migration.
  • NethVoice integration: matrix2acrobits, push notifications and the roadmap.

Install

add-module ghcr.io/nethserver/matrix:latest 1

The output returns the instance name, for example matrix1.

Configure

Fill in the Settings page, or:

api-cli run module/matrix1/configure-module --data '{"synapse_domain_name": "matrix.example.com", "element_domain_name": "chat.example.com", "cinny_domain_name": "cinny.example.com", "lets_encrypt": true, "ldap_domain": "users.example.com"}'

synapse_domain_name, lets_encrypt and ldap_domain are required. A missing key falls back to its default, not to the stored value, except search_all_users and turn_shared_secret. Send the full configuration each time, see Parameters.

Users log in with their LDAP account name and password.

Uninstall

remove-module --no-preserve matrix1

Running tests locally

This module uses the NS8 standard testing infrastructure. Refer to the Running tests locally section of the ns8-github-actions repository.

UI translation

Translated with Weblate.

To set up the translation process:

About

Matrix stack for NS8

Resources

Security policy

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages