Skip to content

Commit ad8d474

Browse files
authored
Merge branch 'spantaleev:master' into default_room_version_9
2 parents 3001b2d + 4cd44f1 commit ad8d474

File tree

205 files changed

+3610
-843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+3610
-843
lines changed

CHANGELOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,71 @@
1+
# 2022-01-07
2+
3+
## Dendrite support
4+
5+
**TLDR**: We now have optional experimental [Dendrite](https://github.com/matrix-org/dendrite) homeserver support for new installations. **Existing (Synapse) installations need to be updated**, because some internals changed. See [Adapting the configuration for existing Synapse installations](#adapting-the-configuration-for-existing-synapse-installations).
6+
7+
[Jip J. Dekker](https://github.com/Dekker1) did the [initial work](https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/818) of adding [Dendrite](https://github.com/matrix-org/dendrite) support to the playbook back in January 2021. Lots of work (and time) later, Dendrite support is finally ready for testing.
8+
9+
We believe that 2022 will be the year of the non-Synapse Matrix server!
10+
11+
The playbook was previously quite [Synapse](https://github.com/matrix-org/synapse)-centric, but can now accommodate multiple homeserver implementations. Only one homeserver implementation can be active (installed) at a given time.
12+
13+
**Synapse is still the default homeserver implementation** installed by the playbook. A new variable (`matrix_homeserver_implementation`) controls which server implementation is enabled (`synapse` or `dendrite` at the given moment).
14+
15+
### Adapting the configuration for existing Synapse installations
16+
17+
Because the playbook is not so Synapse-centric anymore, a small configuration change is necessary for existing installations to bring them up to date.
18+
19+
The `vars.yml` file for **existing installations will need to be updated** by adding this **additional configuration**:
20+
21+
```yaml
22+
# All secrets keys are now derived from `matrix_homeserver_generic_secret_key`, not from `matrix_synapse_macaroon_secret_key`.
23+
# To keep them all the same, define `matrix_homeserver_generic_secret_key` in terms of `matrix_synapse_macaroon_secret_key`.
24+
# Using a new secret value for this configuration key is also possible and should not cause any problems.
25+
#
26+
# Fun fact: new installations (based on the new `examples/vars.yml` file) do this in reverse.
27+
# That is, the Synapse macaroon secret is derived from `matrix_homeserver_generic_secret_key`.
28+
matrix_homeserver_generic_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"
29+
```
30+
31+
### Trying out Dendrite
32+
33+
Finally, **to try out Dendrite**, we recommend that you **use a new server** and the following addition to your `vars.yml` configuration:
34+
35+
```yaml
36+
matrix_homeserver_implementation: dendrite
37+
```
38+
39+
**The homeserver implementation of an existing server cannot be changed** (e.g. from Synapse to Dendrite) without data loss.
40+
41+
We're excited to gain support for other homeserver implementations, like [Conduit](https://conduit.rs/), etc!
42+
43+
44+
## Honoroit bot support
45+
46+
Thanks to [Aine](https://gitlab.com/etke.cc) of [etke.cc](https://etke.cc/), the playbook can now help you set up [Honoroit](https://gitlab.com/etke.cc/honoroit) - a helpdesk bot.
47+
48+
See our [Setting up Honoroit](docs/configuring-playbook-bot-honoroit.md) documentation to get started.
49+
50+
51+
# 2022-01-06
52+
53+
## Cinny support
54+
55+
Thanks to [Aine](https://gitlab.com/etke.cc) of [etke.cc](https://etke.cc/), the playbook now supports [Cinny](https://cinny.in/) - a new simple, elegant and secure Matrix client.
56+
57+
By default, we still install Element. Still, people who'd like to try Cinny out can now install it via the playbook.
58+
59+
Additional details are available in [Setting up Cinny](docs/configuring-playbook-client-cinny.md).
60+
61+
62+
# 2021-12-22
63+
64+
## Twitter bridging support via mautrix-twitter
65+
66+
Thanks to [Matthew Cengia](https://github.com/mattcen) and [Shreyas Ajjarapu](https://github.com/shreyasajj), besides [mx-puppet-twitter](docs/configuring-playbook-bridge-mx-puppet-twitter.md), bridging to [Twitter](https://twitter.com/) can now also happen with [mautrix-twitter](docs/configuring-playbook-bridge-mautrix-twitter.md).
67+
68+
169
# 2021-12-14
270

371
## (Security) Users of the Signal bridge may wish to upgrade it to work around log4j vulnerability

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Using this playbook, you can get the following services configured on your serve
1919

2020
- (optional, default) a [Synapse](https://github.com/matrix-org/synapse) homeserver - storing your data and managing your presence in the [Matrix](http://matrix.org/) network
2121

22+
- (optional) a [Dendrite](https://github.com/matrix-org/dendrite) homeserver - storing your data and managing your presence in the [Matrix](http://matrix.org/) network. Dendrite is a second-generation Matrix homeserver written in Go, an alternative to Synapse.
23+
2224
- (optional) [Amazon S3](https://aws.amazon.com/s3/) storage for Synapse's content repository (`media_store`) files using [Goofys](https://github.com/kahing/goofys)
2325

2426
- (optional, default) [PostgreSQL](https://www.postgresql.org/) database for Synapse. [Using an external PostgreSQL server](docs/configuring-playbook-external-postgres.md) is also possible.
@@ -51,6 +53,8 @@ Using this playbook, you can get the following services configured on your serve
5153

5254
- (optional) the [mautrix-facebook](https://github.com/mautrix/facebook) bridge for bridging your Matrix server to [Facebook](https://facebook.com/)
5355

56+
- (optional) the [mautrix-twitter](https://github.com/mautrix/twitter) bridge for bridging your Matrix server to [Twitter](https://twitter.com/)
57+
5458
- (optional) the [mautrix-hangouts](https://github.com/mautrix/hangouts) bridge for bridging your Matrix server to [Google Hangouts](https://en.wikipedia.org/wiki/Google_Hangouts)
5559

5660
- (optional) the [mautrix-googlechat](https://github.com/mautrix/googlechat) bridge for bridging your Matrix server to [Google Chat](https://en.wikipedia.org/wiki/Google_Chat)
@@ -97,6 +101,8 @@ Using this playbook, you can get the following services configured on your serve
97101

98102
- (optional) [matrix-reminder-bot](https://github.com/anoadragon453/matrix-reminder-bot) for scheduling one-off & recurring reminders and alarms - see [docs/configuring-playbook-bot-matrix-reminder-bot.md](docs/configuring-playbook-bot-matrix-reminder-bot.md) for setup documentation
99103

104+
- (optional) [honoroit](https://gitlab.com/etke.cc/honoroit) helpdesk bot - see [docs/configuring-playbook-bot-honoroit.md](docs/configuring-playbook-bot-honoroit.md) for setup documentation
105+
100106
- (optional) [Go-NEB](https://github.com/matrix-org/go-neb) multi functional bot written in Go - see [docs/configuring-playbook-bot-go-neb.md](docs/configuring-playbook-bot-go-neb.md) for setup documentation
101107

102108
- (optional) [Mjolnir](https://github.com/matrix-org/mjolnir), a moderation tool for Matrix - see [docs/configuring-playbook-bot-mjolnir.md](docs/configuring-playbook-bot-mjolnir.md) for setup documentation
@@ -111,6 +117,8 @@ Using this playbook, you can get the following services configured on your serve
111117

112118
- (optional) the [Hydrogen](https://github.com/vector-im/hydrogen-web) web client - see [docs/configuring-playbook-client-hydrogen.md](docs/configuring-playbook-client-hydrogen.md) for setup documentation
113119

120+
- (optional) the [Cinny](https://github.com/ajbura/cinny) web client - see [docs/configuring-playbook-client-cinny.md](docs/configuring-playbook-client-cinny.md) for setup documentation
121+
114122
Basically, this playbook aims to get you up-and-running with all the necessities around Matrix, without you having to do anything else.
115123

116124
**Note**: the list above is exhaustive. It includes optional or even some advanced components that you will most likely not need.

docs/ansible.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ docker run -it --rm \
5151
-v `pwd`:/work \
5252
-v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro \
5353
--entrypoint=/bin/sh \
54-
docker.io/devture/ansible:2.10.7-r0
54+
docker.io/devture/ansible:2.11.6-r1
5555
```
5656

5757
The above command tries to mount an SSH key (`$HOME/.ssh/id_rsa`) into the container (at `/root/.ssh/id_rsa`).

docs/configuring-awx-system.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ An AWX setup for managing multiple Matrix servers.
44

55
This section is used in an AWX system that can create and manage multiple [Matrix](http://matrix.org/) servers. You can issue members an AWX login to their own 'organisation', which they can use to manage/configure 1 to N servers.
66

7-
Members can be assigned a server from Digitalocean, or they can connect their own on-premises server. This script is free to use in a commercial context with the 'MemberPress Plus' and 'WP Oauth Sever' addons. It can also be run in a non-commercial context.
7+
Members can be assigned a server from Digitalocean, or they can connect their own on-premises server. These playbooks are free to use in a commercial context with the 'MemberPress Plus' plugin. They can also be run in a non-commercial context.
88

99
The AWX system is arranged into 'members' each with their own 'subscriptions'. After creating a subscription the user enters the 'provision stage' where they defined the URLs they will use, the servers location and whether or not there's already a website at the base domain. They then proceed onto the 'deploy stage' where they can configure their Matrix server.
1010

@@ -21,12 +21,7 @@ The following repositories allow you to copy and use this setup:
2121

2222
[Ansible Provision Server](https://gitlab.com/GoMatrixHosting/ansible-provision-server) - Used by AWX members to perform initial configuration of their DigitalOcean or On-Premises server.
2323

24-
25-
## Testing Fork For This Playbook
26-
27-
Updates to this section are trailed here:
28-
29-
[GoMatrixHosting Matrix Docker Ansible Deploy](https://gitlab.com/GoMatrixHosting/matrix-docker-ansible-deploy)
24+
[GMHosting External Tools](https://gitlab.com/GoMatrixHosting/gmhosting-external-tools) - Extra tools we run outside of AWX, some of which are experimental.
3025

3126

3227
## Does I need an AWX setup to use this? How do I configure it?
@@ -38,7 +33,6 @@ For simpler installation steps you can use to get started with this system, chec
3833

3934
## Does I need a front-end WordPress site? And a DigitalOcean account?
4035

41-
You do not need a front-end WordPress site or any of the mentioned WordPress plugins to use this setup. It can be run on it's own in a non-commercial context.
42-
43-
You also don't need a DigitalOcean account, but this will limit you to only being able to connect 'On-Premises' servers.
36+
You do not need a front-end WordPress site or the MemberPress plugin to use this setup. It can be run on it's own in a non-commercial context.
4437

38+
You also don't need a DigitalOcean account, although this will limit you to only being able to connect 'On-Premises' servers.

docs/configuring-dns.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ If you are using Cloudflare DNS, make sure to disable the proxy and set all reco
3737
| CNAME | `goneb` | - | - | - | `matrix.<your-domain>` |
3838
| CNAME | `sygnal` | - | - | - | `matrix.<your-domain>` |
3939
| CNAME | `hydrogen` | - | - | - | `matrix.<your-domain>` |
40+
| CNAME | `cinny` | - | - | - | `matrix.<your-domain>` |
4041

4142
## Subdomains setup
4243

@@ -57,6 +58,7 @@ The `sygnal.<your-domain>` subdomain may be necessary, because this playbook cou
5758

5859
The `hydrogen.<your-domain>` subdomain may be necessary, because this playbook could install the [Hydrogen](https://github.com/vector-im/hydrogen-web) web client. The installation of Hydrogen is disabled by default, it is not a core required component. To learn how to install it, see our [configuring Hydrogen guide](configuring-playbook-client-hydrogen.md). If you do not wish to set up Hydrogen, feel free to skip the `hydrogen.<your-domain>` DNS record.
5960

61+
The `cinny.<your-domain>` subdomain may be necessary, because this playbook could install the [Cinny](https://github.com/ajbura/cinny) web client. The installation of cinny is disabled by default, it is not a core required component. To learn how to install it, see our [configuring cinny guide](configuring-playbook-client-cinny.md). If you do not wish to set up cinny, feel free to skip the `cinny.<your-domain>` DNS record.
6062

6163
## `_matrix-identity._tcp` SRV record setup
6264

docs/configuring-playbook-bot-go-neb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ matrix_bot_go_neb_services:
198198
# Each room will get the notification with the alert rendered with the given template
199199
rooms:
200200
"!someroomid:domain.tld":
201-
text_template: "{{range .Alerts -}} [{{ .Status }}] {{index .Labels \"alertname\" }}: {{index .Annotations \"description\"}} {{ end -}}"
202-
html_template: "{{range .Alerts -}} {{ $severity := index .Labels \"severity\" }} {{ if eq .Status \"firing\" }} {{ if eq $severity \"critical\"}} <font color='red'><b>[FIRING - CRITICAL]</b></font> {{ else if eq $severity \"warning\"}} <font color='orange'><b>[FIRING - WARNING]</b></font> {{ else }} <b>[FIRING - {{ $severity }}]</b> {{ end }} {{ else }} <font color='green'><b>[RESOLVED]</b></font> {{ end }} {{ index .Labels \"alertname\"}} : {{ index .Annotations \"description\"}} <a href=\"{{ .GeneratorURL }}\">source</a><br/>{{end -}}"
201+
text_template: "{% raw %}{{range .Alerts -}} [{{ .Status }}] {{index .Labels \"alertname\" }}: {{index .Annotations \"description\"}} {{ end -}}{% endraw %}"
202+
html_template: "{% raw %}{{range .Alerts -}} {{ $severity := index .Labels \"severity\" }} {{ if eq .Status \"firing\" }} {{ if eq $severity \"critical\"}} <font color='red'><b>[FIRING - CRITICAL]</b></font> {{ else if eq $severity \"warning\"}} <font color='orange'><b>[FIRING - WARNING]</b></font> {{ else }} <b>[FIRING - {{ $severity }}]</b> {{ end }} {{ else }} <font color='green'><b>[RESOLVED]</b></font> {{ end }} {{ index .Labels \"alertname\"}} : {{ index .Annotations \"description\"}} <a href=\"{{ .GeneratorURL }}\">source</a><br/>{{end -}}{% endraw %}"
203203
msg_type: "m.text" # Must be either `m.text` or `m.notice`
204204
```
205205
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Setting up Honoroit (optional)
2+
3+
The playbook can install and configure [Honoroit](https://gitlab.com/etke.cc/honoroit) for you.
4+
5+
It's a bot you can use to setup **your own helpdesk on matrix**
6+
7+
See the project's [documentation](https://gitlab.com/etke.cc/honoroit#how-it-looks-like) to learn what it does with screenshots and why it might be useful to you.
8+
9+
10+
## Registering the bot user
11+
12+
By default, the playbook will set up the bot with a username like this: `@honoroit:DOMAIN`.
13+
14+
(to use a different username, adjust the `matrix_bot_honoroit_login` variable).
15+
16+
You **need to register the bot user manually** before setting up the bot. You can use the playbook to [register a new user](registering-users.md):
17+
18+
```
19+
ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=honoroit password=PASSWORD_FOR_THE_BOT admin=no' --tags=register-user
20+
```
21+
22+
Choose a strong password for the bot. You can generate a good password with a command like this: `pwgen -s 64 1`.
23+
24+
25+
## Adjusting the playbook configuration
26+
27+
Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file:
28+
29+
```yaml
30+
matrix_bot_honoroit_enabled: true
31+
32+
# Adjust this to whatever password you chose when registering the bot user
33+
matrix_bot_honoroit_password: PASSWORD_FOR_THE_BOT
34+
35+
# Adjust this to your room ID
36+
matrix_bot_honoroit_roomid: "!yourRoomID:DOMAIN"
37+
```
38+
39+
40+
## Installing
41+
42+
After configuring the playbook, run the [installation](installing.md) command again:
43+
44+
```
45+
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
46+
```
47+
48+
49+
## Usage
50+
51+
To use the bot, invite the `@honoroit:DOMAIN` to the room you specified in config, after that any matrix user can send a message to the `@honoroit:DOMAIN` to start a new thread in that room.
52+
53+
Send `!ho help` to the room to see the bot's help menu for additional commands.
54+
55+
You can also refer to the upstream [documentation](https://gitlab.com/etke.cc/honoroit#features).
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Setting up Mautrix Twitter (optional)
2+
3+
**Note**: bridging to [Twitter](https://twitter.com/) can also happen via the [mx-puppet-twitter](configuring-playbook-bridge-mx-puppet-twitter.md) bridge supported by the playbook.
4+
5+
The playbook can install and configure [mautrix-twitter](https://github.com/mautrix/twitter) for you.
6+
7+
See the project's [documentation](https://github.com/mautrix/twitter) to learn what it does and why it might be useful to you.
8+
9+
```yaml
10+
matrix_mautrix_twitter_enabled: true
11+
```
12+
13+
14+
## Set up Double Puppeting
15+
16+
If you'd like to use [Double Puppeting](https://docs.mau.fi/bridges/general/double-puppeting.html) (hint: you most likely do), you have 2 ways of going about it.
17+
18+
### Method 1: automatically, by enabling Shared Secret Auth
19+
20+
The bridge will automatically perform Double Puppeting if you enable [Shared Secret Auth](configuring-playbook-shared-secret-auth.md) for this playbook.
21+
22+
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.
23+
24+
### Method 2: manually, by asking each user to provide a working access token
25+
26+
This method is currently not available for the Mautrix-Twitter bridge, but is on the [roadmap](https://github.com/mautrix/twitter/blob/master/ROADMAP.md) under Misc/Manual login with `login-matrix`
27+
28+
## Usage
29+
30+
1. You then need to start a chat with `@twitterbot:YOUR_DOMAIN` (where `YOUR_DOMAIN` is your base domain, not the `matrix.` domain).
31+
2. Send login-cookie to start the login. The bot should respond with instructions on how to proceed.
32+
33+
You can learn more here about authentication from the bridge's [official documentation on Authentication](https://docs.mau.fi/bridges/python/twitter/authentication.html).
34+
35+
After successfully enabling bridging, you may wish to [set up Double Puppeting](#set-up-double-puppeting), if you haven't already done so.

docs/configuring-playbook-bridge-mx-puppet-twitter.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Setting up MX Puppet Twitter (optional)
22

3+
**Note**: bridging to [Twitter](https://twitter.com/) can also happen via the [mautrix-twitter](configuring-playbook-bridge-mautrix-twitter.md) bridge supported by the playbook.
4+
35
The playbook can install and configure
46
[mx-puppet-twitter](https://github.com/Sorunome/mx-puppet-twitter) for you.
57

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Configuring Cinny (optional)
2+
3+
This playbook can install the [cinny](https://github.com/ajbura/cinny) Matrix web client for you.
4+
cinny is a web client focusing primarily on simple, elegant and secure interface.
5+
cinny can be installed alongside or instead of Element.
6+
7+
If you'd like cinny to be installed, add the following to your configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`):
8+
9+
```yaml
10+
matrix_client_cinny_enabled: true
11+
```
12+
13+
You will also need to add a DNS record so that cinny can be accessed.
14+
By default cinny will use https://cinny.DOMAIN so you will need to create an CNAME record
15+
for `cinny`. See [Configuring DNS](configuring-dns.md).
16+
17+
If you would like to use a different domain, add the following to your configuration file (changing it to use your preferred domain):
18+
19+
```yaml
20+
matrix_server_fqn_cinny: "app.{{ matrix_domain }}"
21+
```

0 commit comments

Comments
 (0)