2021-03-02 16:38:38 +00:00
|
|
|
# Matrix (Synapse)
|
2020-09-08 16:40:57 +00:00
|
|
|
|
2021-03-02 16:38:38 +00:00
|
|
|
<!-- metadata -->
|
2021-12-12 19:00:51 +00:00
|
|
|
|
2021-12-26 01:30:53 +00:00
|
|
|
* **Category**: Apps
|
|
|
|
* **Status**: 0, work-in-progress
|
|
|
|
* **Image**: [`matrixdotorg/synapse`](https://hub.docker.com/r/matrixdotorg/synapse), 4, upstream
|
|
|
|
* **Healthcheck**: Yes
|
|
|
|
* **Backups**: No
|
|
|
|
* **Email**: No
|
|
|
|
* **Tests**: No
|
|
|
|
* **SSO**: No
|
2022-02-08 00:38:23 +00:00
|
|
|
|
2021-03-02 16:38:38 +00:00
|
|
|
<!-- endmetadata -->
|
2020-09-08 16:40:57 +00:00
|
|
|
|
2021-03-02 16:38:38 +00:00
|
|
|
## Basic usage
|
|
|
|
|
|
|
|
1. Set up Docker Swarm and [`abra`]
|
2021-03-02 17:55:58 +00:00
|
|
|
2. Deploy [`coop-cloud/traefik`]
|
2021-03-02 18:24:18 +00:00
|
|
|
3. `abra app new matrix-synapse --secrets` (optionally with `--pass` if you'd like
|
2021-03-02 16:38:38 +00:00
|
|
|
to save secrets in `pass`)
|
|
|
|
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
2020-09-08 16:40:57 +00:00
|
|
|
your Docker swarm box
|
2021-03-02 16:38:38 +00:00
|
|
|
5. `abra app YOURAPPDOMAIN deploy`
|
|
|
|
6. Create an initial user:
|
|
|
|
`abra app YOURAPPDOMAIN run app register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008`
|
2020-09-08 16:40:57 +00:00
|
|
|
|
2021-03-02 18:12:59 +00:00
|
|
|
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
|
|
|
[cc-traefik]: https://git.autonomic.zone/coop-cloud/traefik
|
2021-12-12 19:00:51 +00:00
|
|
|
|
|
|
|
## Tips & Tricks
|
|
|
|
|
2022-02-08 00:37:17 +00:00
|
|
|
### Seeing what changed in `homeserver.yaml` between versions
|
|
|
|
|
|
|
|
Change the version range to suit your needs.
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone https://github.com/matrix-org/synapse
|
|
|
|
cd synapse/docs
|
|
|
|
git log --follow -p v1.48.0..v1.51.0 sample_config.yaml
|
|
|
|
```
|
|
|
|
|
2021-12-12 19:00:51 +00:00
|
|
|
### Generating a new `homeserver.yaml`
|
|
|
|
|
2022-02-08 00:37:17 +00:00
|
|
|
The default is also available to see [here](https://matrix-org.github.io/synapse/latest/usage/configuration/homeserver_sample_config.html).
|
|
|
|
|
2021-12-12 19:00:51 +00:00
|
|
|
```
|
|
|
|
docker run -it \
|
|
|
|
--entrypoint="" \
|
|
|
|
-e SYNAPSE_SERVER_NAME=foo.com \
|
|
|
|
-e SYNAPSE_REPORT_STATS=no \
|
|
|
|
matrixdotorg/synapse:v1.48.0 \
|
|
|
|
sh -c '/start.py generate; cat /data/homeserver.yaml' > homeserver.yaml.tmpl`
|
|
|
|
```
|
2021-12-13 11:43:51 +00:00
|
|
|
|
|
|
|
### Generating a new `<server>.log.config`
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run -it \
|
|
|
|
--entrypoint="" \
|
|
|
|
-e SYNAPSE_SERVER_NAME=foo.com \
|
|
|
|
-e SYNAPSE_REPORT_STATS=no \
|
|
|
|
matrixdotorg/synapse:v1.48.0 \
|
|
|
|
sh -c '/start.py generate; cat /data/foo.com.log.config' > log.config
|
|
|
|
```
|