jitsi-meet.cfg.lua 6.4 KB

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