2017-09-28 13:12:47 +03:00
|
|
|
# Synapse Docker
|
|
|
|
|
2019-06-27 15:49:48 +03:00
|
|
|
FIXME: this is out-of-date as of
|
|
|
|
https://github.com/matrix-org/synapse/issues/5518. Contributions to bring it up
|
|
|
|
to date would be welcome.
|
|
|
|
|
2018-02-08 23:55:35 +03:00
|
|
|
### Automated configuration
|
|
|
|
|
2018-02-04 17:27:32 +03:00
|
|
|
It is recommended that you use Docker Compose to run your containers, including
|
|
|
|
this image and a Postgres server. A sample ``docker-compose.yml`` is provided,
|
2018-02-04 18:18:40 +03:00
|
|
|
including example labels for reverse proxying and other artifacts.
|
2017-09-28 13:12:47 +03:00
|
|
|
|
2018-02-08 23:55:35 +03:00
|
|
|
Read the section about environment variables and set at least mandatory variables,
|
|
|
|
then run the server:
|
2017-09-28 13:12:47 +03:00
|
|
|
|
|
|
|
```
|
2018-02-04 17:27:32 +03:00
|
|
|
docker-compose up -d
|
2017-09-28 13:12:47 +03:00
|
|
|
```
|
|
|
|
|
2018-05-17 14:44:07 +03:00
|
|
|
If secrets are not specified in the environment variables, they will be generated
|
2018-05-16 12:10:31 +03:00
|
|
|
as part of the startup. Please ensure these secrets are kept between launches of the
|
|
|
|
Docker container, as their loss may require users to log in again.
|
|
|
|
|
2018-02-08 23:55:35 +03:00
|
|
|
### Manual configuration
|
|
|
|
|
|
|
|
A sample ``docker-compose.yml`` is provided, including example labels for
|
2018-05-16 12:10:31 +03:00
|
|
|
reverse proxying and other artifacts. The docker-compose file is an example,
|
|
|
|
please comment/uncomment sections that are not suitable for your usecase.
|
2018-02-08 23:55:35 +03:00
|
|
|
|
|
|
|
Specify a ``SYNAPSE_CONFIG_PATH``, preferably to a persistent path,
|
|
|
|
to use manual configuration. To generate a fresh ``homeserver.yaml``, simply run:
|
2017-09-28 13:12:47 +03:00
|
|
|
|
|
|
|
```
|
2018-02-08 21:48:53 +03:00
|
|
|
docker-compose run --rm -e SYNAPSE_SERVER_NAME=my.matrix.host synapse generate
|
2017-09-28 13:12:47 +03:00
|
|
|
```
|
|
|
|
|
2018-02-08 23:55:35 +03:00
|
|
|
Then, customize your configuration and run the server:
|
|
|
|
|
|
|
|
```
|
|
|
|
docker-compose up -d
|
|
|
|
```
|
|
|
|
|
2018-05-21 16:45:33 +03:00
|
|
|
### More information
|
2018-02-08 22:53:12 +03:00
|
|
|
|
2018-08-03 11:15:19 +03:00
|
|
|
For more information on required environment variables and mounts, see the main docker documentation at [/docker/README.md](../../docker/README.md)
|