jitsi-meet.cfg.lua 6.1 KB

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