This repository contains custom configurations and modules for the Matrix Synapse server powering quali.chat. It includes:
- Custom Synapse modules
- SSO (Single Sign-On) configuration for Web3 authentication
- Rate limiting and security settings
- Admin and Bot accounts registrations.
- Python 3.x
- WalletConnect (now Reown) project ID (get one at cloud.reown.com)
- Ethereum OIDC Provider running (see siwe-oidc)
Edit the yaml files with correct Matrix homeserver and OIDC domain URLs.
-
Environment Setup
make venv && . ./env/bin/activate
-
TLS keys
- Copy your fullchain.pem and private_key.pem to the root of this directory.
-
Configuration
- Edit
homeserver.sso.eth.yaml - Enable password configuration:
password_config: enabled: true - Note: Password config is only needed initially for bot account login
- Edit
-
Server Setup
make reset # Resets and sets up the Matrix server make dev # Starts the development server
The Synapse Matrix Homeserver should now be running.
If make reset fails:
-
Ensure the virtual environment is activated in your terminal
-
Verify OIDC provider is running (check
https://ETHEREUM_OIDC_AUTH_URL/.well-known/openid-configurationreturns 200) -
Kill any existing homeserver processes:
pkill -f synapse.app.homeserver
If you encounter:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='', port=8008): Max retries exceeded
Solutions:
-
Update DNS settings:
- Use
1.1.1.1or8.8.8.8as DNS servers
- Use
-
Add to
/etc/hosts:127.0.0.1 MATRIX_HOMESERVER_DOMAIN 127.0.0.1 AUTH_DOMAIN
-
Check Synapse version compatibility with your Python version