Add Element calling

This commit is contained in:
A 2025-06-20 11:56:03 -07:00
parent c38e7b0e29
commit d257b47788
4 changed files with 59 additions and 2 deletions

View File

@ -34,6 +34,7 @@ chat.{$DWEB_DOMAIN}, http://chat.{$DWEB_ONION} {
matrix.{$DWEB_DOMAIN}, http://matrix.{$DWEB_ONION} {
reverse_proxy /_matrix/* http://synapse:8008
reverse_proxy /_synapse/client/* http://synapse:8008
reverse_proxy /.well-known/* http://synapse:8008
header Onion-Location http://matrix.{$DWEB_ONION}
}
@ -41,6 +42,14 @@ matrix.{$DWEB_DOMAIN}:8448 {
reverse_proxy http://synapse:8008
}
matrixrtc.{$DWEB_DOMAIN}, https://matrixrtc.{$DWEB_DOMAIN}, wss://matrixrtc.{$DWEB_DOMAIN} {
reverse_proxy /livekit/jwt* auth-service:8080
reverse_proxy /sfu/get* auth-service:8080
handle_path /livekit/sfu* {
reverse_proxy livekit:7880
}
}
peertube.{$DWEB_DOMAIN}:1935, https://peertube.{$DWEB_DOMAIN}:1935 {
reverse_proxy http://peertube-back:1935
}

View File

@ -81,6 +81,37 @@ services:
# - source: mjolnir-production-config
# target: /data/config/production.yaml
auth-service:
image: ghcr.io/element-hq/lk-jwt-service:latest
environment:
- LK_JWT_PORT=8080
- LIVEKIT_URL=https://matrixrtc.${DWEB_DOMAIN}/livekit/sfu
- LIVEKIT_KEY=devkey
- LIVEKIT_SECRET=#CHANGEMENOW # must be same as devkey in conf/synapse/livekit.yml
- LIVEKIT_LOCAL_HOMESERVERS=matrix.${DWEB_DOMAIN}
- LIVEKIT_INSECURE_SKIP_VERIFY_TLS=YES_I_KNOW_WHAT_I_AM_DOING
restart: unless-stopped
networks:
- back
depends_on:
- synapse
livekit:
image: livekit/livekit-server:latest
command: --config /etc/livekit.yaml
ports:
- 127.0.0.1:7880:7880/tcp
- 127.0.0.1:7881:7881/tcp
- 50100-50200:50100-50200/udp
restart: unless-stopped
networks:
- back
depends_on:
- synapse
configs:
- source: livekit-config
target: /etc/livekit.yaml
configs:
synapse-homeserver-config:
file: ../synapse/homeserver.yaml
@ -97,3 +128,6 @@ configs:
mjolnir-production-config:
file: ../mjolnir/production.yaml
external: false
livekit-config:
file: ../synapse/livekit.yaml
external: false

View File

@ -12,7 +12,12 @@
"brand": "Element",
"defaultCountryCode": "UA",
"showLabsSettings": false,
"features": { },
"features": {
"feature_element_call_video_rooms": true,
"feature_video_rooms": true,
"feature_group_calls": true,
"feature_release_announcement": false
},
"default_federate": true,
"default_theme": "light",
"roomDirectory": {
@ -28,6 +33,13 @@
"matrix.khmelnytskyi.dcomm.net.ua"
]
},
"jitsi": {
"preferred_domain": "meet.eqver.se"
},
"element_call": {
"participant_limit": 8,
"brand": "Element Call"
,
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false

View File

@ -84,6 +84,7 @@ matrix_config () {
sed -i "s/# vim:ft=yaml//" $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf "enable_registration: true\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf "public_baseurl: matrix.$DWEB_DOMAIN\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf "registration_requires_token: true\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf "encryption_enabled_by_default_for_room_type: all\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf "rc_registration:\n per_second: 0.1 \n burst_count: 2\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
@ -91,7 +92,8 @@ matrix_config () {
printf "database:\n name: psycopg2\n txn_limit: 10000\n args:\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf " user: postgres\n password: null\n database: postgres\n host: synapse-pg\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf " port: 5432\n cp_min: 5\n cp_max: 10\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf "extra_well_known_client_content:\n org.matrix.msc4143.rtc_foci:\n - type: \"livekit\"\n livekit_service_url: \"https://matrixrtc.$DWEB_DOMAIN\"\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
printf "experimental_features:\n msc3266_enabled: true\n msc4222_enabled: true\n msc4140_enabled: true\nmax_event_delay_duration: 24h\nrc_message:\n per_second: 0.5\n burst_count: 30\nrc_delayed_event_mgmt:\n per_second: 1\n burst_count: 20\n" >> $DCOMMS_DIR/conf/synapse/homeserver.yaml
sed -i "s/TEMPLATE/$DWEB_DOMAIN/" $DCOMMS_DIR/conf/element/config.json
sudo chown -R 991:991 $DCOMMS_DIR/conf/synapse/