Commit Graph

10832 Commits

Author SHA1 Message Date
Suguru Hirahara
fa7b784c5b Remove conduwuit (#4913) 2026-02-11 15:03:56 +02:00
renovate[bot]
15ba65f235 chore(deps): update docker.io/metio/matrix-alertmanager-receiver docker tag to v2026.2.11 2026-02-11 11:07:09 +02:00
Aine
4ec41c0b42 Merge pull request #4909 from spantaleev/renovate/ghcr.io-element-hq-element-web-1.x
chore(deps): update ghcr.io/element-hq/element-web docker tag to v1.12.10
2026-02-10 18:11:36 +00:00
renovate[bot]
0a08126324 chore(deps): update ghcr.io/element-hq/element-web docker tag to v1.12.10 2026-02-10 17:49:29 +00:00
renovate[bot]
482ef0fdf5 chore(deps): update ghcr.io/element-hq/synapse docker tag to v1.147.0 2026-02-10 16:51:46 +02:00
renovate[bot]
ca356c52e2 chore(deps): update ghcr.io/element-hq/matrix-authentication-service docker tag to v1.11.0 2026-02-10 16:51:09 +02:00
Slavi Pantaleev
ecf9befc32 Adapt to the all-at-once restart mode default in systemd_service_manager v2.0.0-0
- `install-service` no longer forces `one-by-one` restart mode

- the coturn priority condition is flipped: only `one-by-one` mode
  needs the delayed priority (1500); all other modes (including
  the new `all-at-once` default) use the normal priority (900)

Ref:

- d42cd92045
- f3e658cca3/docs/restart-mode-comparison.md
- 36445fb419
- 750cb7e29e
2026-02-10 16:41:41 +02:00
Slavi Pantaleev
750cb7e29e Upgrade systemd_service_manager (v1.1.0-0 -> v2.0.0-0) 2026-02-10 16:21:57 +02:00
Suguru Hirahara
815b9baec6 Update notes about self-hosting services with the MASH playbook
Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-10 22:31:11 +09:00
Suguru Hirahara
1dcd4636ff Add a note about self-hosting echoip with the MASH playbook
Reuse 3653f9f89b/docs/configuring-playbook-ssl-certificates.md

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-10 22:28:08 +09:00
renovate[bot]
7f04231904 chore(deps): update ghcr.io/etkecc/baibot docker tag to v1.14.1 2026-02-10 15:18:02 +02:00
renovate[bot]
b0828528df chore(deps): update dependency ntfy to v2.17.0-0 2026-02-10 11:53:33 +02:00
Suguru Hirahara
96029bf916 Replace "EchoIP" with "echoip"
cf. https://github.com/mpolden/echoip

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-10 17:41:52 +09:00
Slavi Pantaleev
ace086056f Upgrade Postgres (v18.1-4 -> v18.1-5) 2026-02-09 21:24:48 +02:00
Slavi Pantaleev
0e8ef8ef10 Add retry logic for Synapse user registration on Connection refused
When DB credentials change (derived from matrix_synapse_macaroon_secret_key),
a running Synapse container may fail to connect to its database and stop
serving requests. This causes register_new_matrix_user to fail with
"Connection refused" when the matrix-user-creator role tries to register users.

This extends the retry logic from 44b43a51b (which handled HMAC failures)
to also handle Connection refused errors: restart Synapse (picking up the
new config with updated credentials), wait for it to start, and retry.

Caused by c21a80d232

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:36:59 +02:00
Slavi Pantaleev
2c2738a48f Remove passlib dependency by making matrix-media-repo datastore IDs user-provided
These IDs were incorrectly auto-derived from matrix_homeserver_generic_secret_key,
which is meant for secrets that are OK to change. Datastore IDs are static
identifiers that must never change after first use.

The playbook now requires users to explicitly set matrix_media_repo_datastore_file_id
(and matrix_media_repo_datastore_s3_id when S3 is enabled) in vars.yml, with
validation that fails early if they are missing.

This was the last usage of passlib, which is now removed from prerequisites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:56:51 +02:00
Suguru Hirahara
09914bf338 Set ddclient_uid and ddclient_gid
Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-09 19:49:59 +09:00
Slavi Pantaleev
44b43a51b9 Add retry logic for Synapse user registration on HMAC failure
When the registration_shared_secret changes (derived from
matrix_synapse_macaroon_secret_key), a running Synapse container still
has the old secret in its config. This causes register_new_matrix_user
to fail with "HMAC incorrect" when the matrix-user-creator role tries
to register users.

This mirrors the approach from 2a581cce (which added similar retry
logic for the Matrix Authentication Service on database auth failure):
if the initial registration attempt fails with an HMAC error, restart
Synapse (picking up the new config with the updated secret), wait for
it to start, and retry.

Caused by c21a80d232

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 06:29:14 +02:00
Aine
5f8235f44a remove Zulip bridge 2026-02-08 20:34:56 +02:00
renovate[bot]
eb393b4eb8 chore(deps): update dependency setuptools to v82 2026-02-08 19:46:32 +02:00
Slavi Pantaleev
92c204394a Upgrade Postgres (v18.1-3 -> v18.1-4) 2026-02-08 18:46:36 +02:00
Slavi Pantaleev
a1015b6df2 Change salt for Whatsapp token secrets to make pre-commit happy 2026-02-08 18:43:10 +02:00
Slavi Pantaleev
2a581cce62 Add retry logic for MAS user registration on database auth failure
When the Postgres role updates database passwords (e.g., due to a
change in the secret derivation method), the Matrix Authentication
Service container may still be running with old configuration that
references the previous password. This causes mas-cli to fail with
"password authentication failed" when the matrix-user-creator role
tries to register users.

Rather than adding config-change detection or eager restarts to the
MAS role, this adds targeted retry logic: if the initial registration
attempt fails with a database authentication error, restart the MAS
service (which picks up the new config with the updated password),
wait for it to start, and retry. The restart usually only triggers
once per run since subsequent user registrations succeed after the restart.

Related to c21a80d232

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:32:20 +02:00
Slavi Pantaleev
c21a80d232 Switch to fast single-round hashing for derived secrets
Replace password_hash('sha512', rounds=655555) with hash('sha512')
for all 114 secret derivations in group_vars/matrix_servers.

The old method (655k rounds of SHA-512) was designed for protecting
low-entropy human passwords in /etc/shadow. For deriving secrets
from a high-entropy secret key, a single hash round is equally
secure - the security comes from the key's entropy, not the
computational cost. SHA-512 remains preimage-resistant regardless
of rounds.

This yields a major performance improvement: evaluating
postgres_managed_databases (which references multiple derived
database passwords) dropped from ~10.7s to ~0.6s on a fast mini
PC. The Postgres role evaluates this variable multiple times, and
other roles reference derived passwords too, so the cumulative
savings across a full playbook run are substantial.

All derived service passwords (database passwords, appservice
tokens, etc.) will change on the next run. The main/superuser
database password is not affected (it's hardcoded in inventory
variables). All services receive their new passwords in the same
run, so this should be seamless.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:15:02 +02:00
Suguru Hirahara
baa740fcda Relocate ddclient role to MASH organization (#4902)
* Fetch ansible-role-ddclient from MASH project

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Replace `matrix_dynamic_dns` with `ddclient`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Set `matrix-dynamic-dns` to `ddclient_identifier`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Remove `ddclient_container_network` in favor of the role's configuration

On the role the value of `ddclient_container_network` is set to `ddclient_identifier`, which is set to `matrix-dynamic-dns` on the playbook.

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Replace `matrix-dynamic-dns` with `ddclient` on matrix_servers

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Replace `ddclient_docker_image_*` with `ddclient_container_image_*`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Update `ddclient_container_image_*`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Move `ddclient_base_path` to matrix_servers

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Move `ddclient_web_*` to matrix_servers

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Remove `matrix-dynamic-dns` directory

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Update configuring-playbook-dynamic-dns.md

Reuse 75e264f538/docs/services/ddclient.md

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Fix a typo

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

---------

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
Co-authored-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-08 16:34:35 +02:00
Suguru Hirahara
66d66f67f8 Remove obsolete X-Frame-Options
Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-08 21:54:38 +09:00
renovate[bot]
c1a8ca6397 chore(deps): update dependency systemd_service_manager to v1.1.0-0 2026-02-08 09:38:49 +02:00
Suguru Hirahara
4310fb83c1 Remove ma1sd (#4898)
* Remove ma1sd

Reuse 6d1ec58a82/docs/configuring-playbook-bridge-mautrix-instagram.md

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Update configuring-playbook-ma1sd.pot

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Update changelog entry date for ma1sd removal

---------

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
Co-authored-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2026-02-08 09:35:51 +02:00
Suguru Hirahara
9320ef49fe Relocate Cinny role to MASH organization (#4900)
* Use `ansible-role-cinny`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Replace `matrix-client-cinny` and `matrix_client_cinny` with `cinny`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Set `matrix-client-cinny` to `cinny_identifier`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Set `cinny_container_image_*`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Remove `cinny_container_image_registry_prefix_*`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Replace `cinny_data_path` with `cinny_base_path`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Move `cinny_hostname` to `matrix_servers`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Add `cinny_uid` and `cinny_gid`

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Remove `matrix-client-cinny` in favor of ansible-role-cinny

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

* Update CHANGELOG.md

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>

---------

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
Co-authored-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-07 11:01:04 +02:00
Slavi Pantaleev
cf6c5208e8 Fix cli-non-interactive syntax in uninstallation docs (add -c flag)
The cli-non-interactive script passes arguments directly to psql, which
interprets positional arguments as database names, not SQL commands.
Without the -c flag, commands like:

  /matrix/postgres/bin/cli-non-interactive 'DROP DATABASE foo;'

fail with: FATAL: database "DROP DATABASE foo;" does not exist

The correct syntax requires -c to pass a command:

  /matrix/postgres/bin/cli-non-interactive -c 'DROP DATABASE foo;'

This mistake was originally introduced in c399992542
when the matrix-bridge-mautrix-hangouts role was removed. That commit's
uninstallation docs were then used as a template and the error propagated
to subsequent removal documentation for other bridges and components.
2026-02-07 10:52:56 +02:00
renovate[bot]
e6168d8e9c chore(deps): update dependency setuptools to v81 2026-02-07 09:45:29 +02:00
Slavi Pantaleev
6d1ec58a82 Fix prometheus_postgres_exporter_port variable rename
The variable was renamed to prometheus_postgres_exporter_container_http_port in
2b37e604cb

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4897

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4894
2026-02-06 01:25:34 +02:00
Aine
adf521f8cb add matrix_synapse_email_enable_notifs and matrix_synapse_email_notif_for_new_users 2026-02-05 19:09:51 +00:00
Suguru Hirahara
4cfe5f8f3f Update related to the year
Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-05 20:32:12 +02:00
Suguru Hirahara
72c8873d06 Remove matrix_homeserver_sliding_sync_url
Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-05 20:32:12 +02:00
Suguru Hirahara
90129f75aa Remove sliding sync proxy
Reuse 2b7a0453eb

Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-05 20:32:12 +02:00
Suguru Hirahara
c8920885f9 Replace valkey_container_http_port
See: 36d4bd4548
Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
2026-02-05 11:12:27 +02:00
renovate[bot]
1f0e33e07a chore(deps): update dependency prometheus_postgres_exporter to v0.19.0-0 2026-02-05 06:36:55 +02:00
renovate[bot]
8f6ae1f734 chore(deps): update nginx docker tag to v1.29.5 2026-02-05 06:36:46 +02:00
renovate[bot]
2c0688334f chore(deps): update dependency jitsi to v10741 2026-02-04 21:02:05 +02:00
renovate[bot]
d548f7ba8c chore(deps): update docker.io/metio/matrix-alertmanager-receiver docker tag to v2026.2.4 2026-02-04 10:46:09 +02:00
Slavi Pantaleev
a7ddb189b5 Add missing license file for whoami_sync_worker_router.js.j2 2026-02-04 04:26:15 +02:00
Slavi Pantaleev
7d4536cf78 Upgrade baibot (v1.13.0 -> v1.14.0) and add built-in tools configuration support 2026-02-04 04:21:47 +02:00
Slavi Pantaleev
93f6264466 Add CHANGELOG entry for whoami-based sync worker routing 2026-02-04 04:06:59 +02:00
Slavi Pantaleev
45c855c853 Remove old map-based user identifier extraction for sync workers
The whoami-based approach is now the only implementation for sync worker routing.
It works with all token types (native Synapse, MAS, etc.) and is automatically
enabled when sync workers exist.

The old map-based approach only worked with native Synapse tokens (syt_<b64>_...)
and would give poor results with MAS or other auth systems.
2026-02-04 04:06:59 +02:00
Slavi Pantaleev
5cc69ca7eb Add whoami-based sync worker routing for user-level sticky sessions
This adds a new routing mechanism for sync workers that resolves access tokens
to usernames via Synapse's whoami endpoint, enabling true user-level sticky
routing regardless of which device or token is used.

Previously, sticky routing relied on parsing the username from native Synapse
tokens (`syt_<base64 username>_...`), which only works with native Synapse auth
and provides device-level stickiness at best. This new approach works with any
auth system (native Synapse, MAS, etc.) because Synapse handles token validation
internally.

Implementation uses nginx's auth_request module with an njs script because:
- The whoami lookup requires an async HTTP subrequest (ngx.fetch)
- js_set handlers must return synchronously and don't support async operations
- auth_request allows the async lookup to complete, then captures the result
  via response headers into nginx variables

The njs script:
- Extracts access tokens from Authorization header or query parameter
- Calls Synapse's whoami endpoint to resolve token -> username
- Caches results in a shared memory zone to minimize latency
- Returns the username via a `X-User-Identifier` header

The username is then used by nginx's upstream hash directive for consistent
worker selection. This leverages nginx's built-in health checking and failover.
2026-02-04 04:06:59 +02:00
Aine
81f815d19b fix uid/gid vars for Synapse Admin 2026-02-03 21:40:11 +00:00
renovate[bot]
c63a0f984b chore(deps): update dependency valkey to v9.0.2-0 2026-02-03 22:53:35 +02:00
Aine
6c4b9bb3d7 Merge pull request #4886 from spantaleev/synapse-admin-etke53
Synapse Admin v0.11.1-etke53
2026-02-03 20:40:34 +00:00
Slavi Pantaleev
76e13f8200 Add native Sliding Sync (MSC3575) endpoint to worker routing
The /_matrix/client/unstable/org.matrix.simplified_msc3575/sync endpoint
can be handled by generic workers, but Synapse's workers.md documentation
doesn't mention it. The code confirms it's worker-compatible:

- SlidingSyncRestServlet is registered via sync.register_servlets:
  https://github.com/element-hq/synapse/blob/0dfcffab0f/synapse/rest/client/sync.py#L1128-L1131

- sync.register_servlets is NOT in the worker exclusion list:
  https://github.com/element-hq/synapse/blob/0dfcffab0f/synapse/rest/__init__.py#L180-L194

- GenericWorkerStore includes SlidingSyncStore:
  https://github.com/element-hq/synapse/blob/0dfcffab0f/synapse/app/generic_worker.py#L168

This adds the endpoint to both:
- matrix_synapse_workers_sync_worker_client_server_endpoints (for specialized sync workers with sticky routing)
- matrix_synapse_workers_generic_worker_endpoints (documenting generic worker capability)
2026-02-02 15:59:00 +02:00