2
0

jitsi-meet.cfg.lua 6.4 KB

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