Files
goose/setup-synapse.md
spencrmartin 9f33858bb2 feat: Complete Matrix integration with login persistence and message sync
- Fix Matrix login 403 error by switching to matrix.tchncs.de homeserver
- Implement bidirectional message synchronization between Goose and Matrix
- Fix room creation bug ensuring friends join correct collaborative session room
- Add Matrix login persistence with localStorage and auto-login functionality
- Enhanced error handling for Matrix authentication and registration
- Add comprehensive Matrix setup documentation and test utilities
2025-11-13 22:29:30 -05:00

1.7 KiB

Setting Up Your Own Matrix Synapse Server

Quick Docker Setup

1. Create docker-compose.yml

version: '3.8'
services:
  synapse:
    image: matrixdotorg/synapse:latest
    container_name: synapse
    ports:
      - "8008:8008"
    volumes:
      - ./synapse-data:/data
    environment:
      - SYNAPSE_SERVER_NAME=localhost
      - SYNAPSE_REPORT_STATS=no
    command: |
      bash -c "
        python -m synapse.app.homeserver \
          --server-name=localhost \
          --config-path=/data/homeserver.yaml \
          --generate-config \
          --report-stats=no || true
        python -m synapse.app.homeserver --config-path=/data/homeserver.yaml
      "

  postgres:
    image: postgres:13
    container_name: synapse-postgres
    environment:
      - POSTGRES_DB=synapse
      - POSTGRES_USER=synapse
      - POSTGRES_PASSWORD=changeme
    volumes:
      - ./postgres-data:/var/lib/postgresql/data

2. Start the Server

# Create directories
mkdir synapse-data postgres-data

# Start services
docker-compose up -d

# Check logs
docker-compose logs -f synapse

3. Enable Registration

# Edit the config to allow registration
docker exec -it synapse bash
# Edit /data/homeserver.yaml
# Set: enable_registration: true
# Restart: docker-compose restart synapse

4. Update Your MatrixService

export const matrixService = new MatrixService({
  homeserverUrl: 'http://localhost:8008',
});

Production Deployment

For production, you'll want:

  • Proper domain name and SSL certificates
  • PostgreSQL database
  • Reverse proxy (nginx)
  • Backup strategy

See: https://matrix-org.github.io/synapse/latest/setup/installation.html