Switch to exported Jitsi role
This commit is contained in:
@ -9,12 +9,12 @@ The setup done by the playbook is very similar to [docker-jitsi-meet](https://gi
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before installing Jitsi, make sure you've created the `jitsi.DOMAIN` DNS record. See [Configuring DNS](configuring-dns.md).
|
||||
Before installing Jitsi, make sure you've created the `jitsi.DOMAIN` DNS record (unless you've changed `jitsi_hostname`, as described below). See [Configuring DNS](configuring-dns.md) for details about DNS changes.
|
||||
|
||||
You may also need to open the following ports to your server:
|
||||
|
||||
- `4443/tcp` - RTP media fallback over TCP
|
||||
- `10000/udp` - RTP media over UDP. Depending on your firewall/NAT setup, incoming RTP packets on port `10000` may have the external IP of your firewall as destination address, due to the usage of STUN in JVB (see [`matrix_jitsi_jvb_stun_servers`](../roles/custom/matrix-jitsi/defaults/main.yml)).
|
||||
- `10000/udp` - RTP media over UDP. Depending on your firewall/NAT setup, incoming RTP packets on port `10000` may have the external IP of your firewall as destination address, due to the usage of STUN in JVB (see [`jitsi_jvb_stun_servers`](https://github.com/mother-of-all-self-hosting/ansible-role-jitsi/blob/main/defaults/main.yml)).
|
||||
|
||||
|
||||
## Installation
|
||||
@ -22,9 +22,14 @@ You may also need to open the following ports to your server:
|
||||
Add this to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_enabled: true
|
||||
```
|
||||
jitsi_enabled: true
|
||||
|
||||
# Uncomment and adjust if you need to use another hostname
|
||||
# jitsi_hostname: "jitsi.{{ matrix_domain }}"
|
||||
|
||||
# Uncomment and possible adjust if you'd like to host under a subpath
|
||||
# jitsi_path_prefix: /jitsi
|
||||
```
|
||||
|
||||
## (Optional) Configure Jitsi authentication and guests mode
|
||||
|
||||
@ -37,19 +42,19 @@ Currently, there are three supported authentication modes: 'internal' (default),
|
||||
|
||||
**Note:** Authentication is not tested via the playbook's self-checks.
|
||||
We therefore recommend that you manually verify if authentication is required by jitsi.
|
||||
For this, try to manually create a conference on jitsi.DOMAIN in your browser.
|
||||
For this, try to manually create a conference on jitsi.DOMAIN in your browser.
|
||||
|
||||
### Authenticate using Jitsi accounts (Auth-Type 'internal')
|
||||
The default authentication mechanism is 'internal' auth, which requires jitsi-accounts to be setup and is the recommended setup, as it also works in federated rooms.
|
||||
The default authentication mechanism is 'internal' auth, which requires jitsi-accounts to be setup and is the recommended setup, as it also works in federated rooms.
|
||||
With authentication enabled, all meeting rooms have to be opened by a registered user, after which guests are free to join.
|
||||
If a registered host is not yet present, guests are put on hold in individual waiting rooms.
|
||||
|
||||
Add these lines to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_enable_auth: true
|
||||
matrix_jitsi_enable_guests: true
|
||||
matrix_jitsi_prosody_auth_internal_accounts:
|
||||
jitsi_enable_auth: true
|
||||
jitsi_enable_guests: true
|
||||
jitsi_prosody_auth_internal_accounts:
|
||||
- username: "jitsi-moderator"
|
||||
password: "secret-password"
|
||||
- username: "another-user"
|
||||
@ -62,7 +67,7 @@ matrix_jitsi_prosody_auth_internal_accounts:
|
||||
|
||||
### Authenticate using Matrix OpenID (Auth-Type 'matrix')
|
||||
|
||||
**Attention: Probably breaks jitsi in federated rooms and does not allow sharing conference links with guests.**
|
||||
**Attention: Probably breaks Jitsi in federated rooms and does not allow sharing conference links with guests.**
|
||||
|
||||
Using this authentication type require a [Matrix User Verification Service](https://github.com/matrix-org/matrix-user-verification-service).
|
||||
By default, this playbook creates and configures a user-verification-service to run locally, see [configuring-user-verification-service](configuring-playbook-user-verification-service.md).
|
||||
@ -70,8 +75,8 @@ By default, this playbook creates and configures a user-verification-service to
|
||||
To enable set this configuration at host level:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_enable_auth: true
|
||||
matrix_jitsi_auth_type: "matrix"
|
||||
jitsi_enable_auth: true
|
||||
jitsi_auth_type: matrix
|
||||
matrix_user_verification_service_enabled: true
|
||||
```
|
||||
|
||||
@ -82,21 +87,21 @@ For more information see also [https://github.com/matrix-org/prosody-mod-auth-ma
|
||||
An example LDAP configuration could be:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_enable_auth: true
|
||||
matrix_jitsi_auth_type: ldap
|
||||
matrix_jitsi_ldap_url: "ldap://ldap.DOMAIN"
|
||||
matrix_jitsi_ldap_base: "OU=People,DC=DOMAIN"
|
||||
#matrix_jitsi_ldap_binddn: ""
|
||||
#matrix_jitsi_ldap_bindpw: ""
|
||||
matrix_jitsi_ldap_filter: "uid=%u"
|
||||
matrix_jitsi_ldap_auth_method: "bind"
|
||||
matrix_jitsi_ldap_version: "3"
|
||||
matrix_jitsi_ldap_use_tls: true
|
||||
matrix_jitsi_ldap_tls_ciphers: ""
|
||||
matrix_jitsi_ldap_tls_check_peer: true
|
||||
matrix_jitsi_ldap_tls_cacert_file: "/etc/ssl/certs/ca-certificates.crt"
|
||||
matrix_jitsi_ldap_tls_cacert_dir: "/etc/ssl/certs"
|
||||
matrix_jitsi_ldap_start_tls: false
|
||||
jitsi_enable_auth: true
|
||||
jitsi_auth_type: ldap
|
||||
jitsi_ldap_url: "ldap://ldap.DOMAIN"
|
||||
jitsi_ldap_base: "OU=People,DC=DOMAIN"
|
||||
#jitsi_ldap_binddn: ""
|
||||
#jitsi_ldap_bindpw: ""
|
||||
jitsi_ldap_filter: "uid=%u"
|
||||
jitsi_ldap_auth_method: "bind"
|
||||
jitsi_ldap_version: "3"
|
||||
jitsi_ldap_use_tls: true
|
||||
jitsi_ldap_tls_ciphers: ""
|
||||
jitsi_ldap_tls_check_peer: true
|
||||
jitsi_ldap_tls_cacert_file: "/etc/ssl/certs/ca-certificates.crt"
|
||||
jitsi_ldap_tls_cacert_dir: "/etc/ssl/certs"
|
||||
jitsi_ldap_start_tls: false
|
||||
```
|
||||
|
||||
For more information refer to the [docker-jitsi-meet](https://github.com/jitsi/docker-jitsi-meet#authentication-using-ldap) and the [saslauthd `LDAP_SASLAUTHD`](https://github.com/winlibs/cyrus-sasl/blob/master/saslauthd/LDAP_SASLAUTHD) documentation.
|
||||
@ -113,7 +118,7 @@ Here is how to do it in the playbook.
|
||||
Add these two lines to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_jvb_container_extra_arguments:
|
||||
jitsi_jvb_container_extra_arguments:
|
||||
- '--env "JVB_ADVERTISE_IPS=<Local IP address of the host>"'
|
||||
```
|
||||
|
||||
@ -122,7 +127,7 @@ matrix_jitsi_jvb_container_extra_arguments:
|
||||
Sample **additional** `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration to save up resources (explained below):
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_web_custom_config_extension: |
|
||||
jitsi_web_custom_config_extension: |
|
||||
config.enableLayerSuspension = true;
|
||||
|
||||
config.disableAudioLevels = true;
|
||||
@ -130,13 +135,12 @@ matrix_jitsi_web_custom_config_extension: |
|
||||
// Limit the number of video feeds forwarded to each client
|
||||
config.channelLastN = 4;
|
||||
|
||||
matrix_jitsi_web_config_resolution_width_ideal_and_max: 480
|
||||
matrix_jitsi_web_config_resolution_height_ideal_and_max: 240
|
||||
jitsi_web_config_resolution_width_ideal_and_max: 480
|
||||
jitsi_web_config_resolution_height_ideal_and_max: 240
|
||||
```
|
||||
|
||||
You may want to **suspend unused video layers** until they are requested again, to save up resources on both server and clients.
|
||||
Read more on this feature [here](https://jitsi.org/blog/new-off-stage-layer-suppression-feature/)
|
||||
For this add this line to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration:
|
||||
|
||||
You may wish to **disable audio levels** to avoid excessive refresh of the client-side page and decrease the CPU consumption involved.
|
||||
|
||||
@ -150,10 +154,10 @@ You may want to **limit the maximum video resolution**, to save up resources on
|
||||
|
||||
The playbook allows a user to set a max number of participants allowed to join a Jitsi conference. By default there is no limit.
|
||||
|
||||
In order to set the max number of participants add the following variable to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration:
|
||||
In order to set the max number of participants use the following **additional** configuration:
|
||||
|
||||
```
|
||||
matrix_prosody_jitsi_max_participants: <INTEGER OF MAX PARTICPANTS>
|
||||
```yaml
|
||||
jitsi_prosody_max_participants: 4 # example value
|
||||
```
|
||||
|
||||
## (Optional) Additional JVBs
|
||||
@ -169,18 +173,18 @@ For this role to work you will need an additional section in the ansible hosts f
|
||||
<your jvb hosts> ansible_host=<ip address of the jvb host>
|
||||
```
|
||||
|
||||
Each JVB will require a server id to be set so that it can be uniquely identified and this allows Jitsi to keep track of which conferences are on which JVB.
|
||||
The server id is set with the variable `matrix_jitsi_jvb_server_id` which ends up as the JVB_WS_SERVER_ID environment variables in the JVB docker container.
|
||||
Each JVB will require a server id to be set so that it can be uniquely identified and this allows Jitsi to keep track of which conferences are on which JVB.
|
||||
The server id is set with the variable `jitsi_jvb_server_id` which ends up as the JVB_WS_SERVER_ID environment variables in the JVB docker container.
|
||||
This variable can be set via the host file, a parameter to the ansible command or in the `vars.yaml` for the host which will have the additional JVB. For example:
|
||||
|
||||
``` yaml
|
||||
matrix_jitsi_jvb_server_id: 'jvb-2'
|
||||
jitsi_jvb_server_id: 'jvb-2'
|
||||
```
|
||||
|
||||
``` INI
|
||||
[jitsi_jvb_servers]
|
||||
jvb-2.example.com ansible_host=192.168.0.2 matrix_jitsi_jvb_server_id=jvb-2
|
||||
jvb-3.example.com ansible_host=192.168.0.3 matrix_jitsi_jvb_server_id=jvb-2
|
||||
jvb-2.example.com ansible_host=192.168.0.2 jitsi_jvb_server_id=jvb-2
|
||||
jvb-3.example.com ansible_host=192.168.0.3 jitsi_jvb_server_id=jvb-2
|
||||
```
|
||||
|
||||
Note that the server id `jvb-1` is reserved for the JVB instance running on the Matrix host and therefore should not be used as the id of an additional jvb host.
|
||||
@ -188,20 +192,20 @@ Note that the server id `jvb-1` is reserved for the JVB instance running on the
|
||||
The additional JVB will also need to expose the colibri web socket port and this can be done with the following variable:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_jvb_container_colibri_ws_host_bind_port: 9090
|
||||
jitsi_jvb_container_colibri_ws_host_bind_port: 9090
|
||||
```
|
||||
|
||||
The JVB will also need to know where the prosody xmpp server is located, similar to the server id this can be set in the vars for the JVB by using the variable
|
||||
`matrix_jitsi_xmpp_server`. The Jitsi prosody container is deployed on the matrix server by default so the value can be set to the matrix domain. For example:
|
||||
The JVB will also need to know where the prosody xmpp server is located, similar to the server id this can be set in the vars for the JVB by using the variable
|
||||
`jitsi_xmpp_server`. The Jitsi prosody container is deployed on the matrix server by default so the value can be set to the matrix domain. For example:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_xmpp_server: "{{ matrix_domain }}"
|
||||
jitsi_xmpp_server: "{{ matrix_domain }}"
|
||||
```
|
||||
|
||||
However, it can also be set the ip address of the matrix server. This can be useful if you wish to use a private ip. For example:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_xmpp_server: "192.168.0.1"
|
||||
jitsi_xmpp_server: "192.168.0.1"
|
||||
```
|
||||
|
||||
The nginx configuration will also need to be updated in order to deal with the additional JVB servers. This is achieved via its own configuration variable
|
||||
@ -216,7 +220,7 @@ matrix_nginx_proxy_proxy_jitsi_additional_jvbs:
|
||||
```
|
||||
|
||||
|
||||
Applied together this will allow you to provision extra JVB instances which will register themselves with the prosody service and be available for jicofo
|
||||
Applied together this will allow you to provision extra JVB instances which will register themselves with the prosody service and be available for jicofo
|
||||
to route conferences too.
|
||||
|
||||
## (Optional) Enable Gravatar
|
||||
@ -227,7 +231,7 @@ Since element already sends the url of configured Matrix avatars to Jitsi, we di
|
||||
To enable Gravatar set:
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_disable_gravatar: false
|
||||
jitsi_disable_gravatar: false
|
||||
```
|
||||
|
||||
**Beware:** This leaks information to a third party, namely the Gravatar-Service (unless configured otherwise: gravatar.com).
|
||||
@ -255,7 +259,7 @@ You can use the self-hosted Jitsi server in multiple ways:
|
||||
|
||||
### Rebuilding your Jitsi installation
|
||||
|
||||
**If you ever run into any trouble** or **if you change configuration (`matrix_jitsi_*` variables) too much**, we urge you to rebuild your Jitsi setup.
|
||||
**If you ever run into any trouble** or **if you change configuration (`jitsi_*` variables) too much**, we urge you to rebuild your Jitsi setup.
|
||||
|
||||
We normally don't require such manual intervention for other services, but Jitsi services generate a lot of configuration files on their own.
|
||||
|
||||
@ -263,7 +267,6 @@ These files are not all managed by Ansible (at least not yet), so you may someti
|
||||
|
||||
To rebuild your Jitsi configuration:
|
||||
|
||||
- SSH into the server and do this:
|
||||
- stop all Jitsi services (`systemctl stop matrix-jitsi-*`).
|
||||
- remove all Jitsi configuration & data (`rm -rf /matrix/jitsi`)
|
||||
- ask Ansible to set up Jitsi anew and restart services (`ansible-playbook -i inventory/hosts setup.yml --tags=setup-jitsi,start`)
|
||||
- ask Ansible to stop all Jitsi services: `just run-tags stop-group --extra-vars=group=jitsi`
|
||||
- SSH into the server and do this and remove all Jitsi configuration & data (`rm -rf /matrix/jitsi`)
|
||||
- ask Ansible to set up Jitsi anew and restart services (`just install-service jitsi`)
|
||||
|
@ -36,7 +36,7 @@ If you have or want to enable [Jitsi](configuring-playbook-jitsi.md), you might
|
||||
If you do not do it, Jitsi will fall back to an upstream service.
|
||||
|
||||
```yaml
|
||||
matrix_jitsi_web_stun_servers:
|
||||
jitsi_web_stun_servers:
|
||||
- stun:HOSTNAME_OR_IP:PORT
|
||||
```
|
||||
You can put multiple host/port combinations if you like.
|
||||
|
@ -262,7 +262,7 @@ matrix_server_fqn_element: "element.YOUR_BASE_DOMAIN"
|
||||
# Feel free to use `dimension.matrix.YOUR_BASE_DOMAIN`, if you'd prefer that.
|
||||
matrix_server_fqn_dimension: "dimension.YOUR_BASE_DOMAIN"
|
||||
|
||||
# This is where you access Jitsi (if enabled via `matrix_jitsi_enabled: true`; NOT enabled by default).
|
||||
# This is where you access Jitsi (if enabled via `jitsi_enabled: true`; NOT enabled by default).
|
||||
#
|
||||
# Feel free to use `jitsi.matrix.YOUR_BASE_DOMAIN`, if you'd prefer that.
|
||||
matrix_server_fqn_jitsi: "jitsi.YOUR_BASE_DOMAIN"
|
||||
|
Reference in New Issue
Block a user