jitsi-meet.cfg.lua 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. {{ $C2S_REQUIRE_ENCRYPTION := .Env.PROSODY_C2S_REQUIRE_ENCRYPTION | default "1" | toBool -}}
  2. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool -}}
  3. {{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}}
  4. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}}
  5. {{ $PROSODY_AUTH_TYPE := .Env.PROSODY_AUTH_TYPE | default $AUTH_TYPE -}}
  6. {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) -}}
  7. {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool -}}
  8. {{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "0" | toBool -}}
  9. {{ $JIBRI_XMPP_USER := .Env.JIBRI_XMPP_USER | default "jibri" -}}
  10. {{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}}
  11. {{ $JVB_AUTH_USER := .Env.JVB_AUTH_USER | default "jvb" -}}
  12. {{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" -}}
  13. {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool -}}
  14. {{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" -}}
  15. {{ $JWT_ENABLE_DOMAIN_VERIFICATION := .Env.JWT_ENABLE_DOMAIN_VERIFICATION | default "false" | toBool -}}
  16. {{ $MATRIX_UVS_ISSUER := .Env.MATRIX_UVS_ISSUER | default "issuer" -}}
  17. {{ $MATRIX_UVS_SYNC_POWER_LEVELS := .Env.MATRIX_UVS_SYNC_POWER_LEVELS | default "0" | toBool -}}
  18. {{ $MATRIX_LOBBY_BYPASS := .Env.MATRIX_LOBBY_BYPASS | default "0" | toBool -}}
  19. {{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" -}}
  20. {{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "true" | toBool -}}
  21. {{ $ENABLE_AV_MODERATION := .Env.ENABLE_AV_MODERATION | default "true" | toBool -}}
  22. {{ $ENABLE_BREAKOUT_ROOMS := .Env.ENABLE_BREAKOUT_ROOMS | default "true" | toBool -}}
  23. {{ $ENABLE_END_CONFERENCE := .Env.ENABLE_END_CONFERENCE | default "true" | toBool -}}
  24. {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool -}}
  25. {{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool -}}
  26. {{ $ENABLE_RATE_LIMITS := .Env.PROSODY_ENABLE_RATE_LIMITS | default "0" | toBool -}}
  27. {{ $GUEST_AUTH_TYPE := .Env.PROSODY_GUEST_AUTH_TYPE | default "jitsi-anonymous" -}}
  28. {{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
  29. {{ $PUBLIC_URL_DOMAIN := $PUBLIC_URL | trimPrefix "https://" | trimSuffix "/" -}}
  30. {{ $STUN_HOST := .Env.STUN_HOST | default "" -}}
  31. {{ $STUN_PORT := .Env.STUN_PORT | default "443" -}}
  32. {{ $TURN_HOST := .Env.TURN_HOST | default "" -}}
  33. {{ $TURN_HOSTS := splitList "," $TURN_HOST -}}
  34. {{ $TURN_PORT := .Env.TURN_PORT | default "443" -}}
  35. {{ $TURN_TRANSPORT := .Env.TURN_TRANSPORT | default "tcp" -}}
  36. {{ $TURN_TRANSPORTS := splitList "," $TURN_TRANSPORT -}}
  37. {{ $TURNS_HOST := .Env.TURNS_HOST | default "" -}}
  38. {{ $TURNS_HOSTS := splitList "," $TURNS_HOST -}}
  39. {{ $TURNS_PORT := .Env.TURNS_PORT | default "443" -}}
  40. {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
  41. {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
  42. {{ $XMPP_GUEST_DOMAIN := .Env.XMPP_GUEST_DOMAIN | default "guest.meet.jitsi" -}}
  43. {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
  44. {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
  45. {{ $XMPP_MUC_DOMAIN_PREFIX := (split "." $XMPP_MUC_DOMAIN)._0 -}}
  46. {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
  47. {{ $JIBRI_RECORDER_USER := .Env.JIBRI_RECORDER_USER | default "recorder" -}}
  48. {{ $JIGASI_TRANSCRIBER_USER := .Env.JIGASI_TRANSCRIBER_USER | default "transcriber" -}}
  49. {{ $DISABLE_POLLS := .Env.DISABLE_POLLS | default "false" | toBool -}}
  50. {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
  51. {{ $PROSODY_RESERVATION_ENABLED := .Env.PROSODY_RESERVATION_ENABLED | default "false" | toBool -}}
  52. {{ $PROSODY_RESERVATION_REST_BASE_URL := .Env.PROSODY_RESERVATION_REST_BASE_URL | default "" -}}
  53. {{ $RATE_LIMIT_LOGIN_RATE := .Env.PROSODY_RATE_LIMIT_LOGIN_RATE | default "3" -}}
  54. {{ $RATE_LIMIT_SESSION_RATE := .Env.PROSODY_RATE_LIMIT_SESSION_RATE | default "200" -}}
  55. {{ $RATE_LIMIT_TIMEOUT := .Env.PROSODY_RATE_LIMIT_TIMEOUT | default "60" -}}
  56. {{ $RATE_LIMIT_ALLOW_RANGES := .Env.PROSODY_RATE_LIMIT_ALLOW_RANGES | default "10.0.0.0/8" -}}
  57. {{ $RATE_LIMIT_CACHE_SIZE := .Env.PROSODY_RATE_LIMIT_CACHE_SIZE | default "10000" -}}
  58. {{ $ENV := .Env -}}
  59. admins = {
  60. {{ if .Env.JIGASI_XMPP_PASSWORD }}
  61. "{{ $JIGASI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  62. {{ end }}
  63. {{ if .Env.JIBRI_XMPP_PASSWORD }}
  64. "{{ $JIBRI_XMPP_USER }}@{{ $XMPP_AUTH_DOMAIN }}",
  65. {{ end }}
  66. "focus@{{ $XMPP_AUTH_DOMAIN }}",
  67. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  68. }
  69. unlimited_jids = {
  70. "focus@{{ $XMPP_AUTH_DOMAIN }}",
  71. "{{ $JVB_AUTH_USER }}@{{ $XMPP_AUTH_DOMAIN }}"
  72. }
  73. plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }
  74. muc_mapper_domain_base = "{{ $XMPP_DOMAIN }}";
  75. muc_mapper_domain_prefix = "{{ $XMPP_MUC_DOMAIN_PREFIX }}";
  76. http_default_host = "{{ $XMPP_DOMAIN }}"
  77. {{ if .Env.TURN_CREDENTIALS -}}
  78. external_service_secret = "{{.Env.TURN_CREDENTIALS}}";
  79. {{- end }}
  80. {{ if or .Env.STUN_HOST .Env.TURN_HOST .Env.TURNS_HOST -}}
  81. external_services = {
  82. {{- if $STUN_HOST }}
  83. { type = "stun", host = "{{ $STUN_HOST }}", port = {{ $STUN_PORT }}, transport = "udp" }
  84. {{- end }}
  85. {{- if $TURN_HOST -}}
  86. {{- range $idx1, $host := $TURN_HOSTS -}}
  87. {{- range $idx2, $transport := $TURN_TRANSPORTS -}}
  88. {{- if or $STUN_HOST $idx1 $idx2 -}},{{- end }}
  89. { type = "turn", host = "{{ $host }}", port = {{ $TURN_PORT }}, transport = "{{ $transport }}", secret = true, ttl = 86400, algorithm = "turn" }
  90. {{- end -}}
  91. {{- end -}}
  92. {{- end -}}
  93. {{- if $TURNS_HOST -}}
  94. {{- range $idx, $host := $TURNS_HOSTS -}}
  95. {{- if or $STUN_HOST $TURN_HOST $idx -}},{{- end }}
  96. { type = "turns", host = "{{ $host }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = 86400, algorithm = "turn" }
  97. {{- end }}
  98. {{- end }}
  99. };
  100. {{- end }}
  101. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_ISSUERS }}
  102. asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
  103. {{ end }}
  104. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) .Env.JWT_ACCEPTED_AUDIENCES }}
  105. asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" }
  106. {{ end }}
  107. consider_bosh_secure = true;
  108. consider_websocket_secure = true;
  109. {{ if $ENABLE_XMPP_WEBSOCKET }}
  110. smacks_max_unacked_stanzas = 5;
  111. smacks_hibernation_time = 60;
  112. smacks_max_hibernated_sessions = 1;
  113. smacks_max_old_sessions = 1;
  114. {{ end }}
  115. {{ if $ENABLE_JAAS_COMPONENTS }}
  116. VirtualHost "jigasi.meet.jitsi"
  117. modules_enabled = {
  118. "ping";
  119. "bosh";
  120. "muc_password_check";
  121. }
  122. authentication = "token"
  123. app_id = "jitsi";
  124. asap_key_server = "https://jaas-public-keys.jitsi.net/jitsi-components/prod-8x8"
  125. asap_accepted_issuers = { "jaas-components" }
  126. asap_accepted_audiences = { "jigasi.{{ $PUBLIC_URL_DOMAIN }}" }
  127. {{ end }}
  128. VirtualHost "{{ $XMPP_DOMAIN }}"
  129. {{ if $ENABLE_AUTH }}
  130. {{ if eq $PROSODY_AUTH_TYPE "jwt" }}
  131. authentication = "{{ $JWT_AUTH_TYPE }}"
  132. app_id = "{{ .Env.JWT_APP_ID }}"
  133. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  134. allow_empty_token = {{ $JWT_ALLOW_EMPTY }}
  135. {{ if $JWT_ASAP_KEYSERVER }}
  136. asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}"
  137. {{ end }}
  138. enable_domain_verification = {{ $JWT_ENABLE_DOMAIN_VERIFICATION }}
  139. {{ else if eq $PROSODY_AUTH_TYPE "ldap" }}
  140. authentication = "cyrus"
  141. cyrus_application_name = "xmpp"
  142. allow_unencrypted_plain_auth = true
  143. {{ else if eq $PROSODY_AUTH_TYPE "matrix" }}
  144. authentication = "matrix_user_verification"
  145. app_id = "{{ $MATRIX_UVS_ISSUER }}"
  146. uvs_base_url = "{{ .Env.MATRIX_UVS_URL }}"
  147. {{ if .Env.MATRIX_UVS_AUTH_TOKEN }}
  148. uvs_auth_token = "{{ .Env.MATRIX_UVS_AUTH_TOKEN }}"
  149. {{ end }}
  150. {{ if $MATRIX_UVS_SYNC_POWER_LEVELS }}
  151. uvs_sync_power_levels = true
  152. {{ end }}
  153. {{ else if eq $PROSODY_AUTH_TYPE "hybrid_matrix_token" }}
  154. authentication = "hybrid_matrix_token"
  155. app_id = "{{ .Env.JWT_APP_ID }}"
  156. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  157. allow_empty_token = {{ $JWT_ALLOW_EMPTY }}
  158. enable_domain_verification = {{ $JWT_ENABLE_DOMAIN_VERIFICATION }}
  159. uvs_base_url = "{{ .Env.MATRIX_UVS_URL }}"
  160. {{ if .Env.MATRIX_UVS_ISSUER }}
  161. uvs_issuer = "{{ .Env.MATRIX_UVS_ISSUER }}"
  162. {{ end }}
  163. {{ if .Env.MATRIX_UVS_AUTH_TOKEN }}
  164. uvs_auth_token = "{{ .Env.MATRIX_UVS_AUTH_TOKEN }}"
  165. {{ end }}
  166. {{ else if eq $PROSODY_AUTH_TYPE "internal" }}
  167. authentication = "internal_hashed"
  168. {{ end }}
  169. {{ else }}
  170. authentication = "jitsi-anonymous"
  171. {{ end }}
  172. ssl = {
  173. key = "/config/certs/{{ $XMPP_DOMAIN }}.key";
  174. certificate = "/config/certs/{{ $XMPP_DOMAIN }}.crt";
  175. }
  176. modules_enabled = {
  177. "bosh";
  178. {{ if $ENABLE_XMPP_WEBSOCKET }}
  179. "websocket";
  180. "smacks"; -- XEP-0198: Stream Management
  181. {{ end }}
  182. "ping";
  183. "speakerstats";
  184. "conference_duration";
  185. "room_metadata";
  186. {{ if $ENABLE_END_CONFERENCE }}
  187. "end_conference";
  188. {{ end }}
  189. {{ if or .Env.TURN_HOST .Env.TURNS_HOST }}
  190. "external_services";
  191. {{ end }}
  192. {{ if $ENABLE_LOBBY }}
  193. "muc_lobby_rooms";
  194. {{ end }}
  195. {{ if $ENABLE_BREAKOUT_ROOMS }}
  196. "muc_breakout_rooms";
  197. {{ end }}
  198. {{ if $ENABLE_AV_MODERATION }}
  199. "av_moderation";
  200. {{ end }}
  201. {{ if .Env.XMPP_MODULES }}
  202. "{{ join "\";\n \"" (splitList "," .Env.XMPP_MODULES) }}";
  203. {{ end }}
  204. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "ldap") }}
  205. "auth_cyrus";
  206. {{end}}
  207. {{ if $PROSODY_RESERVATION_ENABLED }}
  208. "reservations";
  209. {{ end }}
  210. {{ if $ENABLE_VISITORS }}
  211. "visitors";
  212. {{ end }}
  213. }
  214. main_muc = "{{ $XMPP_MUC_DOMAIN }}"
  215. room_metadata_component = "metadata.{{ $XMPP_DOMAIN }}"
  216. {{ if $ENABLE_LOBBY }}
  217. lobby_muc = "lobby.{{ $XMPP_DOMAIN }}"
  218. {{ if $ENABLE_RECORDING }}
  219. muc_lobby_whitelist = { "{{ $XMPP_RECORDER_DOMAIN }}" }
  220. {{ end }}
  221. {{ end }}
  222. {{ if $PROSODY_RESERVATION_ENABLED }}
  223. reservations_api_prefix = "{{ $PROSODY_RESERVATION_REST_BASE_URL }}"
  224. {{ end }}
  225. {{ if $ENABLE_BREAKOUT_ROOMS }}
  226. breakout_rooms_muc = "breakout.{{ $XMPP_DOMAIN }}"
  227. {{ end }}
  228. speakerstats_component = "speakerstats.{{ $XMPP_DOMAIN }}"
  229. conference_duration_component = "conferenceduration.{{ $XMPP_DOMAIN }}"
  230. {{ if $ENABLE_END_CONFERENCE }}
  231. end_conference_component = "endconference.{{ $XMPP_DOMAIN }}"
  232. {{ end }}
  233. {{ if $ENABLE_AV_MODERATION }}
  234. av_moderation_component = "avmoderation.{{ $XMPP_DOMAIN }}"
  235. {{ end }}
  236. c2s_require_encryption = {{ $C2S_REQUIRE_ENCRYPTION }}
  237. {{ if $ENABLE_VISITORS -}}
  238. visitors_ignore_list = { "{{ $XMPP_RECORDER_DOMAIN }}" }
  239. {{ end }}
  240. {{ if .Env.XMPP_CONFIGURATION -}}
  241. {{ join "\n " (splitList "," .Env.XMPP_CONFIGURATION) }}
  242. {{ end -}}
  243. {{ if $ENABLE_GUEST_DOMAIN }}
  244. VirtualHost "{{ $XMPP_GUEST_DOMAIN }}"
  245. authentication = "{{ $GUEST_AUTH_TYPE }}"
  246. modules_enabled = {
  247. "ping";
  248. {{ if $ENABLE_XMPP_WEBSOCKET }}
  249. "smacks"; -- XEP-0198: Stream Management
  250. {{ end }}
  251. }
  252. c2s_require_encryption = {{ $C2S_REQUIRE_ENCRYPTION }}
  253. {{ if $ENABLE_VISITORS }}
  254. allow_anonymous_s2s = true
  255. {{ end }}
  256. {{ end }}
  257. VirtualHost "{{ $XMPP_AUTH_DOMAIN }}"
  258. ssl = {
  259. key = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.key";
  260. certificate = "/config/certs/{{ $XMPP_AUTH_DOMAIN }}.crt";
  261. }
  262. modules_enabled = {
  263. "limits_exception";
  264. "ping";
  265. }
  266. authentication = "internal_hashed"
  267. {{ if $ENABLE_RECORDING }}
  268. VirtualHost "{{ $XMPP_RECORDER_DOMAIN }}"
  269. modules_enabled = {
  270. "ping";
  271. "smacks";
  272. }
  273. authentication = "internal_hashed"
  274. {{ end }}
  275. Component "{{ $XMPP_INTERNAL_MUC_DOMAIN }}" "muc"
  276. storage = "memory"
  277. modules_enabled = {
  278. "ping";
  279. {{ if .Env.XMPP_INTERNAL_MUC_MODULES -}}
  280. "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}";
  281. {{ end -}}
  282. }
  283. restrict_room_creation = true
  284. muc_filter_whitelist="{{ $XMPP_AUTH_DOMAIN }}"
  285. muc_room_locking = false
  286. muc_room_default_public_jids = true
  287. muc_room_cache_size = 1000
  288. Component "{{ $XMPP_MUC_DOMAIN }}" "muc"
  289. restrict_room_creation = true
  290. storage = "memory"
  291. modules_enabled = {
  292. "muc_meeting_id";
  293. {{ if .Env.XMPP_MUC_MODULES -}}
  294. "{{ join "\";\n \"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
  295. {{ end -}}
  296. {{ if and $ENABLE_AUTH (or (eq $PROSODY_AUTH_TYPE "jwt") (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token")) -}}
  297. "{{ $JWT_TOKEN_AUTH_MODULE }}";
  298. {{ end }}
  299. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "matrix") $MATRIX_UVS_SYNC_POWER_LEVELS -}}
  300. "matrix_power_sync";
  301. {{ end -}}
  302. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token") $MATRIX_UVS_SYNC_POWER_LEVELS -}}
  303. "matrix_affiliation";
  304. {{ end -}}
  305. {{ if and $ENABLE_AUTH (eq $PROSODY_AUTH_TYPE "hybrid_matrix_token") $MATRIX_LOBBY_BYPASS -}}
  306. "matrix_lobby_bypass";
  307. {{ end -}}
  308. {{ if not $DISABLE_POLLS -}}
  309. "polls";
  310. {{ end -}}
  311. {{ if $ENABLE_SUBDOMAINS -}}
  312. "muc_domain_mapper";
  313. {{ end -}}
  314. {{ if $ENABLE_RATE_LIMITS -}}
  315. "muc_rate_limit";
  316. "rate_limit";
  317. {{ end -}}
  318. {{ if .Env.MAX_PARTICIPANTS }}
  319. "muc_max_occupants";
  320. {{ end }}
  321. "muc_password_whitelist";
  322. }
  323. {{ if $ENABLE_RATE_LIMITS -}}
  324. -- Max allowed join/login rate in events per second.
  325. rate_limit_login_rate = {{ $RATE_LIMIT_LOGIN_RATE }};
  326. -- The rate to which sessions from IPs exceeding the join rate will be limited, in bytes per second.
  327. rate_limit_session_rate = {{ $RATE_LIMIT_SESSION_RATE }};
  328. -- The time in seconds, after which the limit for an IP address is lifted.
  329. rate_limit_timeout = {{ $RATE_LIMIT_TIMEOUT }};
  330. -- List of regular expressions for IP addresses that are not limited by this module.
  331. rate_limit_whitelist = {
  332. "127.0.0.1";
  333. {{ range $index, $cidr := (splitList "," $RATE_LIMIT_ALLOW_RANGES) }}
  334. "{{ $cidr }}";
  335. {{ end }}
  336. };
  337. rate_limit_whitelist_jids = {
  338. "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}",
  339. "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}"
  340. }
  341. {{ end -}}
  342. -- The size of the cache that saves state for IP addresses
  343. rate_limit_cache_size = {{ $RATE_LIMIT_CACHE_SIZE }};
  344. muc_room_cache_size = 10000
  345. muc_room_locking = false
  346. muc_room_default_public_jids = true
  347. {{ if .Env.XMPP_MUC_CONFIGURATION -}}
  348. {{ join "\n " (splitList "," .Env.XMPP_MUC_CONFIGURATION) }}
  349. {{ end -}}
  350. {{ if .Env.MAX_PARTICIPANTS }}
  351. muc_access_whitelist = { "focus@{{ .Env.XMPP_AUTH_DOMAIN }}" }
  352. muc_max_occupants = "{{ .Env.MAX_PARTICIPANTS }}"
  353. {{ end }}
  354. muc_password_whitelist = {
  355. "focus@{{ .Env.XMPP_AUTH_DOMAIN }}";
  356. {{- if $ENABLE_RECORDING }}
  357. "{{ $JIBRI_RECORDER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  358. {{- end }}
  359. {{- if $ENABLE_TRANSCRIPTIONS }}
  360. "{{ $JIGASI_TRANSCRIBER_USER }}@{{ $XMPP_RECORDER_DOMAIN }}";
  361. {{- end }}
  362. }
  363. Component "focus.{{ $XMPP_DOMAIN }}" "client_proxy"
  364. target_address = "focus@{{ $XMPP_AUTH_DOMAIN }}"
  365. Component "speakerstats.{{ $XMPP_DOMAIN }}" "speakerstats_component"
  366. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  367. Component "conferenceduration.{{ $XMPP_DOMAIN }}" "conference_duration_component"
  368. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  369. {{ if $ENABLE_END_CONFERENCE }}
  370. Component "endconference.{{ $XMPP_DOMAIN }}" "end_conference"
  371. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  372. {{ end }}
  373. {{ if $ENABLE_AV_MODERATION }}
  374. Component "avmoderation.{{ $XMPP_DOMAIN }}" "av_moderation_component"
  375. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  376. {{ end }}
  377. {{ if $ENABLE_LOBBY }}
  378. Component "lobby.{{ $XMPP_DOMAIN }}" "muc"
  379. storage = "memory"
  380. restrict_room_creation = true
  381. muc_room_allow_persistent = false
  382. muc_room_cache_size = 10000
  383. muc_room_locking = false
  384. muc_room_default_public_jids = true
  385. modules_enabled = {
  386. {{ if $ENABLE_RATE_LIMITS -}}
  387. "muc_rate_limit";
  388. {{ end -}}
  389. {{ if .Env.XMPP_LOBBY_MUC_MODULES -}}
  390. "{{ join "\";\n \"" (splitList "," .Env.XMPP_LOBBY_MUC_MODULES) }}";
  391. {{ end -}}
  392. }
  393. {{ end }}
  394. {{ if $ENABLE_BREAKOUT_ROOMS }}
  395. Component "breakout.{{ $XMPP_DOMAIN }}" "muc"
  396. storage = "memory"
  397. restrict_room_creation = true
  398. muc_room_cache_size = 10000
  399. muc_room_locking = false
  400. muc_room_default_public_jids = true
  401. muc_room_allow_persistent = false
  402. modules_enabled = {
  403. "muc_meeting_id";
  404. {{ if not $DISABLE_POLLS -}}
  405. "polls";
  406. {{ end -}}
  407. {{ if $ENABLE_RATE_LIMITS -}}
  408. "muc_rate_limit";
  409. {{ end -}}
  410. {{ if .Env.XMPP_BREAKOUT_MUC_MODULES -}}
  411. "{{ join "\";\n \"" (splitList "," .Env.XMPP_BREAKOUT_MUC_MODULES) }}";
  412. {{ end -}}
  413. }
  414. {{ end }}
  415. Component "metadata.{{ $XMPP_DOMAIN }}" "room_metadata_component"
  416. muc_component = "{{ $XMPP_MUC_DOMAIN }}"
  417. breakout_rooms_component = "breakout.{{ $XMPP_DOMAIN }}"
  418. {{ if $ENABLE_VISITORS }}
  419. Component "visitors.{{ $XMPP_DOMAIN }}" "visitors_component"
  420. auto_allow_visitor_promotion = true
  421. {{ end }}