https://github.com/Virkkunen and I have been working on the same feature simultaneously. This patch adds my additional independent work on top of his changes. Notable changes here compared to Virkkunen's original work: - renaming config-related variables (`matrix_conduwuit_*` -> `matrix_conduwuit_config_*`). This is consistent with other roles (and better), but deviates from how the Conduit role was implemented. - using a full configuration sample from https://conduwuit.puppyirl.gay/configuration.html instead of using the old Conduit config file template - introducing configurability for more Conduwuit config settings, to support easy registration, etc. - removing configuration settings that Conduwuit does not support anymore (e.g. `max_concurrent_requests`) - cross-linking docs pages for Conduit and Conduwuit - a Conduwuit docs page which is much improved compared to the old Conduit one - REAMDE updates
4.7 KiB
Configuring Conduwuit (optional)
The playbook can install and configure the Conduwuit Matrix server for you.
See the project's documentation to learn what it does and why it might be useful to you.
By default, the playbook installs Synapse as it's the only full-featured Matrix server at the moment. If that's okay, you can skip this document.
💡 Note: Conduwuit is a fork of Conduit, which the playbook also supports. See Differences from upstream Conduit.
⚠️ Warnings:
-
You can't switch an existing Matrix server's implementation (e.g. Synapse -> Conduwuit). 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.
-
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
Adjusting the playbook configuration
To use Conduwuit, you generally need to adjust the matrix_homeserver_implementation: synapse
configuration on your inventory/host_vars/matrix.example.com/vars.yml
file as below:
matrix_homeserver_implementation: conduwuit
# Registering users can only happen via the API,
# so it makes sense to enable it, at least initially.
matrix_conduwuit_config_allow_registration: true
# Generate a strong registration token to protect the registration endpoint from abuse.
# You can create one with a command like `pwgen -s 64 1`.
matrix_conduwuit_config_registration_token: ''
Extending the configuration
There are some additional things you may wish to configure about the server.
Take a look at:
roles/custom/matrix-conduwuit/defaults/main.yml
for some variables that you can customize via yourvars.yml
fileroles/custom/matrix-conduwuit/templates/conduwuit.toml.j2
for the server's default configuration
There are various Ansible variables that control settings in the conduwuit.toml
file.
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 using matrix_conduwuit_environment_variables_extension
. For example:
matrix_conduwuit_environment_variables_extension: |
CONDUWUIT_MAX_REQUEST_SIZE=50000000
CONDUWUIT_REQUEST_TIMEOUT=60
Creating the first user account
Unlike other homeserver implementations (like Synapse and Dendrite), Conduwuit does not support creating users via the command line or via the playbook.
If you followed the instructions above (see Adjusting the playbook configuration), you should have registration enabled and protected by a registration token.
This should allow you to create the first user account via any client (like Element Web) which supports creating users.
The first user account that you create will be marked as an admin and will be automatically invited to an admin room.
Configuring bridges / appservices
For other homeserver implementations (like Synapse and Dendrite), the playbook automatically registers appservices (for bridges, bots, etc.) with the homeserver.
For Conduwuit, you will have to manually register appservices using the !admin appservices register
command sent to the server bot account.
The server's bot account has a Matrix ID of @conduit:example.com
(not @conduwuit:example.com
!) due to Conduwuit's historical legacy.
Your first user account would already have been invited to an admin room with this bot.
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
.
Then, send its content to the existing admin room:
!admin appservices register
```
as_token: <token>
de.sorunome.msc2409.push_ephemeral: true
hs_token: <token>
id: signal
namespaces:
aliases:
- exclusive: true
regex: ^#signal_.+:example\.org$
users:
- exclusive: true
regex: ^@signal_.+:example\.org$
- exclusive: true
regex: ^@signalbot:example\.org$
rate_limited: false
sender_localpart: _bot_signalbot
url: http://matrix-mautrix-signal:29328
```