updated to allow voice chat

This commit is contained in:
2026-03-19 22:05:03 -06:00
parent 362309a51d
commit 95778fc407
5 changed files with 93 additions and 1 deletions

View File

@@ -67,3 +67,28 @@
- "{{ synapse_data_dir }}:/data"
command: >
-c /data/homeserver.yaml
#----- Coturn + Synapse
- name: Run Coturn container (STUN/TURN server)
container:
name: coturn
image: coturn/coturn:latest
state: started
restart_policy: unless-stopped
pod: "{{ podman_pod_name }}"
env:
LISTENING_PORT: "3478"
ALTERNATE_LISTENING_PORT: "5349"
RELAY_ADDRESS: "{{ ansible_default_ipv4.address }}" # or your server IP
EXTERNAL_IP: "{{ ansible_default_ipv4.address }}"
# Shared secret for dynamic credentials
TURNSERVER_STATIC_AUTH_SECRET: "{{ coturn_shared_secret }}"
# Enable TLS
TURNSERVER_TLS_LISTENING_PORT: "5349"
TURNSERVER_CERT: "/etc/turnserver/tls.crt"
TURNSERVER_PKEY: "/etc/turnserver/tls.key"
NO_AUTH_TIMESTAMPS: "true"
REALM: "{{ matrix_domain }}"
# Mount TLS certs (same as Nginx) if you want encrypted TURN (recommended)
volumes:
- "/var/lib/matrix-nginx/certbot/live/{{ matrix_domain }}:/etc/turnserver:ro"
register: coturn_cont

View File

@@ -35,3 +35,24 @@ rc_flood_control:
# Enable password login
enable_registration: true
enable_registration_without_verification: true
## -- turn settings
# Voice & Video Chat Settings
media_store_path: /data/media_store
max_image_pixels: 32000000 # 32MP max
# TURN/STUN server config
turn_uris:
- "turn:{{ matrix_domain }}:3478?transport=udp"
- "turn:{{ matrix_domain }}:3478?transport=tcp"
- "turns:{{ matrix_domain }}:5349?transport=tcp" # encrypted TURN
turn_shared_secret: "{{ coturn_shared_secret }}"
turn_username: "{{ coturn_username }}"
turn_password: "{{ coturn_password }}"
turn_time_limit: 86400 # 24h (optional)
turn_allow_guests: true # allow non-Matrix users (e.g., web guests)
# Optional: Enable call features
enable_call_signalling: true