2
0

jitsi-meet.cfg.lua 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
  2. {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool)}}
  3. {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool }}
  4. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
  5. {{ $JICOFO_AUTH_USER := .Env.JICOFO_AUTH_USER | default "focus" -}}
  6. {{ $JVB_AUTH_USER := .Env.JVB_AUTH_USER | default "jvb" -}}
  7. {{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" }}
  8. {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool }}
  9. {{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" }}
  10. {{ $MATRIX_UVS_ISSUER := .Env.MATRIX_UVS_ISSUER | default "issuer" }}
  11. {{ $MATRIX_UVS_SYNC_POWER_LEVELS := .Env.MATRIX_UVS_SYNC_POWER_LEVELS | default "0" | toBool }}
  12. {{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" }}
  13. {{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "true" | toBool }}
  14. {{ $ENABLE_AV_MODERATION := .Env.ENABLE_AV_MODERATION | default "true" | toBool }}
  15. {{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool }}
  16. {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }}
  17. {{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
  18. {{ $TURN_PORT := .Env.TURN_PORT | default "443" }}
  19. {{ $TURNS_PORT := .Env.TURNS_PORT | default "443" }}
  20. {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
  21. {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
  22. {{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}}
  23. {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
  24. {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
  25. {{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 }}
  26. {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
  27. {{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}}
  28. {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
  29. admins = {
  30. "{{ $JICOFO_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  31. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  32. }
  33. unlimited_jids = {
  34. "{{ $JICOFO_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  35. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  36. }
  37. plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }
  38. muc_mapper_domain_base = "{{ $XMPP_DOMAIN }}";
  39. muc_mapper_domain_prefix = "{{ $XMPP_MUC_DOMAIN_PREFIX }}";
  40. http_default_host = "{{ $XMPP_DOMAIN }}"
  41. {{ if .Env.TURN_CREDENTIALS }}
  42. external_service_secret = "{{.Env.TURN_CREDENTIALS}}";
  43. {{ end }}
  44. {{ if or .Env.TURN_HOST .Env.TURNS_HOST }}
  45. external_services = {
  46. {{ if .Env.TURN_HOST }}
  47. { type = "turn", host = "{{ .Env.TURN_HOST }}", port = {{ $TURN_PORT }}, transport = "tcp", secret = true, ttl = 86400, algorithm = "turn" }
  48. {{ end }}
  49. {{ if and .Env.TURN_HOST .Env.TURNS_HOST }}
  50. ,
  51. {{ end }}
  52. {{ if .Env.TURNS_HOST }}
  53. { type = "turns", host = "{{ .Env.TURNS_HOST }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = 86400, algorithm = "turn" }
  54. {{ end }}
  55. };
  56. {{ end }}
  57. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_ISSUERS }}
  58. asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
  59. {{ end }}
  60. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_AUDIENCES }}
  61. asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" }
  62. {{ end }}
  63. consider_bosh_secure = true;
  64. consider_websocket_secure = true;
  65. VirtualHost "{{ $XMPP_DOMAIN }}"
  66. {{ if $ENABLE_AUTH }}
  67. {{ if eq $AUTH_TYPE "jwt" }}
  68. authentication = "{{ $JWT_AUTH_TYPE }}"
  69. app_id = "{{ .Env.JWT_APP_ID }}"
  70. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  71. allow_empty_token = {{ $JWT_ALLOW_EMPTY }}
  72. {{ if $JWT_ASAP_KEYSERVER }}
  73. asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}"
  74. {{ end }}
  75. {{ else if eq $AUTH_TYPE "ldap" }}
  76. authentication = "cyrus"
  77. cyrus_application_name = "xmpp"
  78. allow_unencrypted_plain_auth = true
  79. {{ else if eq $AUTH_TYPE "matrix" }}
  80. authentication = "matrix_user_verification"
  81. app_id = "{{ $MATRIX_UVS_ISSUER }}"
  82. uvs_base_url = "{{ .Env.MATRIX_UVS_URL }}"
  83. {{ if .Env.MATRIX_UVS_AUTH_TOKEN }}
  84. uvs_auth_token = "{{ .Env.MATRIX_UVS_AUTH_TOKEN }}"
  85. {{ end }}
  86. {{ if $MATRIX_UVS_SYNC_POWER_LEVELS }}
  87. uvs_sync_power_levels = true
  88. {{ end }}
  89. {{ else if eq $AUTH_TYPE "internal" }}
  90. authentication = "internal_hashed"
  91. {{ end }}
  92. {{ else }}
  93. authentication = "jitsi-anonymous"
  94. {{ end }}
  95. ssl = {
  96. key = "/config/certs/{{ $XMPP_DOMAIN }}.key";
  97. certificate = "/config/certs/{{ $XMPP_DOMAIN }}.crt";
  98. }
  99. modules_enabled = {
  100. "bosh";
  101. {{ if $ENABLE_XMPP_WEBSOCKET }}
  102. "websocket";
  103. "smacks"; -- XEP-0198: Stream Management
  104. {{ end }}
  105. "pubsub";
  106. "ping";
  107. "speakerstats";
  108. "conference_duration";
  109. {{ if or .Env.TURN_HOST .Env.TURNS_HOST }}
  110. "external_services";
  111. {{ end }}
  112. {{ if $ENABLE_LOBBY }}
  113. "muc_lobby_rooms";
  114. {{ end }}
  115. {{ if $ENABLE_BREAKOUT_ROOMS }}
  116. "muc_breakout_rooms";
  117. {{ end }}
  118. {{ if $ENABLE_AV_MODERATION }}
  119. "av_moderation";
  120. {{ end }}
  121. {{ if .Env.XMPP_MODULES }}
  122. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}";
  123. {{ end }}
  124. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "ldap") }}
  125. "auth_cyrus";
  126. {{end}}
  127. }
  128. main_muc = "{{ $XMPP_MUC_DOMAIN }}"
  129. {{ if $ENABLE_LOBBY }}
  130. lobby_muc = "lobby.{{ $XMPP_DOMAIN }}"
  131. {{ if $ENABLE_RECORDING }}
  132. muc_lobby_whitelist = { "{{ $XMPP_RECORDER_DOMAIN }}" }
  133. {{ end }}
  134. {{ end }}
  135. {{ if $ENABLE_BREAKOUT_ROOMS }}
  136. breakout_rooms_muc = "breakout.{{ $XMPP_DOMAIN }}"
  137. {{ end }}
  138. speakerstats_component = "speakerstats.{{ $XMPP_DOMAIN }}"
  139. conference_duration_component = "conferenceduration.{{ $XMPP_DOMAIN }}"
  140. {{ if $ENABLE_AV_MODERATION }}
  141. av_moderation_component = "avmoderation.{{ $XMPP_DOMAIN }}"
  142. {{ end }}
  143. c2s_require_encryption = false
  144. {{ if $ENABLE_GUEST_DOMAIN }}
  145. VirtualHost "{{ $XMPP_GUEST_DOMAIN }}"
  146. authentication = "jitsi-anonymous"
  147. c2s_require_encryption = false
  148. {{ end }}
  149. VirtualHost "{{ $XMPP_AUTH_DOMAIN }}"
  150. ssl = {
  151. key = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.key";
  152. certificate = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.crt";
  153. }
  154. modules_enabled = {
  155. "limits_exception";
  156. }
  157. authentication = "internal_hashed"
  158. {{ if $ENABLE_RECORDING }}
  159. VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}"
  160. modules_enabled = {
  161. "ping";
  162. }
  163. authentication = "internal_hashed"
  164. {{ end }}
  165. Component "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" "muc"
  166. storage = "memory"
  167. modules_enabled = {
  168. "ping";
  169. {{ if .Env.XMPP_INTERNAL_MUC_MODULES -}}
  170. "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}";
  171. {{ end -}}
  172. }
  173. restrict_room_creation = true
  174. muc_room_locking = false
  175. muc_room_default_public_jids = true
  176. Component "{{ $XMPP_MUC_DOMAIN }}" "muc"
  177. storage = "memory"
  178. modules_enabled = {
  179. "muc_meeting_id";
  180. {{ if .Env.XMPP_MUC_MODULES -}}
  181. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
  182. {{ end -}}
  183. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") -}}
  184. "{{ $JWT_TOKEN_AUTH_MODULE }}";
  185. {{ end }}
  186. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "matrix") $MATRIX_UVS_SYNC_POWER_LEVELS -}}
  187. "matrix_power_sync";
  188. {{ end -}}
  189. {{ if not $DISABLE_POLLS -}}
  190. "polls";
  191. {{ end -}}
  192. {{ if $ENABLE_SUBDOMAINS -}}
  193. "muc_domain_mapper";
  194. {{ end -}}
  195. }
  196. muc_room_cache_size = 1000
  197. muc_room_locking = false
  198. muc_room_default_public_jids = true
  199. Component "focus.{{ $XMPP_DOMAIN }}" "client_proxy"
  200. target_address = "{{ $JICOFO_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  201. Component "speakerstats.{{ $XMPP_DOMAIN }}" "speakerstats_component"
  202. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  203. Component "conferenceduration.{{ $XMPP_DOMAIN }}" "conference_duration_component"
  204. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  205. {{ if $ENABLE_AV_MODERATION }}
  206. Component "avmoderation.{{ $XMPP_DOMAIN }}" "av_moderation_component"
  207. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  208. {{ end }}
  209. {{ if $ENABLE_LOBBY }}
  210. Component "lobby.{{ $XMPP_DOMAIN }}" "muc"
  211. storage = "memory"
  212. restrict_room_creation = true
  213. muc_room_locking = false
  214. muc_room_default_public_jids = true
  215. {{ end }}
  216. {{ if $ENABLE_BREAKOUT_ROOMS }}
  217. Component "breakout.{{ $XMPP_DOMAIN }}" "muc"
  218. storage = "memory"
  219. restrict_room_creation = true
  220. muc_room_locking = false
  221. muc_room_default_public_jids = true
  222. modules_enabled = {
  223. "muc_meeting_id";
  224. {{ if $ENABLE_SUBDOMAINS -}}
  225. "muc_domain_mapper";
  226. {{ end -}}
  227. {{ if not $DISABLE_POLLS -}}
  228. "polls";
  229. {{ end -}}
  230. }
  231. {{ end }}