Skip to content

Commit bd405c4

Browse files
authored
Add continuwuity support (#4267)
* continuwuity support * continuwuity support * use main instead of commit tag * fix docker image link * migration from conduwuit * fix yaml lint * backup directories and linter fixes * linter fixes
1 parent 6383b1b commit bd405c4

28 files changed

+2652
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ The homeserver is the backbone of your Matrix system. Choose one from the follow
5353
| [Synapse](https://github.com/element-hq/synapse) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network | [Link](docs/configuring-playbook-synapse.md) |
5454
| [Conduit](https://conduit.rs) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network. Conduit is a lightweight open-source server implementation of the Matrix Specification with a focus on easy setup and low system requirements | [Link](docs/configuring-playbook-conduit.md) |
5555
| [conduwuit](https://conduwuit.puppyirl.gay/) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network. conduwuit is a fork of Conduit. | [Link](docs/configuring-playbook-conduwuit.md) |
56+
| [continuwuity](https://continuwuity.org) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network. continuwuity is a continuation of conduwuit. | [Link](docs/configuring-playbook-continuwuity.md) |
5657
| [Dendrite](https://github.com/element-hq/dendrite) || 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. | [Link](docs/configuring-playbook-dendrite.md) |
5758

5859
### Clients
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2025 Slavi Pantaleev
3+
SPDX-FileCopyrightText: 2025 Suguru Hirahara
4+
5+
SPDX-License-Identifier: AGPL-3.0-or-later
6+
-->
7+
8+
# Configuring continuwuity (optional)
9+
10+
The playbook can install and configure the [continuwuity](https://continuwuity.org) Matrix server for you.
11+
12+
See the project's [documentation](https://continuwuity.org) to learn what it does and why it might be useful to you.
13+
14+
By default, the playbook installs [Synapse](https://github.com/element-hq/synapse) as it's the only full-featured Matrix server at the moment. If that's okay, you can skip this document.
15+
16+
💡 **Note**: continuwuity is a fork of [conduwuit](./configuring-playbook-conduwuit.md), which the playbook also supports.
17+
18+
> [!WARNING]
19+
> - **You can't switch an existing Matrix server's implementation** (e.g. Synapse -> continuwuity). Proceed below only if you're OK with losing data or you're dealing with a server on a new domain name, which hasn't participated in the Matrix federation yet.
20+
> - **Homeserver implementations other than Synapse may not be fully functional**. The playbook may also not assist you in an optimal way (like it does with Synapse). Make yourself familiar with the downsides before proceeding
21+
22+
## Adjusting the playbook configuration
23+
24+
To use continuwuity, you **generally** need to adjust the `matrix_homeserver_implementation: synapse` configuration on your `inventory/host_vars/matrix.example.com/vars.yml` file as below:
25+
26+
```yaml
27+
matrix_homeserver_implementation: continuwuity
28+
29+
# Registering users can only happen via the API,
30+
# so it makes sense to enable it, at least initially.
31+
matrix_continuwuity_config_allow_registration: true
32+
33+
# Generate a strong registration token to protect the registration endpoint from abuse.
34+
# You can create one with a command like `pwgen -s 64 1`.
35+
matrix_continuwuity_config_registration_token: ''
36+
```
37+
38+
### Extending the configuration
39+
40+
There are some additional things you may wish to configure about the server.
41+
42+
Take a look at:
43+
44+
- `roles/custom/matrix-continuwuity/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
45+
- `roles/custom/matrix-continuwuity/templates/continuwuity.toml.j2` for the server's default configuration
46+
47+
There are various Ansible variables that control settings in the `continuwuity.toml` file.
48+
49+
If a specific setting you'd like to change does not have a dedicated Ansible variable, you can either submit a PR to us to add it, or you can [override the setting using an environment variable](https://continuwuity.org/configuration#environment-variables) using `matrix_continuwuity_environment_variables_extension`. For example:
50+
51+
```yaml
52+
matrix_continuwuity_environment_variables_extension: |
53+
continuwuity_MAX_REQUEST_SIZE=50000000
54+
continuwuity_REQUEST_TIMEOUT=60
55+
```
56+
57+
## Creating the first user account
58+
59+
Unlike other homeserver implementations (like Synapse and Dendrite), continuwuity does not support creating users via the command line or via the playbook.
60+
61+
If you followed the instructions above (see [Adjusting the playbook configuration](#adjusting-the-playbook-configuration)), you should have registration enabled and protected by a registration token.
62+
63+
This should allow you to create the first user account via any client (like [Element Web](./configuring-playbook-client-element-web.md)) which supports creating users.
64+
65+
The **first user account that you create will be marked as an admin** and **will be automatically invited to an admin room**.
66+
67+
68+
## Configuring bridges / appservices
69+
70+
For other homeserver implementations (like Synapse and Dendrite), the playbook automatically registers appservices (for bridges, bots, etc.) with the homeserver.
71+
72+
For continuwuity, you will have to manually register appservices using the [`!admin appservices register` command](https://continuwuity.org/appservices.html#set-up-the-appservice---general-instructions) sent to the server bot account.
73+
74+
The server's bot account has a Matrix ID of `@conduit:example.com` (not `@continuwuity:example.com`!) due to continuwuity's historical legacy.
75+
Your first user account would already have been invited to an admin room with this bot.
76+
77+
Find the appservice file you'd like to register. This can be any `registration.yaml` file found in the `/matrix` directory, for example `/matrix/mautrix-signal/bridge/registration.yaml`.
78+
79+
Then, send its content to the existing admin room:
80+
81+
!admin appservices register
82+
83+
```
84+
as_token: <token>
85+
de.sorunome.msc2409.push_ephemeral: true
86+
hs_token: <token>
87+
id: signal
88+
namespaces:
89+
aliases:
90+
- exclusive: true
91+
regex: ^#signal_.+:example\.org$
92+
users:
93+
- exclusive: true
94+
regex: ^@signal_.+:example\.org$
95+
- exclusive: true
96+
regex: ^@signalbot:example\.org$
97+
rate_limited: false
98+
sender_localpart: _bot_signalbot
99+
url: http://matrix-mautrix-signal:29328
100+
```
101+
102+
## Migrating from conduwuit
103+
104+
Since continuwuity is a drop-in replacement for conduwuit, migration is possible. First, make sure that continuwuity is properly set up on your `vars.yml` and run the tag `just run-tags migrate-conduwuit`
105+
106+
## Troubleshooting
107+
108+
As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-continuwuity`.

docs/configuring-playbook.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ For a more custom setup, see the [Other configuration options](#other-configurat
5353

5454
- [Configuring conduwuit](configuring-playbook-conduwuit.md), if you've switched to the [conduwuit](https://conduwuit.puppyirl.gay/) homeserver implementation
5555

56+
- [Configuring continuwuity](configuring-playbook-continuwuity.md), if you've switched to the [continuwuity](https://continuwuity.org) homeserver implementation
57+
5658
- [Configuring Dendrite](configuring-playbook-dendrite.md), if you've switched to the [Dendrite](https://matrix-org.github.io/dendrite) homeserver implementation
5759

5860
- Server components:

docs/container-images.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ We try to stick to official images (provided by their respective projects) as mu
2828
| [Synapse](configuring-playbook-synapse.md) | [element-hq/synapse](https://ghcr.io/element-hq/synapse) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network |
2929
| [Conduit](configuring-playbook-conduit.md) | [matrixconduit/matrix-conduit](https://hub.docker.com/r/matrixconduit/matrix-conduit) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network. Conduit is a lightweight open-source server implementation of the Matrix Specification with a focus on easy setup and low system requirements |
3030
| [conduwuit](configuring-playbook-conduwuit.md) | [girlbossceo/conduwuit](https://ghcr.io/girlbossceo/conduwuit) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network. conduwuit is a fork of Conduit. |
31+
| [continuwuity](configuring-playbook-continuwuity.md) | [continuwuation/continuwuity](https://forgejo.ellis.link/continuwuation/continuwuity) || Storing your data and managing your presence in the [Matrix](http://matrix.org/) network. continuwuity is a continuation of conduwuit. |
3132
| [Dendrite](configuring-playbook-dendrite.md) | [matrixdotorg/dendrite-monolith](https://hub.docker.com/r/matrixdotorg/dendrite-monolith/) || 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. |
3233

3334
## Clients

docs/howto-srv-server-delegation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The up-to-date list can be accessed on [traefik's documentation](https://doc.tra
2626

2727
**Note**: the changes below instruct you how to do this for a basic Synapse installation. You will need to adapt the variable name and the content of the labels:
2828

29-
- if you're using another homeserver implementation (e.g. [Conduit](./configuring-playbook-conduit.md), [conduwuit](./configuring-playbook-conduwuit.md) or [Dendrite](./configuring-playbook-dendrite.md))
29+
- if you're using another homeserver implementation (e.g. [Conduit](./configuring-playbook-conduit.md), [conduwuit](./configuring-playbook-conduwuit.md), [continuwuity](./configuring-playbook-continuwuity.md) or [Dendrite](./configuring-playbook-dendrite.md))
3030
- if you're using [Synapse with workers enabled](./configuring-playbook-synapse.md#load-balancing-with-workers) (`matrix_synapse_workers_enabled: true`). In that case, it's actually the `matrix-synapse-reverse-proxy-companion` service which has Traefik labels attached
3131

3232
Also, all instructions below are from an older version of the playbook and may not work anymore.

group_vars/matrix_servers

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ matrix_addons_homeserver_client_api_url: "{{ ('http://' + matrix_playbook_revers
243243
matrix_addons_homeserver_systemd_services_list: "{{ ([traefik_identifier + '.service'] if matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' else []) if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else matrix_homeserver_systemd_services_list }}"
244244

245245
# Starting from version `0.6.0` Conduit natively supports some sync v3 (sliding-sync) features.
246-
matrix_homeserver_sliding_sync_url: "{{ matrix_sliding_sync_base_url if matrix_sliding_sync_enabled else (matrix_homeserver_url if matrix_homeserver_implementation in ['conduit', 'conduwuit'] else '') }}"
246+
matrix_homeserver_sliding_sync_url: "{{ matrix_sliding_sync_base_url if matrix_sliding_sync_enabled else (matrix_homeserver_url if matrix_homeserver_implementation in ['conduit', 'conduwuit', 'continuwuity'] else '') }}"
247247

248248
########################################################################
249249
# #
@@ -567,6 +567,7 @@ matrix_homeserver_container_client_api_endpoint: |-
567567
'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
568568
'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
569569
'conduwuit': ('matrix-conduwuit:' + matrix_conduwuit_config_port_number | default('8008') | string),
570+
'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
570571
}[matrix_homeserver_implementation]
571572
}}
572573

@@ -577,6 +578,7 @@ matrix_homeserver_container_federation_api_endpoint: |-
577578
'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
578579
'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
579580
'conduwuit': ('matrix-conduwuit:' + matrix_conduwuit_config_port_number | default('8008') | string),
581+
'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
580582
}[matrix_homeserver_implementation]
581583
}}
582584

@@ -5640,6 +5642,7 @@ grafana_default_home_dashboard_path: |-
56405642
'dendrite': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
56415643
'conduit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
56425644
'conduwuit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
5645+
'continuwuity': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
56435646
}[matrix_homeserver_implementation]
56445647
}}
56455648

@@ -5700,6 +5703,7 @@ matrix_registration_shared_secret: |-
57005703
'dendrite': matrix_dendrite_client_api_registration_shared_secret | default (''),
57015704
'conduit': '',
57025705
'conduwuit': '',
5706+
'continuwuity': '',
57035707
}[matrix_homeserver_implementation]
57045708
}}
57055709

@@ -5977,6 +5981,58 @@ matrix_conduwuit_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabl
59775981
######################################################################
59785982

59795983

5984+
######################################################################
5985+
#
5986+
# matrix-continuwuity
5987+
#
5988+
######################################################################
5989+
5990+
matrix_continuwuity_enabled: "{{ matrix_homeserver_implementation == 'continuwuity' }}"
5991+
5992+
matrix_continuwuity_hostname: "{{ matrix_server_fqn_matrix }}"
5993+
5994+
matrix_continuwuity_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
5995+
5996+
matrix_continuwuity_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_continuwuity_docker_image_registry_prefix_upstream_default }}"
5997+
5998+
matrix_continuwuity_container_network: "{{ matrix_homeserver_container_network }}"
5999+
6000+
matrix_continuwuity_container_additional_networks_auto: |
6001+
{{
6002+
(
6003+
([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_continuwuity_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
6004+
) | unique
6005+
}}
6006+
6007+
matrix_continuwuity_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
6008+
matrix_continuwuity_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
6009+
matrix_continuwuity_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
6010+
matrix_continuwuity_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
6011+
6012+
matrix_continuwuity_container_labels_public_client_root_redirection_enabled: "{{ matrix_continuwuity_container_labels_public_client_root_redirection_url != '' }}"
6013+
matrix_continuwuity_container_labels_public_client_root_redirection_url: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element) if matrix_client_element_enabled else '' }}"
6014+
6015+
matrix_continuwuity_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
6016+
matrix_continuwuity_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
6017+
matrix_continuwuity_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
6018+
6019+
matrix_continuwuity_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
6020+
matrix_continuwuity_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
6021+
6022+
matrix_continuwuity_config_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
6023+
matrix_continuwuity_config_turn_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
6024+
matrix_continuwuity_config_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
6025+
matrix_continuwuity_config_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
6026+
6027+
matrix_continuwuity_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
6028+
6029+
######################################################################
6030+
#
6031+
# /matrix-continuwuity
6032+
#
6033+
######################################################################
6034+
6035+
59806036
######################################################################
59816037
#
59826038
# matrix-user-creator

0 commit comments

Comments
 (0)