.config
.github
bin
collections
docs
assets
README.md
alternative-architectures.md
ansible.md
configuring-captcha.md
configuring-dns.md
configuring-playbook-alertmanager-receiver.md
configuring-playbook-appservice-double-puppet.md
configuring-playbook-appservice-draupnir-for-all.md
configuring-playbook-backup-borg.md
configuring-playbook-base-domain-serving.md
configuring-playbook-bot-baibot.md
configuring-playbook-bot-buscarron.md
configuring-playbook-bot-chatgpt.md
configuring-playbook-bot-draupnir.md
configuring-playbook-bot-go-neb.md
configuring-playbook-bot-honoroit.md
configuring-playbook-bot-matrix-registration-bot.md
configuring-playbook-bot-matrix-reminder-bot.md
configuring-playbook-bot-maubot.md
configuring-playbook-bot-mjolnir.md
configuring-playbook-bridge-appservice-discord.md
configuring-playbook-bridge-appservice-irc.md
configuring-playbook-bridge-appservice-kakaotalk.md
configuring-playbook-bridge-appservice-slack.md
configuring-playbook-bridge-appservice-webhooks.md
configuring-playbook-bridge-beeper-linkedin.md
configuring-playbook-bridge-go-skype-bridge.md
configuring-playbook-bridge-heisenbridge.md
configuring-playbook-bridge-hookshot.md
configuring-playbook-bridge-matrix-bridge-sms.md
configuring-playbook-bridge-mautrix-discord.md
configuring-playbook-bridge-mautrix-facebook.md
configuring-playbook-bridge-mautrix-gmessages.md
configuring-playbook-bridge-mautrix-googlechat.md
configuring-playbook-bridge-mautrix-hangouts.md
configuring-playbook-bridge-mautrix-instagram.md
configuring-playbook-bridge-mautrix-meta-instagram.md
configuring-playbook-bridge-mautrix-meta-messenger.md
configuring-playbook-bridge-mautrix-signal.md
configuring-playbook-bridge-mautrix-slack.md
configuring-playbook-bridge-mautrix-telegram.md
configuring-playbook-bridge-mautrix-twitter.md
configuring-playbook-bridge-mautrix-whatsapp.md
configuring-playbook-bridge-mautrix-wsproxy.md
configuring-playbook-bridge-mx-puppet-discord.md
configuring-playbook-bridge-mx-puppet-groupme.md
configuring-playbook-bridge-mx-puppet-instagram.md
configuring-playbook-bridge-mx-puppet-skype.md
configuring-playbook-bridge-mx-puppet-slack.md
configuring-playbook-bridge-mx-puppet-steam.md
configuring-playbook-bridge-mx-puppet-twitter.md
configuring-playbook-bridge-postmoogle.md
configuring-playbook-bridge-wechat.md
configuring-playbook-cactus-comments.md
configuring-playbook-client-cinny.md
configuring-playbook-client-element-web.md
configuring-playbook-client-hydrogen.md
configuring-playbook-client-schildichat-web.md
configuring-playbook-conduit.md
configuring-playbook-dendrite.md
configuring-playbook-dimension.md
configuring-playbook-dynamic-dns.md
configuring-playbook-email.md
configuring-playbook-email2matrix.md
configuring-playbook-etherpad.md
configuring-playbook-external-postgres.md
configuring-playbook-federation.md
configuring-playbook-jitsi.md
configuring-playbook-ldap-auth.md
configuring-playbook-ma1sd.md
configuring-playbook-matrix-authentication-service.md
configuring-playbook-matrix-corporal.md
configuring-playbook-matrix-ldap-registration-proxy.md
configuring-playbook-matrix-media-repo.md
configuring-playbook-matrix-registration.md
configuring-playbook-mautrix-bridges.md
configuring-playbook-nginx.md
configuring-playbook-ntfy.md
configuring-playbook-own-webserver.md
configuring-playbook-pantalaimon.md
configuring-playbook-postgres-backup.md
configuring-playbook-prometheus-grafana.md
configuring-playbook-prometheus-nginxlog.md
configuring-playbook-prometheus-postgres.md
configuring-playbook-rageshake.md
configuring-playbook-rest-auth.md
configuring-playbook-riot-web.md
configuring-playbook-s3-goofys.md
configuring-playbook-s3.md
configuring-playbook-shared-secret-auth.md
configuring-playbook-sliding-sync-proxy.md
configuring-playbook-ssl-certificates.md
configuring-playbook-sygnal.md
configuring-playbook-synapse-admin.md
configuring-playbook-synapse-auto-accept-invite.md
configuring-playbook-synapse-auto-compressor.md
configuring-playbook-synapse-s3-storage-provider.md
configuring-playbook-synapse-simple-antispam.md
configuring-playbook-synapse-usage-exporter.md
configuring-playbook-synapse.md
configuring-playbook-telemetry.md
configuring-playbook-traefik.md
configuring-playbook-turn.md
configuring-playbook-user-verification-service.md
configuring-playbook.md
configuring-well-known.md
container-images.md
faq.md
getting-the-playbook.md
howto-server-delegation.md
howto-srv-server-delegation.md
importing-postgres.md
importing-synapse-media-store.md
importing-synapse-sqlite.md
installing.md
just.md
maintenance-and-troubleshooting.md
maintenance-checking-services.md
maintenance-migrating.md
maintenance-postgres.md
maintenance-synapse.md
maintenance-upgrading-services.md
obtaining-access-tokens.md
playbook-tags.md
prerequisites.md
quick-start.md
registering-users.md
self-building.md
uninstalling.md
updating-users-passwords.md
examples
group_vars
roles
.editorconfig
.envrc
.gitattributes
.gitignore
.yamllint
CHANGELOG.md
LICENSE
Makefile
README.md
YEAR-IN-REVIEW.md
ansible.cfg
flake.lock
flake.nix
jitsi_jvb.yml
justfile
requirements.yml
setup.yml
136 lines
5.4 KiB
Markdown
136 lines
5.4 KiB
Markdown
# Setting up a Generic Mautrix Bridge (optional)
|
|
|
|
The playbook can install and configure various [mautrix](https://github.com/mautrix) bridges (twitter, facebook, instagram, signal, hangouts, googlechat, etc.), as well as many other (non-mautrix) bridges. This is a common guide for configuring mautrix bridges.
|
|
|
|
You can see each bridge's features at in the `ROADMAP.md` file in its corresponding [mautrix](https://github.com/mautrix) repository.
|
|
|
|
## Adjusting the playbook configuration
|
|
|
|
To enable the bridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
|
|
|
```yaml
|
|
# Replace SERVICENAME with one of: twitter, facebook, instagram, ..
|
|
matrix_mautrix_SERVICENAME_enabled: true
|
|
```
|
|
|
|
There are some additional things you may wish to configure about the bridge before you continue. Each bridge may have additional requirements besides `_enabled: true`. For example, the mautrix-telegram bridge (our documentation page about it is [here](configuring-playbook-bridge-mautrix-telegram.md)) requires the `matrix_mautrix_telegram_api_id` and `matrix_mautrix_telegram_api_hash` variables to be defined. Refer to each bridge's individual documentation page for details about enabling bridges.
|
|
|
|
To **configure a user as an administrator for all bridges**, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
|
|
|
```yaml
|
|
matrix_admin: "@YOUR_USERNAME:{{ matrix_domain }}"
|
|
```
|
|
|
|
**Alternatively** (more verbose, but allows multiple admins to be configured), you can do the same on a per-bridge basis with:
|
|
|
|
```yaml
|
|
matrix_mautrix_SERVICENAME_configuration_extension_yaml: |
|
|
bridge:
|
|
permissions:
|
|
'@YOUR_USERNAME:{{ matrix_domain }}': admin
|
|
```
|
|
|
|
## encryption
|
|
|
|
Encryption support is off by default. If you would like to enable encryption, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
|
|
|
**for all bridges with encryption support**:
|
|
|
|
```yaml
|
|
matrix_bridges_encryption_enabled: true
|
|
matrix_bridges_encryption_default: true
|
|
```
|
|
|
|
**Alternatively**, for a specific bridge:
|
|
|
|
```yaml
|
|
matrix_mautrix_SERVICENAME_bridge_encryption_enabled: true
|
|
matrix_mautrix_SERVICENAME_bridge_encryption_default: true
|
|
```
|
|
|
|
## relay mode
|
|
|
|
Relay mode is off by default. If you would like to enable relay mode, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
|
|
|
**for all bridges with relay mode support**:
|
|
|
|
```yaml
|
|
matrix_bridges_relay_enabled: true
|
|
```
|
|
|
|
**Alternatively**, for a specific bridge:
|
|
|
|
```yaml
|
|
matrix_mautrix_SERVICENAME_configuration_extension_yaml: |
|
|
bridge:
|
|
relay:
|
|
enabled: true
|
|
```
|
|
|
|
You can only have one `matrix_mautrix_SERVICENAME_configuration_extension_yaml` definition in `vars.yml` per bridge, so if you need multiple pieces of configuration there, just merge them like this:
|
|
|
|
```yaml
|
|
matrix_mautrix_SERVICENAME_configuration_extension_yaml: |
|
|
bridge:
|
|
permissions:
|
|
'@YOUR_USERNAME:{{ matrix_domain }}': admin
|
|
encryption:
|
|
allow: true
|
|
default: true
|
|
```
|
|
|
|
## Setting the bot's username
|
|
|
|
```yaml
|
|
matrix_mautrix_SERVICENAME_appservice_bot_username: "BOTNAME"
|
|
```
|
|
|
|
Can be used to set the username for the bridge.
|
|
|
|
## Discovering additional configuration options
|
|
|
|
You may wish to look at `roles/custom/matrix-bridge-mautrix-SERVICENAME/templates/config.yaml.j2` and `roles/custom/matrix-bridge-mautrix-SERVICENAME/defaults/main.yml` to find other things you would like to configure.
|
|
|
|
## Installing
|
|
|
|
After configuring the playbook, run the [installation](installing.md) command: `just install-all` or `just setup-all`
|
|
|
|
## Set up Double Puppeting
|
|
|
|
To set up [Double Puppeting](https://docs.mau.fi/bridges/general/double-puppeting.html) enable the [Appservice Double Puppet](configuring-playbook-appservice-double-puppet.md) service for this playbook.
|
|
|
|
The bridge will automatically perform Double Puppeting if you enable [Shared Secret Auth](configuring-playbook-shared-secret-auth.md) for this playbook by adding
|
|
|
|
```yaml
|
|
matrix_appservice_double_puppet_enabled: true
|
|
```
|
|
|
|
This is the recommended way of setting up Double Puppeting, as it's easier to accomplish, works for all your users automatically, and has less of a chance of breaking in the future.
|
|
|
|
## Controlling the logging level
|
|
|
|
```yaml
|
|
matrix_mautrix_SERVICENAME_logging_level: WARN
|
|
```
|
|
|
|
to `vars.yml` to control the logging level, where you may replace WARN with one of the following to control the verbosity of the logs generated: TRACE, DEBUG, INFO, WARN, ERROR, or FATAL.
|
|
|
|
If you have issues with a service, and are requesting support, the higher levels of logging will generally be more helpful.
|
|
|
|
|
|
## Usage
|
|
|
|
You then need to start a chat with `@SERVICENAMEbot:example.com` (where `example.com` is your base domain, not the `matrix.` domain).
|
|
|
|
Send `login` to the bridge bot to get started. You can learn more here about authentication from the bridge's official documentation on Authentication: https://docs.mau.fi/bridges/python/SERVICENAME/authentication.html
|
|
|
|
If you run into trouble, check the [Troubleshooting](#troubleshooting) section below.
|
|
|
|
|
|
|
|
## Troubleshooting
|
|
|
|
For troubleshooting information with a specific bridge, please see the playbook documentation about it (some other document in in `docs/`) and the upstream ([mautrix](https://github.com/mautrix)) bridge documentation for that specific bridge.
|
|
|
|
Reporting bridge bugs should happen upstream, in the corresponding mautrix repository, not to us.
|