Tested on Debian 10.2
mkdir /opt/matrix-synapse/
cd /opt/matrix-synapse/
wget https://raw.githubusercontent.com/matrix-org/synapse/master/contrib/docker/docker-compose.yml
Inside the docker-compose.yml
i changed the port config to - 8008:8008/tcp
since i will let a nginx proxy handle the ssl stuff.
docker-compose run --rm -e SYNAPSE_SERVER_NAME=example.org -e SYNAPSE_REPORT_STATS=yes synapse generate
If you get errors like Permission denied: '/etc/homeserver.yaml'
then try changing permissions:
chown -R 991:991 files/
chown -R 991:991 matrix-config/
Now try again generating your configuration:
docker-compose run --rm -e SYNAPSE_SERVER_NAME=example.org -e SYNAPSE_REPORT_STATS=yes synapse generate
Now you can edit your homeserver config file
nano matrix-config/homeserver.yaml
You propably want to change the database section so that your PostgreSQL Database is user
database:
name: psycopg2
args:
user: synapse
password: changeme
database: synapse
host: db
Once that is done you can try starting synapse
docker-compose up -d
And check the log for any errors:
docker-compose logs synapse
docker-compose logs db