Skip to content

quali-chat/quali-chat-synapse-patch

Repository files navigation

Synapse homeserver setup

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.

Local Development Setup

Prerequisites

  • Python 3.x
  • WalletConnect (now Reown) project ID (get one at cloud.reown.com)
  • Ethereum OIDC Provider running (see siwe-oidc)

Setup Guide

Edit the yaml files with correct Matrix homeserver and OIDC domain URLs.

  1. Environment Setup

    make venv && . ./env/bin/activate
  2. TLS keys

    • Copy your fullchain.pem and private_key.pem to the root of this directory.
  3. Configuration

    • Edit homeserver.sso.eth.yaml
    • Enable password configuration: password_config: enabled: true
    • Note: Password config is only needed initially for bot account login
  4. 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.

Troubleshooting

Matrix Setup Failures

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-configuration returns 200)

  • Kill any existing homeserver processes:

    pkill -f synapse.app.homeserver

Connection Errors

If you encounter:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='', port=8008): Max retries exceeded

Solutions:

  1. Update DNS settings:

    • Use 1.1.1.1 or 8.8.8.8 as DNS servers
  2. Add to /etc/hosts:

    127.0.0.1 MATRIX_HOMESERVER_DOMAIN
    127.0.0.1 AUTH_DOMAIN
  3. Check Synapse version compatibility with your Python version

About

Custom Synapse modules/configs for quali.chat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors