jitsi-meet.cfg.lua 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. admins = {
  2. "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}",
  3. "{{ .Env.JVB_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}"
  4. }
  5. plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }
  6. http_default_host = "{{ .Env.XMPP_DOMAIN }}"
  7. {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
  8. {{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool)}}
  9. {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
  10. {{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" }}
  11. {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool }}
  12. {{ $JWT_AUTH_TYPE := .Env.JWT_AUTH_TYPE | default "token" }}
  13. {{ $JWT_TOKEN_AUTH_MODULE := .Env.JWT_TOKEN_AUTH_MODULE | default "token_verification" }}
  14. {{ $ENABLE_LOBBY := .Env.ENABLE_LOBBY | default "0" | toBool }}
  15. {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }}
  16. {{ $PUBLIC_URL := .Env.PUBLIC_URL | default "https://localhost:8443" -}}
  17. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_ISSUERS }}
  18. asap_accepted_issuers = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_ISSUERS) }}" }
  19. {{ end }}
  20. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") .Env.JWT_ACCEPTED_AUDIENCES }}
  21. asap_accepted_audiences = { "{{ join "\",\"" (splitList "," .Env.JWT_ACCEPTED_AUDIENCES) }}" }
  22. {{ end }}
  23. {{ if $ENABLE_XMPP_WEBSOCKET }}
  24. -- Deprecated in 0.12
  25. -- https://github.com/bjc/prosody/commit/26542811eafd9c708a130272d7b7de77b92712de
  26. cross_domain_websocket = { "{{ $PUBLIC_URL }}" };
  27. consider_bosh_secure = true;
  28. {{ end }}
  29. VirtualHost "{{ .Env.XMPP_DOMAIN }}"
  30. {{ if $ENABLE_AUTH }}
  31. {{ if eq $AUTH_TYPE "jwt" }}
  32. authentication = "{{ $JWT_AUTH_TYPE }}"
  33. app_id = "{{ .Env.JWT_APP_ID }}"
  34. app_secret = "{{ .Env.JWT_APP_SECRET }}"
  35. allow_empty_token = {{ if $JWT_ALLOW_EMPTY }}true{{ else }}false{{ end }}
  36. {{ if $JWT_ASAP_KEYSERVER }}
  37. asap_key_server = "{{ .Env.JWT_ASAP_KEYSERVER }}"
  38. {{ end }}
  39. {{ else if eq $AUTH_TYPE "ldap" }}
  40. authentication = "cyrus"
  41. cyrus_application_name = "xmpp"
  42. allow_unencrypted_plain_auth = true
  43. {{ else if eq $AUTH_TYPE "internal" }}
  44. authentication = "internal_hashed"
  45. {{ end }}
  46. {{ else }}
  47. -- https://github.com/jitsi/docker-jitsi-meet/pull/502#issuecomment-619146339
  48. {{ if $ENABLE_XMPP_WEBSOCKET }}
  49. authentication = "token"
  50. {{ else }}
  51. authentication = "anonymous"
  52. {{ end }}
  53. app_id = ""
  54. app_secret = ""
  55. allow_empty_token = true
  56. {{ end }}
  57. ssl = {
  58. key = "/config/certs/{{ .Env.XMPP_DOMAIN }}.key";
  59. certificate = "/config/certs/{{ .Env.XMPP_DOMAIN }}.crt";
  60. }
  61. modules_enabled = {
  62. "bosh";
  63. {{ if $ENABLE_XMPP_WEBSOCKET }}
  64. "websocket";
  65. "smacks"; -- XEP-0198: Stream Management
  66. {{ end }}
  67. "pubsub";
  68. "ping";
  69. "speakerstats";
  70. "conference_duration";
  71. {{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }}
  72. "muc_lobby_rooms";
  73. {{ end }}
  74. {{ if .Env.XMPP_MODULES }}
  75. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}";
  76. {{ end }}
  77. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "ldap") }}
  78. "auth_cyrus";
  79. {{end}}
  80. }
  81. {{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }}
  82. main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}"
  83. lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}"
  84. {{ if .Env.XMPP_RECORDER_DOMAIN }}
  85. muc_lobby_whitelist = { "{{ .Env.XMPP_RECORDER_DOMAIN }}" }
  86. {{ end }}
  87. {{ end }}
  88. speakerstats_component = "speakerstats.{{ .Env.XMPP_DOMAIN }}"
  89. conference_duration_component = "conferenceduration.{{ .Env.XMPP_DOMAIN }}"
  90. c2s_require_encryption = false
  91. {{ if $ENABLE_GUEST_DOMAIN }}
  92. VirtualHost "{{ .Env.XMPP_GUEST_DOMAIN }}"
  93. -- https://github.com/jitsi/docker-jitsi-meet/pull/502#issuecomment-619146339
  94. {{ if $ENABLE_XMPP_WEBSOCKET }}
  95. authentication = "token"
  96. {{ else }}
  97. authentication = "anonymous"
  98. {{ end }}
  99. app_id = ""
  100. app_secret = ""
  101. allow_empty_token = true
  102. c2s_require_encryption = false
  103. {{ if $ENABLE_LOBBY }}
  104. modules_enabled = {
  105. "muc_lobby_rooms";
  106. }
  107. main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}"
  108. lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}"
  109. {{ if .Env.XMPP_RECORDER_DOMAIN }}
  110. muc_lobby_whitelist = { "{{ .Env.XMPP_RECORDER_DOMAIN }}" }
  111. {{ end }}
  112. {{ end }}
  113. {{ end }}
  114. VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}"
  115. ssl = {
  116. key = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.key";
  117. certificate = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.crt";
  118. }
  119. authentication = "internal_hashed"
  120. {{ if .Env.XMPP_RECORDER_DOMAIN }}
  121. VirtualHost "{{ .Env.XMPP_RECORDER_DOMAIN }}"
  122. modules_enabled = {
  123. "ping";
  124. }
  125. authentication = "internal_hashed"
  126. {{ end }}
  127. Component "{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}" "muc"
  128. storage = "memory"
  129. modules_enabled = {
  130. "ping";
  131. {{ if .Env.XMPP_INTERNAL_MUC_MODULES }}
  132. "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}";
  133. {{ end }}
  134. }
  135. muc_room_locking = false
  136. muc_room_default_public_jids = true
  137. Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc"
  138. storage = "memory"
  139. modules_enabled = {
  140. "muc_meeting_id";
  141. {{ if .Env.XMPP_MUC_MODULES }}
  142. "{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
  143. {{ end }}
  144. {{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") }}
  145. "{{ $JWT_TOKEN_AUTH_MODULE }}";
  146. {{ end }}
  147. }
  148. muc_room_cache_size = 1000
  149. muc_room_locking = false
  150. muc_room_default_public_jids = true
  151. Component "focus.{{ .Env.XMPP_DOMAIN }}"
  152. component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}"
  153. Component "speakerstats.{{ .Env.XMPP_DOMAIN }}" "speakerstats_component"
  154. muc_component = "{{ .Env.XMPP_MUC_DOMAIN }}"
  155. Component "conferenceduration.{{ .Env.XMPP_DOMAIN }}" "conference_duration_component"
  156. muc_component = "{{ .Env.XMPP_MUC_DOMAIN }}"
  157. {{ if $ENABLE_LOBBY }}
  158. Component "lobby.{{ .Env.XMPP_DOMAIN }}" "muc"
  159. storage = "memory"
  160. restrict_room_creation = true
  161. muc_room_locking = false
  162. muc_room_default_public_jids = true
  163. {{ end }}