How to configure a Matrix Synapse server for proper operation with the Element X client?
Problem: On a server with open registration and token-based confirmation, users can successfully register through the Element client, but when attempting to register through the Element X client, an error occurs.
Goal: Use Matrix in a small group as a replacement for video calls and conferences through Telegram.
Additional question: Currently for video conferences, Element uses the jitsi-meet widget. I saw a video presentation that demonstrated two ways to conduct video conferences (an outdated method and a new supposedly native built-in method). In the video, it looked great. Does this functionality exist in the current version or is it in beta testing?
Configuring Matrix Synapse for Element X Client
Matrix Synapse server can be configured to work correctly with the Element X client, but this requires proper configuration, especially in the area of registration and authentication. The main problem with registration via Element X is usually related to registration permission settings and access token formats.
Contents
- Basic Synapse Settings for Element X
- Registration and Authentication Configuration
- Troubleshooting Registration Errors in Element X
- Video Conferencing in Element: jitsi-meet and New Features
- Additional Configuration Recommendations
Basic Synapse Settings for Element X
For Element X to work correctly with your Synapse server, you need to ensure that the basic configuration is done properly. First, check the configuration file /etc/matrix-synapse/homeserver.yaml for the following required parameters:
server_name: "your-server.com"
public_baseurl: "https://your-server.com"
# Database configuration
database:
name: "psycopg2"
args:
user: "synapse"
password: "your-password"
database: "synapse"
host: "localhost"
port: 5432
# Port and listening configuration
listeners:
- port: 8008
tls: false
type: http
resources:
- names: [client, federation]
compress: false
It’s important to ensure that your server has the correct DNS record (A-record) pointing to the server’s public IP address. This is necessary for proper federation operation and client connections.
Registration and Authentication Configuration
Registration issues with Element X are often related to permission settings. Check the following parameters in your configuration:
# Allow new user registration
enable_registration: true
# Require email verification (recommended for security)
require_email_verification: true
# Administrator access token configuration
registration_shared_secret: "your-secret-key"
# Allow external authentication
enable_metrics: false
If you’re using Matrix Authentication Service (MAS), as mentioned in the Element documentation, ensure it’s properly configured and issues compatible tokens.
Important: Element X may have stricter requirements for token formats and authentication compared to the classic Element client. Make sure your tokens are generated with support for refreshable tokens, as added in Synapse 1.99.
Troubleshooting Registration Errors in Element X
If users can’t register through Element X, check the following aspects:
1. Registration Status Check
Ensure registration is actually enabled:
curl -X GET "http://localhost:8008/_matrix/client/r0/register"
If you see the error “Registration has been disabled” in the response, check the enable_registration: true parameter in your configuration.
2. Token Format Issues
Element X may require newer token formats. Check your Synapse version - the minimum supported version is 1.88.0 with Python 3.8.
3. DNS and Federation Issues
Ensure your server properly handles federation traffic. Check for the .well-known/matrix/server file:
# In Synapse configuration
serve_server_wellknown: true
This file should contain:
{"m.server":"your-server.com:443"}
4. Debug Logging
Enable extended logging for diagnostics:
log_config: "/etc/matrix-synapse/log.yaml"
In the log configuration, add:
version: 1
disable_existing_loggers: false
formatters:
precise:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
handlers:
file:
class: logging.handlers.RotatingFileHandler
filename: /var/log/matrix-synapse/synapse.log
maxBytes: 10485760
backupCount: 10
formatter: precise
loggers:
synapse:
level: DEBUG
handlers: [file]
Video Conferencing in Element: jitsi-meet and New Features
In current versions of Element, video conferencing is handled through integration with the jitsi-meet widget. This is the standard approach that works reliably and provides audio and video call support.
Current Implementation:
- jitsi-meet integration - the standard way to conduct video conferences in Element
- Requires a separate jitsi server - you can set up your own or use public instances
- Integration through rooms - video calls are initiated directly in Element rooms
New Features:
Regarding the “native built-in” video conferencing method you mentioned, currently:
- No native built-in video conferencing in Element - jitsi-meet is still used
- Under development are improvements for deeper integration
- Beta testing of some interface enhancements may create the impression of “nativness”
To set up jitsi-meet with your Synapse server:
- Install jitsi-meet on a separate server or use a public instance
- Configure Element settings to use your jitsi:
// In client settings or via server configuration
jitsi: {
enabled: true,
preferredDomain: "your-jitsi-server.com"
}
- For use as a Telegram replacement, set up groups with enabled video calls through jitsi-meet.
Additional Configuration Recommendations
1. Synapse Updates
Ensure you have the latest version of Synapse. Since version 1.99, support has transitioned to Element under new licensing:
# Check version
synapse_homeserver --version
# Update (example for Ubuntu)
sudo apt update
sudo apt install synapse
2. Security
For use in a work group, the following security settings are recommended:
# Restrict registration to specific domains only
allowed_registration_without_verification: ["your-domain.com"]
# Enable two-factor authentication
enable_login_token_expiry: true
# Restrict federation if needed
federation_domain_whitelist: ["trusted-server.com"]
3. Optimization for Small Groups
For use as a Telegram replacement:
- Set up automatic invitation creation for new users
- Use pre-configured rooms for groups
- Configure push notifications for mobile clients
Conclusion
-
The main issue with Element X is usually related to token formats and authentication requirements - ensure your Synapse is updated to the latest version.
-
The registration problem solution includes checking the
enable_registrationparameters, configuring correct token formats, and proper DNS configuration. -
Video conferencing in Element is still based on jitsi-meet - there’s no native built-in solution yet, but jitsi-meet provides reliable functionality for video calls.
-
For use as a Telegram replacement, it’s recommended to configure groups with pre-configured rooms and automatic invitations.
-
Regular updates to Synapse and Element clients will help avoid compatibility issues and provide access to new features.
For further configuration and diagnostics, use the official Synapse and Element documentation, as well as server logs to track errors.