Open, interoperable, decentralised real-time communication https://matrix.org
Go to file
decentral1se 2beb6e4bf0
feat: telegram bridge admins
2022-05-15 10:59:50 +02:00
release chore: publish 2.0.0+v1.58.1 release 2022-05-12 17:26:14 +02:00
.env.sample feat: telegram bridge admins 2022-05-15 10:59:50 +02:00
.gitignore chore: ignore synapse clone 2022-02-08 01:37:10 +01:00
README.md documenting the chaos 2022-05-15 10:47:52 +02:00
abra.sh feat: telegram bridge admins 2022-05-15 10:59:50 +02:00
compose.keycloak.yml add env vars for idp_id, allow_existing_users 2022-05-12 16:59:22 +02:00
compose.keycloak2.yml very hacky multiple keycloaks! 2022-03-08 09:34:00 +01:00
compose.smtp.yml feat: smtp support 2021-12-13 17:21:07 +01:00
compose.telegram.yml feat: telegram bridge admins 2022-05-15 10:59:50 +02:00
compose.turn.yml fix: env var + escaping logic 2021-12-13 13:22:14 +01:00
compose.yml fix: try this depends_on trick for the db 2022-05-12 22:29:27 +02:00
entrypoint.sh.tmpl fix: no hardcoded secrets 2021-12-13 12:16:23 +01:00
homeserver.yaml.tmpl fix: telegram bot - hacking it until it runs 2022-05-12 22:27:12 +02:00
log.config.tmpl feat: more privacy friendly defaults 2022-02-08 00:32:28 +01:00
telegram_bridge.yaml.tmpl feat: telegram bridge admins 2022-05-15 10:59:50 +02:00

README.md

Matrix (Synapse)

  • Category: Apps
  • Status: 0, work-in-progress
  • Image: matrixdotorg/synapse, 4, upstream
  • Healthcheck: Yes
  • Backups: No
  • Email: Yes
  • Tests: No
  • SSO: Yes

Basic usage

  1. Set up Docker Swarm and abra
  2. Deploy coop-cloud/traefik
  3. abra app new matrix-synapse --secrets (optionally with --pass if you'd like to save secrets in pass)
  4. abra app YOURAPPDOMAIN config - be sure to change $DOMAIN to something that resolves to your Docker swarm box
  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

Tips & Tricks

Disabling federation

We're not sure this does it exactly and there is still a discussion running upstrem about whether this is the right way to do it & whether it could be more convenient. We welcome issues / change sets to close up more federation functionality.

  • use DISABLE_FEDERATION=1 to turn off federation listeners
  • don't use compose.matrix.yml in your traefik config to keep the federation ports closed

Enabling federation

See #27 for more.

Depending on your setup, using SERVE_SERVER_WELLKNOWN=true might work to start federating.

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

Generating a new homeserver.yaml

The default is also available to see here.

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`

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

Getting client discovery on a custom domain

You'll need to deploy something like this.

This could be implemented in this recipe but we haven't merged it in yet. Change sets are welcome.

Telegram bridging

WIP

Setting it up is a bit of a chicken/egg & chasing cats moment.

You need to get your bot setup on the telegram side first and have these values:

api_id: ...
api_hash: ...
telegram_bot_token: ...

Here is a rough guide:

abra app secret insert <domain> telegram_api_hash v1 <secret>
abra app secret insert <domain> telegram_bot_token v1 <secret>
abra app secret generate -a <domain>

abra app deploy <domain>
abra app run matrix.fva.wtf telegram_bridge cat /data/registration.yaml
abra app undeploy <domain>

abra app secret rm <domain> telegram_as_token
abra app secret insert <domain> telegram_as_token v1 <secret>

abra app secret rm <domain> telegram_as_token
abra app secret insert <domain> telegram_hs_token v1 <secret>

abra app deploy <domain>

Some helpful documentation: