Files
stack/docker/matrix/synapse/homeserver.yaml
Jason Woltje 4a5cb6441e
All checks were successful
ci/woodpecker/push/infra Pipeline was successful
feat(#384): Add Synapse + Element Web to docker-compose for dev
- Create docker-compose.matrix.yml as optional dev overlay
- Add Synapse homeserver config with shared PostgreSQL
- Add Element Web client config (port 8501)
- Add bot account setup script (docker/matrix/scripts/setup-bot.sh)
- Add Makefile targets: matrix-up, matrix-down, matrix-logs, matrix-setup-bot
- Document Matrix env vars in .env.example
- Synapse accessible at localhost:8008, Element at localhost:8501
- Usage: docker compose -f docker/docker-compose.yml -f docker/docker-compose.matrix.yml up

Refs #384

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:02:22 -06:00

132 lines
3.2 KiB
YAML

# ==============================================
# Synapse Homeserver Configuration — Development Only
# ==============================================
#
# This config is for LOCAL DEVELOPMENT with the Mosaic Stack docker-compose overlay.
# Do NOT use this in production. See docker-compose.sample.matrix.yml for production.
#
# Server name is set to 'localhost' — this is permanent and cannot be changed
# after the database has been initialized.
#
# ==============================================
server_name: "localhost"
pid_file: /data/homeserver.pid
public_baseurl: "http://localhost:8008/"
# ======================
# Network Listeners
# ======================
listeners:
# Client API (used by Element Web, Mosaic bridge, etc.)
- port: 8008
tls: false
type: http
x_forwarded: true
bind_addresses: ["0.0.0.0"]
resources:
- names: [client, federation]
compress: false
# ======================
# Database (Shared PostgreSQL)
# ======================
database:
name: psycopg2
txn_limit: 10000
args:
user: "synapse"
password: "synapse_dev_password"
database: "synapse"
host: "postgres"
port: 5432
cp_min: 5
cp_max: 10
# ======================
# Media Storage
# ======================
media_store_path: /data/media_store
max_upload_size: 50M
url_preview_enabled: true
url_preview_ip_range_blacklist:
- "127.0.0.0/8"
- "10.0.0.0/8"
- "172.16.0.0/12"
- "192.168.0.0/16"
- "100.64.0.0/10"
- "192.0.0.0/24"
- "169.254.0.0/16"
- "198.18.0.0/15"
- "::1/128"
- "fe80::/10"
- "fc00::/7"
- "2001:db8::/32"
- "ff00::/8"
- "fec0::/10"
# ======================
# Registration (Dev Only)
# ======================
enable_registration: true
enable_registration_without_verification: true
# ======================
# Signing Keys
# ======================
# Auto-generated on first startup and persisted in the signing_key volume
signing_key_path: "/data/keys/localhost.signing.key"
# Suppress warning about trusted key servers in dev
suppress_key_server_warning: true
trusted_key_servers: []
# ======================
# Room Configuration
# ======================
enable_room_list_search: true
allow_public_rooms_over_federation: false
# ======================
# Rate Limiting (Relaxed for Dev)
# ======================
rc_message:
per_second: 100
burst_count: 200
rc_registration:
per_second: 10
burst_count: 50
rc_login:
address:
per_second: 10
burst_count: 50
account:
per_second: 10
burst_count: 50
# ======================
# Logging
# ======================
log_config: "/data/localhost.log.config"
# Inline log config — write to stdout for docker logs
# Synapse falls back to a basic console logger if the log_config file is missing,
# so we leave log_config pointing to a non-existent file intentionally.
# Override: mount a custom log config file at /data/localhost.log.config
# ======================
# Miscellaneous
# ======================
report_stats: false
macaroon_secret_key: "dev-macaroon-secret-change-in-production"
form_secret: "dev-form-secret-change-in-production"
# Enable presence for dev
use_presence: true
# Retention policy (optional, keep messages for 180 days in dev)
retention:
enabled: false