matrix-docker-ansible-deploy/docs/configuring-playbook-jwt-service.md

41 lines
1.6 KiB
Markdown
Raw Normal View History

# Setting up JWT Service (optional)
2024-11-23 16:40:50 +02:00
The playbook can install and configure [LiveKit JWT Service](https://github.com/element-hq/lk-jwt-service) for you.
LK-JWT-Service is currently used for a single reason: generate JWT tokens with a given identity for a given room, so that users can use them to authenticate against LiveKit SFU.
See the project's [documentation](https://github.com/element-hq/lk-jwt-service/) to learn more.
## Decide on a domain and path
2024-11-23 16:40:50 +02:00
By default, JWT Service is configured to be served:
2024-11-23 16:40:50 +02:00
- on the Matrix domain (`matrix.example.com`), configurable via `matrix_livekit_jwt_service_hostname`
- under a `/lk-jwt-service` path prefix, configurable via `matrix_livekit_jwt_service_path_prefix`
2024-11-23 16:40:50 +02:00
This makes it easy to set it up, **without** having to adjust your DNS records manually.
## Adjusting DNS records
If you've changed the default hostname, **you may need to adjust your DNS** records accordingly to point to the correct server.
## Adjusting the playbook configuration
Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
```yaml
2024-11-23 16:40:50 +02:00
matrix_livekit_jwt_service_enabled: true
```
## Installing
After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records), run the [installation](installing.md) command: `just install-all` or `just setup-all`
## Usage
Once installed, a new `org.matrix.msc4143.rtc_foci` section is added to the Element Web client to point to your JWT service URL (e.g., `https://matrix.example.com/lk-jwt-service`).
## Additional Information
2024-11-23 16:40:50 +02:00
Refer to the LiveKit JWT-Service documentation for more details on configuring and using JWT Service.