Configuring Matrix RTC
See how to download example files from the helm chart here.
Configuration
For a quick setup using the default settings, see the minimal fragment example in charts/matrix-stack/ci/fragments/matrix-rtc-minimal.yaml
.
Credentials
Credentials are generated if possible. Alternatively they can either be provided inline
in the values with value
or if you have an existing Secret
in the cluster in the
same namespace you can use secret
andsecretKey
to reference it.
If you dont want the chart to generate the secret, please refer to the following values fragments examples to see the secrets to configure.
Matrix RTC requires livekitAuth.secret
secret:
-
charts/matrix-stack/ci/fragments/matrix-rtc-secrets-in-helm.yaml
-
charts/matrix-stack/ci/fragments/matrix-rtc-secrets-externally.yaml
SFU Networking
The matrix RTC SFU networking relies on NodePort by default. This means that the node but be reachable from outside of the cluster. Default ports are :
- RTC TCP: 30000/TCP
- RTC Muxed UDP : 30001/UDP
This can be configured using matrixRTC.sfu.exposedServices
.
The default SFU networking relies on STUN to discover its public IP. It will automatically advertise it to the clients. The STUN servers can be configured in LiveKit configuration using the additional
section :
matrixRTC:
sfu:
additional: |
rtc:
stun_servers:
- ip:port
- ip:port
- ...
Accessing from behind a Load Balancer
If you are behind a Load Balancer, you must forward the ports from the Load Balancer to the nodes. The ports must be the same on the Load Balancer and the nodes. In this situation, the SFU cannot discover the Load Balancer public IP using the STUN method. Instead, you must use set the env variable NODE_IP
:
matrixRTC:
sfu:
extraEnv:
- name: NODE_IP
value: 1.2.3.4
additional: |
rtc:
use_external_ip: false
# To workaround https://github.com/livekit/livekit/issues/2088
# Any IP address is acceptable, it doesn't need to be a correct one,
# it just needs to be present to get LiveKit to skip checking all local interfaces
# We assign here a TEST-NET IP which is
# overridden by the NODE_IP env var at runtime
node_ip: 198.51.100.1
### Additional SFU configuration
Additional Matrix RTC SFU configuration can be provided inline in the values as a string with
matrixRTC:
sfu:
additional:
## Either reference config to inject by:
1-custom-config:
config: |
admin_contact: "mailto:admin@example.com"
## Either reference an existing `Secret` by:
2-custom-config:
configSecret: custom-matrix-rtc-config
configSecretKey: shared.yaml
Disabling Matrix RTC
Matrix RTC is enabled for deployment by default can be disabled with the following values
matrixRTC:
enabled: false