Skip to content

Commit ee0c432

Browse files
Merge 'master' into add-docker-userns-support
2 parents aae6b8e + e02dd74 commit ee0c432

File tree

20 files changed

+299
-45
lines changed

20 files changed

+299
-45
lines changed

.github/renovate.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
4-
"config:base"
4+
"config:recommended"
55
],
6-
"labels": ["dependencies"],
7-
"regexManagers": [
6+
"labels": [
7+
"dependencies"
8+
],
9+
"customManagers": [
810
{
9-
"fileMatch": ["defaults/main.yml$"],
11+
"customType": "regex",
12+
"fileMatch": [
13+
"defaults/main.yml$"
14+
],
1015
"matchStrings": [
1116
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?(?:_version|_tag)\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
1217
]
1318
}
1419
],
1520
"packageRules": [
1621
{
17-
"matchSourceUrlPrefixes": [
18-
"https://github.com/devture/com.devture.ansible.role",
19-
"https://github.com/mother-of-all-self-hosting"
20-
],
21-
"ignoreUnstable": false
22+
"ignoreUnstable": false,
23+
"matchSourceUrls": [
24+
"https://github.com/devture/com.devture.ansible.role{/,}**",
25+
"https://github.com/mother-of-all-self-hosting{/,}**"
26+
]
2227
}
2328
],
2429
"ignoreDeps": [

.github/workflows/lock-threads.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SPDX-FileCopyrightText: 2017 - 2023 Armin Sebastian
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
---
6+
name: 'Lock Threads'
7+
on: # yamllint disable-line rule:truthy
8+
# Use this to do a dry run from a pull request
9+
# pull_request:
10+
schedule:
11+
- cron: '0 * * * *'
12+
workflow_dispatch:
13+
14+
permissions:
15+
issues: write
16+
pull-requests: write
17+
18+
concurrency:
19+
group: lock-threads
20+
21+
jobs:
22+
action:
23+
if: github.repository == 'spantaleev/matrix-docker-ansible-deploy'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: dessant/lock-threads@v5
27+
with:
28+
add-issue-labels: 'outdated'
29+
process-only: 'issues, prs'

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
# 2025-04-09
2+
3+
## Element Call frontend installation is now optional
4+
5+
Because all Element clients (Element Web and Element X mobile) now embed and use their own Element Call frontend application (and not the one hosted via the playbook), it makes little sense for the playbook to self-host the Element Call frontend for you. Setting up the frontend requires an additional hostname (DNS setup) and it won't be used by Element clients anyway, so **we now recommend not installing the Element Call frontend**.
6+
7+
💡 A reason you may wish to continue installing the Element Call frontend (despite Matrix clients not making use of it), is if you need to use it standalone - directly via a browser (without a Matrix client).
8+
9+
The playbook now lets you [Decide between Element Call vs just the Matrix RTC stack](./docs/configuring-playbook-element-call.md#decide-between-element-call-vs-just-the-matrix-rtc-stack).
10+
11+
If you've already installed Element Call (via `matrix_element_call_enabled: true`), you can switch to installing just the [Matrix RTC (Real-Time Communication) stack](./docs/configuring-playbook-matrix-rtc.md) (all supporting services **without the Element Call frontend**) by:
12+
13+
1. Adjusting your `vars.yml` configuration like this:
14+
15+
```diff
16+
-matrix_element_call_enabled: true
17+
+matrix_rtc_enabled: true
18+
```
19+
20+
2. [Re-running the playbook](./docs/installing.md) with the `setup-all` Ansible tag (e.g. `just setup-all`)
21+
22+
3. Getting rid of the `call.element.example.com` DNS record
23+
24+
125
# 2025-03-15
226

327
## Element Call support

LICENSES/MIT.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
MIT License
2+
3+
Copyright (c) <year> <copyright holders>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6+
associated documentation files (the "Software"), to deal in the Software without restriction, including
7+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9+
following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all copies or substantial
12+
portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18+
USE OR OTHER DEALINGS IN THE SOFTWARE.

docs/configuring-playbook-element-call.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
77

88
# Setting up Element Call (optional)
99

10-
The playbook can install and configure [Element Call](https://github.com/element-hq/element-call) for you.
10+
The playbook can install and configure [Element Call](https://github.com/element-hq/element-call) and its supporting components that are part of the [Matrix RTC stack](configuring-playbook-matrix-rtc.md).
1111

1212
Element Call is a native Matrix video conferencing application developed by [Element](https://element.io), designed for secure, scalable, privacy-respecting, and decentralized video and voice calls over the Matrix protocol. Built on MatrixRTC ([MSC4143](https://github.com/matrix-org/matrix-spec-proposals/pull/4143)), it utilizes [MSC4195](https://github.com/hughns/matrix-spec-proposals/blob/hughns/matrixrtc-livekit/proposals/4195-matrixrtc-livekit.md) with [LiveKit Server](configuring-playbook-livekit-server.md) as its backend.
1313

@@ -16,18 +16,34 @@ See the project's [documentation](https://github.com/element-hq/element-call) to
1616
## Prerequisites
1717

1818
- A [Synapse](configuring-playbook-synapse.md) homeserver (see the warning below)
19-
- [Federation](configuring-playbook-federation.md) being enabled for your Matrix homeserver (federation is enabled by default, unless you've explicitly disabled it), because [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md) currently [requires it](https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3562#issuecomment-2725250554) ([relevant source code](https://github.com/element-hq/lk-jwt-service/blob/f5f5374c4bdcc00a4fb13d27c0b28e20e4c62334/main.go#L135-L146))
20-
- Various experimental features for the Synapse homeserver which Element Call [requires](https://github.com/element-hq/element-call/blob/93ae2aed9841e0b066d515c56bd4c122d2b591b2/docs/self-hosting.md#a-matrix-homeserver) (automatically done when Element Call is enabled)
21-
- A [LiveKit Server](configuring-playbook-livekit-server.md) (automatically installed when Element Call is enabled)
22-
- The [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md) (automatically installed when Element Call is enabled)
19+
- The [Matrix RTC (Real-Time Communication) stack](configuring-playbook-matrix-rtc.md) (automatically done when Element Call is enabled)
2320
- A client compatible with Element Call. As of 2025-03-15, that's just [Element Web](configuring-playbook-client-element-web.md) and the Element X mobile clients (iOS and Android).
21+
- (Optional) Guest accounts being enabled for your Matrix server, if you'd like guests to be able to use Element Call. See [Allowing guests to use Element Call](#allowing-guests-to-use-element-call-optional)
2422

2523
> [!WARNING]
2624
> Because Element Call [requires](https://github.com/element-hq/element-call/blob/93ae2aed9841e0b066d515c56bd4c122d2b591b2/docs/self-hosting.md#a-matrix-homeserver) a few experimental features in the Matrix protocol, it's **very likely that it only works with the Synapse homeserver**.
2725
26+
## Decide between Element Call vs just the Matrix RTC stack
27+
28+
All clients that can currently use Element Call (Element Web and Element X on mobile) already embed the Element Call frontend within them.
29+
These **clients will use their own embedded Element Call frontend**, so **self-hosting the Element Call frontend by the playbook is largely unnecessary**.
30+
31+
💡 A reason you may wish to continue installing the Element Call frontend (despite Matrix clients not making use of it), is if you need to use it standalone - directly via a browser (without a Matrix client). Note that unless you [allow guest accounts to use Element Call](#allowing-guests-to-use-element-call-optional), you will still need a Matrix user account **on the same homeserver** to be able to use Element Call.
32+
33+
The playbook makes a distiction between enabling Element Call (`matrix_element_call_enabled`) and enabling the Matrix RTC Stack (`matrix_rtc_enabled`). Enabling Element Call automatically enables the Matrix RTC stack. Because installing the Element Call frontend is now unnecessary, **we recommend only installing the Matrix RTC stack, without the Element Call frontend**.
34+
35+
| Description / Variable | Element Call frontend | [LiveKit Server](configuring-playbook-livekit-server.md) | [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md) |
36+
|------------------------|-----------------------|----------------|---------------------|
37+
| Description | Static website that provides the Element Call UI (but often embedded by clients) | Scalable, multi-user conferencing solution based on WebRTC | A helper component that allows Element Call to integrate with LiveKit Server |
38+
| Required for Element Call to function | No | Yes | Yes |
39+
| `matrix_element_call_enabled` | ✅ Installed | ✅ Installed | ✅ Installed |
40+
| `matrix_rtc_enabled` | ❌ Not Installed, but usually unnecessary | ✅ Installed | ✅ Installed |
41+
42+
All documentation below assumes that you've decided to install Element Call and not just the Matrix RTC stack.
43+
2844
## Decide on a domain and path
2945

30-
By default, Element Call is configured to be served on the `call.element.example.com` domain.
46+
By default, the Element Call frontend is configured to be served on the `call.element.example.com` domain.
3147

3248
If you'd like to run Element Call on another hostname, see the [Adjusting the Element Call URL](#adjusting-the-element-call-url-optional) section below.
3349

@@ -48,6 +64,8 @@ In addition to the HTTP/HTTPS ports (which you've already exposed as per the [pr
4864
Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
4965

5066
```yaml
67+
# Enable the Element Call frontend UI to allow standalone use of Element Call.
68+
# Enabling this also auto-enables the Matrix RTC stack.
5169
matrix_element_call_enabled: true
5270
```
5371
@@ -64,6 +82,28 @@ matrix_element_call_hostname: element-call.example.com
6482
> [!WARNING]
6583
> A `matrix_element_call_path_prefix` variable is also available and mean to let you configure a path prefix for the Element Call service, but [Element Call does not support running under a sub-path yet](https://github.com/element-hq/element-call/issues/3084).
6684

85+
### Allowing guests to use Element Call (optional)
86+
87+
By default, Element Call can only be used by people having accounts on your Matrix server.
88+
89+
If you'd like guests to be able to use Element Call as well, you need to enable guest accounts support for your homeserver.
90+
91+
> [!WARNING]
92+
> Enabling guest accounts means that your homeserver's user database may get polluted with guest account signups (potentially made by bots).
93+
> Guest accounts should be limited in what (damage) they can do to your server and the rest of the Matrix ecosystem, but it's better to not enable them unless necessary.
94+
95+
For [Synapse](configuring-playbook-synapse.md) (the default homeserver implementation), the configuration is like this:
96+
97+
```yml
98+
matrix_synapse_allow_guest_access: true
99+
```
100+
101+
For [Dendrite](configuring-playbook-dendrite.md), the configuration is like this:
102+
103+
```yml
104+
matrix_dendrite_guests_disabled: false
105+
```
106+
67107
## Installing
68108

69109
After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records) and [adjusting firewall rules](#adjusting-firewall-rules), run the playbook with [playbook tags](playbook-tags.md) as below:

docs/configuring-playbook-livekit-jwt-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later
88

99
The playbook can install and configure [LiveKit JWT Service](https://github.com/element-hq/lk-jwt-service/) for you.
1010

11-
This is a helper component that allows [Element Call](configuring-playbook-element-call.md) to integrate with [LiveKit Server](configuring-playbook-livekit-server.md).
11+
This is a helper component which is part of the [Matrix RTC stack](configuring-playbook-matrix-rtc.md) that allows [Element Call](configuring-playbook-element-call.md) to integrate with [LiveKit Server](configuring-playbook-livekit-server.md).
1212

13-
💡 LiveKit JWT Service is automatically installed and configured when [Element Call](configuring-playbook-element-call.md) is enabled, so you don't need to do anything extra.
13+
💡 LiveKit JWT Service is automatically installed and configured when either [Element Call](configuring-playbook-element-call.md) or the [Matrix RTC stack](configuring-playbook-matrix-rtc.md) is enabled, so you don't need to do anything extra.
1414

1515
Take a look at:
1616

docs/configuring-playbook-livekit-server.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The playbook can install and configure [LiveKit Server](https://github.com/livek
1111

1212
LiveKit Server is an open source project that provides scalable, multi-user conferencing based on WebRTC. It's designed to provide everything you need to build real-time video audio data capabilities in your applications.
1313

14-
💡 LiveKit Server is automatically installed and configured when [Element Call](configuring-playbook-element-call.md) is enabled, so you don't need to do anything extra.
14+
💡 LiveKit Server is automatically installed and configured when either [Element Call](configuring-playbook-element-call.md) or the [Matrix RTC stack](configuring-playbook-matrix-rtc.md) is enabled, so you don't need to do anything extra.
1515

1616
The [Ansible role for LiveKit Server](https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server) is developed and maintained by [the MASH (mother-of-all-self-hosting) project](https://github.com/mother-of-all-self-hosting). For details about configuring LiveKit Server, you can check them via:
1717
- 🌐 [the role's documentation at the MASH project](https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server/blob/main/docs/configuring-livekit-server.md) online
@@ -25,4 +25,14 @@ To ensure LiveKit Server functions correctly, the following firewall rules and p
2525

2626
- `7882/udp`: ICE/UDP Mux
2727

28+
- `3479/udp`: TURN/UDP. Also see the [Limitations](#limitations) section below.
29+
30+
- `5350/tcp`: TURN/TCP. Also see the [Limitations](#limitations) section below.
31+
2832
💡 The suggestions above are inspired by the upstream [Ports and Firewall](https://docs.livekit.io/home/self-hosting/ports-firewall/) documentation based on how LiveKit is configured in the playbook. If you've using custom configuration for the LiveKit Server role, you may need to adjust the firewall rules accordingly.
33+
34+
## Limitations
35+
36+
For some reason, LiveKit Server's TURN ports (`3479/udp` and `5350/tcp`) are not reachable over IPv6 regardless of whether you've [enabled IPv6](./configuring-ipv6.md) for your server.
37+
38+
It seems like LiveKit Server intentionally only listens on `udp4` and `tcp4` as seen [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L128) and [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L92).
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2024 wjbeckett
3+
SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
4+
5+
SPDX-License-Identifier: AGPL-3.0-or-later
6+
-->
7+
8+
# Setting up the Matrix RTC stack (optional)
9+
10+
The playbook can install and configure the Matrix RTC (Real-Time Communication) stack.
11+
12+
The Matrix RTC stack is a set of supporting components ([LiveKit Server](configuring-playbook-livekit-server.md) and [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md)) that allow the new [Element Call](configuring-playbook-element-call.md) audio/video calls to function.
13+
14+
💡 If you only plan on doing audio/video calls via Matrix client (which typically embed the Element Call frontend UI within them), you only need to install the Matrix RTC stack and don't necessarily need to install [Element Call](configuring-playbook-element-call.md). See the [Decide between Element Call vs just the Matrix RTC stack](configuring-playbook-element-call.md#decide-between-element-call-vs-just-the-matrix-rtc-stack) section of the [Element Call documentation](configuring-playbook-element-call.md) for more details.
15+
16+
## Prerequisites
17+
18+
- A [Synapse](configuring-playbook-synapse.md) homeserver (see the warning below)
19+
- [Federation](configuring-playbook-federation.md) being enabled for your Matrix homeserver (federation is enabled by default, unless you've explicitly disabled it), because [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md) currently [requires it](https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3562#issuecomment-2725250554) ([relevant source code](https://github.com/element-hq/lk-jwt-service/blob/f5f5374c4bdcc00a4fb13d27c0b28e20e4c62334/main.go#L135-L146))
20+
- Various experimental features for the Synapse homeserver which Element Call [requires](https://github.com/element-hq/element-call/blob/93ae2aed9841e0b066d515c56bd4c122d2b591b2/docs/self-hosting.md#a-matrix-homeserver) (automatically done when Element Call is enabled)
21+
- A [LiveKit Server](configuring-playbook-livekit-server.md) (automatically installed when [Element Call or the Matrix RTC stack is enabled](#decide-between-element-call-vs-just-the-matrix-rtc-stack))
22+
- The [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md) (automatically installed when [Element Call or the Matrix RTC stack is enabled](#decide-between-element-call-vs-just-the-matrix-rtc-stack))
23+
- A client compatible with Element Call. As of 2025-03-15, that's just [Element Web](configuring-playbook-client-element-web.md) and the Element X mobile clients (iOS and Android).
24+
25+
> [!WARNING]
26+
> Because Element Call [requires](https://github.com/element-hq/element-call/blob/93ae2aed9841e0b066d515c56bd4c122d2b591b2/docs/self-hosting.md#a-matrix-homeserver) a few experimental features in the Matrix protocol, it's **very likely that it only works with the Synapse homeserver**.
27+
28+
## Adjusting the playbook configuration
29+
30+
Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
31+
32+
```yaml
33+
# Enable the Matrix RTC stack.
34+
# This provides all supporting services for Element Call, without the Element Call frontend.
35+
matrix_rtc_enabled: true
36+
```
37+
38+
## Adjusting firewall rules
39+
40+
In addition to the HTTP/HTTPS ports (which you've already exposed as per the [prerequisites](prerequisites.md) document), you'll also need to open ports required by [LiveKit Server](configuring-playbook-livekit-server.md) as described in its own [Adjusting firewall rules](configuring-playbook-livekit-server.md#adjusting-firewall-rules) section.
41+
42+
## Installing
43+
44+
After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records) and [adjusting firewall rules](#adjusting-firewall-rules), run the playbook with [playbook tags](playbook-tags.md) as below:
45+
46+
<!-- NOTE: let this conservative command run (instead of install-all) to make it clear that failure of the command means something is clearly broken. -->
47+
```sh
48+
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
49+
```
50+
51+
The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`
52+
53+
`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too.
54+
55+
## Usage
56+
57+
Once installed, Matrix clients which support Element Call (like [Element Web](configuring-playbook-client-element-web.md) and Element X on mobile (iOS and Android)) will automatically use the Matrix RTC stack.
58+
59+
These clients typically embed the Element Call frontend UI within them, so installing [Element Call](configuring-playbook-element-call.md) is only necessary if you'd like to use it standalone - directly via a browser.

0 commit comments

Comments
 (0)