mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
9f33858bb2
- 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
77 lines
1.7 KiB
Markdown
77 lines
1.7 KiB
Markdown
# Setting Up Your Own Matrix Synapse Server
|
|
|
|
## Quick Docker Setup
|
|
|
|
### 1. Create docker-compose.yml
|
|
```yaml
|
|
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
|
|
```bash
|
|
# Create directories
|
|
mkdir synapse-data postgres-data
|
|
|
|
# Start services
|
|
docker-compose up -d
|
|
|
|
# Check logs
|
|
docker-compose logs -f synapse
|
|
```
|
|
|
|
### 3. Enable Registration
|
|
```bash
|
|
# 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
|
|
```typescript
|
|
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
|