# Synapse, the Matrix homeserver, with PostgreSQL. Its server name is the project's address, and # other servers find it there on port 443 through /.well-known/matrix/server, which Synapse serves. services: synapse: image: matrixdotorg/synapse:v1.163.0 restart: unless-stopped environment: SYNAPSE_SERVER_NAME: ${HOST} SYNAPSE_REPORT_STATS: "no" PUBLIC_URL: ${URL} DB_PASSWORD: ${DB_PASSWORD} ADMIN_USERNAME: ${ADMIN_USERNAME} ADMIN_PASSWORD: ${ADMIN_PASSWORD} REGISTRATION_TOKEN: ${REGISTRATION_TOKEN} # The first start generates homeserver.yaml and the signing key; every start writes # pethost.yaml, read after it, with what this project decides. The admin and the # registration token are made once from .env, by the setup below, once Synapse answers. entrypoint: - sh - -c - | set -e [ -f /data/homeserver.yaml ] || /start.py generate cat > /data/pethost.yaml <