jitsi-meet.cfg.lua 11 KB

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