recommit with matrix synapse

This commit is contained in:
boxswapper
2026-02-22 21:12:23 -07:00
parent b62c01e2e6
commit d669b0cfe7
11 changed files with 68 additions and 556 deletions

View File

@@ -0,0 +1,29 @@
- name: Verify NGINX Proxy Manager UI is up
ansible.builtin.uri:
url: http://10.10.0.19
return_content: no
status_code: 200
register: npm_check
failed_when: npm_check.status != 200
- name: Verify Synapse health endpoint
ansible.builtin.uri:
url: http://10.10.0.35:8008/_matrix/client/versions
return_content: yes
register: synapse_check
failed_when: "'versions' not in synapse_check.json"
- name: Verify Coturn is listening (UDP)
ansible.builtin.command: "nc -zuv 10.10.0.30 3478"
register: turn_check
failed_when: turn_check.rc != 0
- name: Verify mautrix‑voip registration with Synapse
ansible.builtin.uri:
url: "http://10.10.0.35:8008/_matrix/app/v1/rooms"
method: GET
headers:
Authorization: "Bearer {{ synapse_registration_token }}"
status_code: 200
register: voip_check
failed_when: voip_check.status != 200

17
templates/homeserver.yaml Normal file
View File

@@ -0,0 +1,17 @@
# /opt/apps/synapse/data/homeserver.yaml
# ----------------------------------------------------
# Existing content … (keep it!)
# ----------------------------------------------------
# Enable the VoIP module (MSC2746) – it’s built‑in but must be turned on
enable_voip: true
# Turn server configuration (required for media relay)
turn_uris:
- "turn:coturn:3478?transport=udp"
- "turn:coturn:5349?transport=tcp"
turn_shared_secret: "{{ lookup('file', '/opt/apps/coturn/turn_shared_secret') }}"
turn_user_lifetime: "12h"
# Application Service registration for mautrix‑voip (add a block)
app_service_config_files:
- "/data/mautrix-voip.yaml"

View File

@@ -0,0 +1,22 @@
# /opt/apps/mautrix-voip/mautrix-voip.yaml
# ----------------------------------------------------
as_token: "{{ lookup('file', '/opt/apps/synapse/data/registration_token') }}"
hs_token: "{{ lookup('file', '/opt/apps/synapse/data/registration_token') }}"
# Where Synapse lives (the internal network name)
homeserver:
url: "http://synapse:8008"
domain: "{{ matrix_domain }}"
# TURN server details – the bridge will use these for its media streams
turn:
uris:
- "turn:coturn:3478?transport=udp"
- "turn:coturn:5349?transport=tcp"
shared_secret: "{{ lookup('file', '/opt/apps/coturn/turn_shared_secret') }}"
# SIP provider configuration (example – replace with your own)
sip:
uri: "sip:example.com"
username: "myuser"
password: "mypassword"