The playbook can install and configure Livekit for you.
LiveKit 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.
See the project’s documentation to learn more.
By default, Livekit is configured to be served on the Matrix domain (sfu.DOMAIN, controlled by the matrix_livekit_server_hostname variable).
This makes it easy to set it up, without having to adjust your DNS records manually.
If you’d like to run Livekit on another hostname or path, use the matrix_livekit_server_hostname variable.
If you’ve changed the default hostname, you may need to adjust your DNS records accordingly to point to the correct server.
Ensure that the following DNS names have a public IP/FQDN:
sfu.DOMAINAdd the following configuration to your inventory/host_vars/matrix.DOMAIN/vars.yml file:
matrix_livekit_server_enabled: true
# Set a secure key for LiveKit authentication
matrix_element_call_livekit_dev_key: 'your-secure-livekit-key'
After potentially adjusting DNS records and configuring the playbook, run the installation command again:
ansible-playbook -i inventory setup.yml
Once installed, and in conjunction with Element Call and JWT Service, Livekit will become the WebRTC backend for all Element client calls.
To ensure the services function correctly, the following firewall rules and port forwarding settings are required:
LiveKit:
• Forward UDP ports 50100:50200 to the Docker instance running LiveKit.
• Forward TCP port 7881 to the Docker instance running LiveKit.
Ensure these ports are open and forwarded appropriately to allow traffic to flow correctly between the services.
Refer to the Livekit documentation for more details on configuring and using Livekit.