ejabberd.yml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. ###
  2. ### ejabberd configuration file
  3. ###
  4. ### The parameters used in this configuration file are explained at
  5. ###
  6. ### https://docs.ejabberd.im/admin/configuration
  7. ###
  8. ### The configuration file is written in YAML.
  9. ### *******************************************************
  10. ### ******* !!! WARNING !!! *******
  11. ### ******* YAML IS INDENTATION SENSITIVE *******
  12. ### ******* MAKE SURE YOU INDENT SECTIONS CORRECTLY *******
  13. ### *******************************************************
  14. ### Refer to http://en.wikipedia.org/wiki/YAML for the brief description.
  15. ###
  16. hosts:
  17. - "REPLACE_HOST_SERVICE"
  18. - "10.0.2.10"
  19. - localhost
  20. host_config:
  21. REPLACE_HOST_SERVICE:
  22. auth_method: [ldap]
  23. ldap_servers: ["ldap.sharix.ru"]
  24. ldap_port: 389
  25. ldap_rootdn: "cn=admin,dc=ldap,dc=sharix,dc=ru"
  26. ldap_password: "secret"
  27. ldap_filter: "(|(objectClass=handlerAccount)(objectClass=sharixAccount))"
  28. ldap_encrypt: none
  29. ldap_base: "dc=ldap,dc=sharix,dc=ru"
  30. certfiles:
  31. - /etc/ejabberd/ssl/fullchain.pem
  32. - /etc/ejabberd/ssl/privkey.pem
  33. loglevel: info
  34. listen:
  35. -
  36. port: 5222
  37. ip: "::"
  38. module: ejabberd_c2s
  39. max_stanza_size: 262144
  40. shaper: c2s_shaper
  41. access: c2s
  42. starttls_required: true
  43. -
  44. port: 5223
  45. ip: "::"
  46. tls: true
  47. module: ejabberd_c2s
  48. max_stanza_size: 262144
  49. shaper: c2s_shaper
  50. access: c2s
  51. starttls_required: true
  52. -
  53. port: 5269
  54. ip: "::"
  55. module: ejabberd_s2s_in
  56. max_stanza_size: 524288
  57. -
  58. port: 5443
  59. ip: "::"
  60. module: ejabberd_http
  61. tls: true
  62. request_handlers:
  63. /admin: ejabberd_web_admin
  64. /api: mod_http_api
  65. /bosh: mod_bosh
  66. /captcha: ejabberd_captcha
  67. /upload: mod_http_upload
  68. /ws: ejabberd_http_ws
  69. /pub/content: mod_http_fileserver
  70. -
  71. port: 5280
  72. ip: "::"
  73. module: ejabberd_http
  74. request_handlers:
  75. /bosh: mod_bosh
  76. /admin: ejabberd_web_admin
  77. /api: mod_http_api
  78. /upload: mod_http_upload
  79. /ws: ejabberd_http_ws
  80. /pub/content: mod_http_fileserver
  81. /.well-known/acme-challenge: ejabberd_acme
  82. -
  83. port: 3478
  84. ip: "::"
  85. transport: udp
  86. module: ejabberd_stun
  87. use_turn: true
  88. ## The server's public IPv4 address:
  89. # turn_ipv4_address: "203.0.113.3"
  90. ## The server's public IPv6 address:
  91. # turn_ipv6_address: "2001:db8::3"
  92. -
  93. port: 1883
  94. ip: "::"
  95. module: mod_mqtt
  96. backlog: 1000
  97. s2s_use_starttls: optional
  98. acme:
  99. auto: false
  100. ca_url: https://acme-v02.api.letsencrypt.org/directory
  101. acl:
  102. admin:
  103. user: "django_tickets@REPLACE_HOST_SERVICE"
  104. #user: "admin@REPLACE_HOST_SERVICE"
  105. users:
  106. user: all
  107. local:
  108. user_regexp: ""
  109. loopback:
  110. ip:
  111. - 127.0.0.0/8
  112. - 10.0.2.10/24
  113. - ::1/128
  114. access_rules:
  115. api_access:
  116. allow: user
  117. local:
  118. allow: local
  119. c2s:
  120. deny: blocked
  121. allow: all
  122. announce:
  123. allow: admin
  124. configure:
  125. allow: admin
  126. muc_create:
  127. allow: all
  128. pubsub_createnode:
  129. allow: local
  130. trusted_network:
  131. # allow: loopback
  132. allow: all
  133. api_permissions:
  134. "console commands":
  135. from:
  136. - ejabberd_ctl
  137. who: all
  138. what: "*"
  139. "admin access":
  140. who: all
  141. # access:
  142. # allow:
  143. # - acl: loopback
  144. # - acl: admin
  145. # - acl: all
  146. # oauth:
  147. # scope: "ejabberd:admin"
  148. # access:
  149. # allow:
  150. # - acl: loopback
  151. # - acl: admin
  152. # - acl: all
  153. what:
  154. - "*"
  155. - "!stop"
  156. - "!start"
  157. - send_message
  158. "public commands":
  159. who: all
  160. # ip: 127.0.0.1/8
  161. # ip: 10.0.2.10/24
  162. what:
  163. - "*"
  164. - "!stop"
  165. - "!start"
  166. - status
  167. - connected_users_number
  168. - send_message
  169. shaper:
  170. normal:
  171. rate: 3000
  172. burst_size: 20000
  173. fast: 100000
  174. shaper_rules:
  175. max_user_sessions: 10
  176. max_user_offline_messages:
  177. 5000: admin
  178. 100: all
  179. c2s_shaper:
  180. none: admin
  181. normal: all
  182. s2s_shaper: fast
  183. modules:
  184. mod_adhoc: {}
  185. mod_admin_extra: {}
  186. mod_announce:
  187. access: announce
  188. mod_avatar: {}
  189. mod_blocking: {}
  190. mod_bosh: {}
  191. mod_caps: {}
  192. mod_carboncopy: {}
  193. mod_client_state: {}
  194. mod_configure: {}
  195. mod_disco: {}
  196. mod_fail2ban: {}
  197. mod_http_api: {}
  198. mod_http_upload:
  199. access: all
  200. max_size: 5242880
  201. put_url: https://@HOST@:5443/upload
  202. custom_headers:
  203. "Access-Control-Allow-Origin": "https://@HOST@"
  204. "Access-Control-Allow-Methods": "GET,HEAD,PUT,OPTIONS"
  205. "Access-Control-Allow-Headers": "Content-Type"
  206. mod_last: {}
  207. mod_mam:
  208. ## Mnesia is limited to 2GB, better to use an SQL backend
  209. ## For small servers SQLite is a good fit and is very easy
  210. ## to configure. Uncomment this when you have SQL configured:
  211. ## db_type: sql
  212. assume_mam_usage: true
  213. default: always
  214. mod_mqtt: {}
  215. mod_muc:
  216. # Service name
  217. hosts:
  218. - "chat.REPLACE_HOST_SERVICE"
  219. access:
  220. - allow
  221. access_admin:
  222. - allow: admin
  223. access_create: muc_create
  224. access_persistent: muc_create
  225. access_mam:
  226. - allow
  227. history_size: 1000
  228. default_room_options:
  229. mam: true
  230. persistent: true
  231. public: true
  232. members_only: false
  233. allow_visitor_nickchange: true
  234. allow_user_invites: true
  235. allow_subscription: true
  236. max_users: 1000
  237. mod_muc_admin: {}
  238. mod_offline:
  239. access_max_user_messages: max_user_offline_messages
  240. mod_ping: {}
  241. mod_privacy: {}
  242. mod_private: {}
  243. mod_proxy65:
  244. access: local
  245. max_connections: 5
  246. mod_pubsub:
  247. access_createnode: pubsub_createnode
  248. plugins:
  249. - flat
  250. - pep
  251. force_node_config:
  252. ## Avoid buggy clients to make their bookmarks public
  253. storage:bookmarks:
  254. access_model: whitelist
  255. mod_push: {}
  256. mod_push_keepalive: {}
  257. mod_register:
  258. ## Only accept registration requests from the "trusted"
  259. ## network (see access_rules section above).
  260. ## Think twice before enabling registration from any
  261. ## address. See the Jabber SPAM Manifesto for details:
  262. ## https://github.com/ge0rg/jabber-spam-fighting-manifesto
  263. ip_access: trusted_network
  264. mod_roster:
  265. versioning: true
  266. mod_s2s_dialback: {}
  267. mod_shared_roster: {}
  268. mod_stream_mgmt:
  269. resend_on_timeout: if_offline
  270. mod_stun_disco: {}
  271. mod_vcard: {}
  272. mod_vcard_xupdate: {}
  273. mod_version:
  274. show_os: false
  275. mod_http_fileserver:
  276. docroot: /var/www/webapps/jabber_data
  277. accesslog: /var/log/ejabberd/access.log
  278. content_types:
  279. .png: image/png
  280. .jpg: image/jpg
  281. .dng: image/dng
  282. .heic: image/heic
  283. .pdf: application/pdf
  284. .xml: application/xml
  285. default_content_type: image/jpg
  286. ### Local Variables:
  287. ### mode: yaml
  288. ### End:
  289. ### vim: set filetype=yaml tabstop=8