-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Overview
Set up a complete local Matrix testing environment for development and testing.
Tasks
- Install Synapse (Matrix homeserver) via Docker
- Install Element (Matrix web client)
- Create test Matrix accounts
- Configure test rooms
- Set up federation (optional)
- Document environment setup steps
- Create test automation scripts
- Add environment to docker-compose.yml
Components
Synapse (Homeserver)
- Docker image:
matrixdotorg/synapse - Expose ports: 8008 (client API), 8448 (federation)
- Generate signing keys
- Create test users via admin API
Element (Web Client)
- Docker image:
vectorim/element-web - Expose port: 8080
- Configure to use local Synapse
- Create test accounts
Test Accounts
@testbot1:localhost- Primary bot account@testbot2:localhost- Secondary account@testuser:localhost- Test user account
Test Rooms
- Test room 1: Public room for basic testing
- Test room 2: Private room for access control testing
- Test room 3: Room with multiple users
Docker Compose Setup
version: '3.8'
services:
synapse:
image: matrixdotorg/synapse:latest
container_name: matrix-synapse
ports:
- "8008:8008"
- "8448:8448"
volumes:
- ./test/fixtures/synapse:/data
environment:
- SYNAPSE_SERVER_NAME=localhost
- SYNAPSE_REPORT_STATS=no
- SYNAPSE_ENABLE_REGISTRATION=yes
element:
image: vectorim/element-web:latest
container_name: matrix-element
ports:
- "8080:80"
volumes:
- ./test/fixtures/element/config.json:/app/config.json
depends_on:
- synapseSetup Steps
- Run
docker-compose -f docker-compose.matrix.yml up -d - Wait for Synapse to start (~10 seconds)
- Create test users:
curl -XPOST -d '{"username":"testbot1","password":"test123","auth":{"type":"m.login.dummy"}}' "http://localhost:8008/_matrix/client/r0/register"
- Get access tokens via Element or API
- Create test rooms and invite users
- Update opencode-router config with test credentials
Acceptance Criteria
- Synapse runs and accepts registrations
- Element can connect to Synapse
- Can create test accounts
- Can create rooms and send messages
- Environment can be reset to clean state
- Setup documented in README
Estimated Time
1 day
Dependencies
None
Testing
- Open Element at http://localhost:8080
- Log in as testuser
- Send message to test room
- Verify bot receives message (check opencode-router logs)
- Send reply from bot
- Verify message appears in Element
Troubleshooting
- Synapse won't start: Check logs with
docker logs matrix-synapse - Can't register: Ensure
SYNAPSE_ENABLE_REGISTRATION=yes - Element can't connect: Check
config.jsonhas correct homeserver URL - Access token expired: Re-register or get new token via Element settings
See full plan: https://github.com/users/alacy-centrl/projects/2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels