summaryrefslogtreecommitdiff
path: root/ejabberd/ejabberd.yml
blob: 5cbe8de8e2d78c995010fa0ae41ad0d92f761e03 (plain)
  1. ###
  2. ###               ejabberd configuration file
  3. ###
  4. ###
  5. ### The parameters used in this configuration file are explained in more detail
  6. ### in the ejabberd Installation and Operation Guide.
  7. ### Please consult the Guide in case of doubts, it is included with
  8. ### your copy of ejabberd, and is also available online at
  9. ### http://www.process-one.net/en/ejabberd/docs/
  10. ### The configuration file is written in YAML.
  11. ### Refer to http://en.wikipedia.org/wiki/YAML for the brief description.
  12. ### However, ejabberd treats different literals as different types:
  13. ###
  14. ### - unquoted or single-quoted strings. They are called "atoms".
  15. ### Example: dog, 'Jupiter', '3.14159', YELLOW
  16. ###
  17. ### - numeric literals. Example: 3, -45.0, .0
  18. ###
  19. ### - quoted or folded strings.
  20. ### Examples of quoted string: "Lizzard", "orange".
  21. ### Example of folded string:
  22. ### > Art thou not Romeo,
  23. ### and a Montague?
  24. ### =======
  25. ### LOGGING
  26. ##
  27. ## loglevel: Verbosity of log files generated by ejabberd.
  28. ## 0: No ejabberd log at all (not recommended)
  29. ## 1: Critical
  30. ## 2: Error
  31. ## 3: Warning
  32. ## 4: Info
  33. ## 5: Debug
  34. ##
  35. loglevel: 4
  36. ##
  37. ## rotation: Disable ejabberd's internal log rotation, as the Debian package
  38. ## uses logrotate(8).
  39. log_rotate_size: 0
  40. log_rotate_date: ""
  41. ##
  42. ## overload protection: If you want to limit the number of messages per second
  43. ## allowed from error_logger, which is a good idea if you want to avoid a flood
  44. ## of messages when system is overloaded, you can set a limit.
  45. ## 100 is ejabberd's default.
  46. log_rate_limit: 100
  47. ##
  48. ## watchdog_admins: Only useful for developers: if an ejabberd process
  49. ## consumes a lot of memory, send live notifications to these XMPP
  50. ## accounts.
  51. ##
  52. ## watchdog_admins:
  53. ## - "bob@example.com"
  54. ### ================
  55. ### SERVED HOSTNAMES
  56. ##
  57. ## hosts: Domains served by ejabberd.
  58. ## You can define one or several, for example:
  59. ## hosts:
  60. ## - "example.net"
  61. ## - "example.com"
  62. ## - "example.org"
  63. ##
  64. hosts:
  65. - "example.org"
  66. - "guest.example.org"
  67. ##
  68. ## route_subdomains: Delegate subdomains to other XMPP servers.
  69. ## For example, if this ejabberd serves example.org and you want
  70. ## to allow communication with an XMPP server called im.example.org.
  71. ##
  72. ## route_subdomains: s2s
  73. ### ===============
  74. ### LISTENING PORTS
  75. ##
  76. ## listen: The ports ejabberd will listen on, which service each is handled
  77. ## by and what options to start it with.
  78. ##
  79. listen:
  80. -
  81. port: 5222
  82. ip: "::"
  83. module: ejabberd_c2s
  84. ##
  85. ## If TLS is compiled in and you installed a SSL
  86. ## certificate, specify the full path to the
  87. ## file and uncomment this line:
  88. ##
  89. certfile: "/etc/ejabberd/chat.example.org.pem"
  90. starttls_required: true
  91. ##
  92. ## Custom OpenSSL options
  93. ##
  94. protocol_options:
  95. - "no_sslv3"
  96. - "no_tlsv1"
  97. max_stanza_size: 65536
  98. shaper: c2s_shaper
  99. access: c2s
  100. -
  101. port: 5269
  102. ip: "::"
  103. module: ejabberd_s2s_in
  104. ##
  105. ## ejabberd_service: Interact with external components (transports, ...)
  106. ##
  107. ## -
  108. ## port: 8888
  109. ## module: ejabberd_service
  110. ## access: all
  111. ## shaper_rule: fast
  112. ## ip: "127.0.0.1"
  113. ## hosts:
  114. ## "icq.example.org":
  115. ## password: "secret"
  116. ## "sms.example.org":
  117. ## password: "secret"
  118. ##
  119. ## ejabberd_stun: Handles STUN Binding requests
  120. ##
  121. ## -
  122. ## port: 3478
  123. ## transport: udp
  124. ## module: ejabberd_stun
  125. ##
  126. ## To handle XML-RPC requests that provide admin credentials:
  127. ##
  128. ## -
  129. ## port: 4560
  130. ## module: ejabberd_xmlrpc
  131. -
  132. port: 5280
  133. ip: "::"
  134. module: ejabberd_http
  135. ## request_handlers:
  136. ## "/pub/archive": mod_http_fileserver
  137. web_admin: false
  138. http_poll: false
  139. http_bind: true
  140. ## register: true
  141. captcha: false
  142. -
  143. port: 3478
  144. transport: udp
  145. module: ejabberd_stun
  146. -
  147. port: 3478
  148. module: ejabberd_stun
  149. -
  150. port: 5349
  151. module: ejabberd_stun
  152. certfile: "/etc/ejabberd/chat.example.org.pem"
  153. tls: true
  154. turn_ip: "188.183.5.254"
  155. auth_type: user
  156. auth_realm: "EXAMPLE.ORG"
  157. ## -
  158. ## port: 5060
  159. ## transport: udp
  160. ## module: ejabberd_sip
  161. ## -
  162. ## port: 5060
  163. ## module: ejabberd_sip
  164. -
  165. port: 5061
  166. module: ejabberd_sip
  167. certfile: "/etc/ejabberd/chat.example.org.pem"
  168. tls: true
  169. ##
  170. ## s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
  171. ## Allowed values are: false optional required required_trusted
  172. ## You must specify a certificate file.
  173. ##
  174. ## s2s_use_starttls: optional
  175. s2s_use_starttls: optional
  176. ##
  177. ## s2s_certfile: Specify a certificate file.
  178. ##
  179. ## s2s_certfile: "/path/to/ssl.pem"
  180. s2s_certfile: "/etc/ejabberd/chat.example.org.pem"
  181. ## Custom OpenSSL options
  182. ##
  183. ## s2s_protocol_options:
  184. ## - "no_sslv3"
  185. ## - "no_tlsv1"
  186. s2s_protocol_options:
  187. - "no_sslv3"
  188. - "no_tlsv1"
  189. ##
  190. ## domain_certfile: Specify a different certificate for each served hostname.
  191. ##
  192. ## host_config:
  193. ## "example.org":
  194. ## domain_certfile: "/path/to/example_org.pem"
  195. ## "example.com":
  196. ## domain_certfile: "/path/to/example_com.pem"
  197. ##
  198. ## S2S whitelist or blacklist
  199. ##
  200. ## Default s2s policy for undefined hosts.
  201. ##
  202. ## s2s_access: s2s
  203. ##
  204. ## Outgoing S2S options
  205. ##
  206. ## Preferred address families (which to try first) and connect timeout
  207. ## in milliseconds.
  208. ##
  209. ## outgoing_s2s_families:
  210. ## - ipv4
  211. ## - ipv6
  212. ## outgoing_s2s_timeout: 10000
  213. ### ==============
  214. ### AUTHENTICATION
  215. ##
  216. ## auth_method: Method used to authenticate the users.
  217. ## The default method is the internal.
  218. ## If you want to use a different method,
  219. ## comment this line and enable the correct ones.
  220. ##
  221. auth_method: internal
  222. ##
  223. ## Store the plain passwords or hashed for SCRAM:
  224. ## auth_password_format: plain
  225. ## auth_password_format: scram
  226. ##
  227. ## Define the FQDN if ejabberd doesn't detect it:
  228. ## fqdn: "server3.example.com"
  229. ##
  230. ## Authentication using external script
  231. ## Make sure the script is executable by ejabberd.
  232. ##
  233. ## auth_method: external
  234. ## extauth_program: "/path/to/authentication/script"
  235. ##
  236. ## Authentication using ODBC
  237. ## Remember to setup a database in the next section.
  238. ##
  239. ## auth_method: odbc
  240. ##
  241. ## Authentication using PAM
  242. ##
  243. ## auth_method: pam
  244. ## pam_service: "pamservicename"
  245. ##
  246. ## Authentication using LDAP
  247. ##
  248. ## auth_method: ldap
  249. ##
  250. ## List of LDAP servers:
  251. ## ldap_servers:
  252. ## - "localhost"
  253. ##
  254. ## Encryption of connection to LDAP servers:
  255. ## ldap_encrypt: none
  256. ## ldap_encrypt: tls
  257. ##
  258. ## Port to connect to on LDAP servers:
  259. ## ldap_port: 389
  260. ## ldap_port: 636
  261. ##
  262. ## LDAP manager:
  263. ## ldap_rootdn: "dc=example,dc=com"
  264. ##
  265. ## Password of LDAP manager:
  266. ## ldap_password: "******"
  267. ##
  268. ## Search base of LDAP directory:
  269. ## ldap_base: "dc=example,dc=com"
  270. ##
  271. ## LDAP attribute that holds user ID:
  272. ## ldap_uids:
  273. ## - "mail": "%u@mail.example.org"
  274. ##
  275. ## LDAP filter:
  276. ## ldap_filter: "(objectClass=shadowAccount)"
  277. ##
  278. ## Anonymous login support:
  279. ## auth_method: anonymous
  280. ## anonymous_protocol: sasl_anon | login_anon | both
  281. ## allow_multiple_connections: true | false
  282. ##
  283. ## host_config:
  284. ## "public.example.org":
  285. ## auth_method: anonymous
  286. ## allow_multiple_connections: false
  287. ## anonymous_protocol: sasl_anon
  288. ##
  289. ## To use both anonymous and internal authentication:
  290. ##
  291. ## host_config:
  292. ## "public.example.org":
  293. ## auth_method:
  294. ## - internal
  295. ## - anonymous
  296. host_config:
  297. "example.org":
  298. auth_method:
  299. - pam
  300. "guest.example.org":
  301. auth_method: anonymous
  302. allow_multiple_connections: true
  303. anonymous_protocol: both
  304. ### ==============
  305. ### DATABASE SETUP
  306. ## ejabberd by default uses the internal Mnesia database,
  307. ## so you do not necessarily need this section.
  308. ## This section provides configuration examples in case
  309. ## you want to use other database backends.
  310. ## Please consult the ejabberd Guide for details on database creation.
  311. ##
  312. ## MySQL server:
  313. ##
  314. ## odbc_type: mysql
  315. ## odbc_server: "server"
  316. ## odbc_database: "database"
  317. ## odbc_username: "username"
  318. ## odbc_password: "password"
  319. ##
  320. ## If you want to specify the port:
  321. ## odbc_port: 1234
  322. ##
  323. ## PostgreSQL server:
  324. ##
  325. ## odbc_type: pgsql
  326. ## odbc_server: "server"
  327. ## odbc_database: "database"
  328. ## odbc_username: "username"
  329. ## odbc_password: "password"
  330. ##
  331. ## If you want to specify the port:
  332. ## odbc_port: 1234
  333. ##
  334. ## If you use PostgreSQL, have a large database, and need a
  335. ## faster but inexact replacement for "select count(*) from users"
  336. ##
  337. ## pgsql_users_number_estimate: true
  338. ##
  339. ## ODBC compatible or MSSQL server:
  340. ##
  341. ## odbc_type: odbc
  342. ## odbc_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"
  343. ##
  344. ## Number of connections to open to the database for each virtual host
  345. ##
  346. ## odbc_pool_size: 10
  347. ##
  348. ## Interval to make a dummy SQL request to keep the connections to the
  349. ## database alive. Specify in seconds: for example 28800 means 8 hours
  350. ##
  351. ## odbc_keepalive_interval: undefined
  352. ### ===============
  353. ### TRAFFIC SHAPERS
  354. shaper:
  355. ##
  356. ## The "normal" shaper limits traffic speed to 1000 B/s
  357. ##
  358. normal: 1000
  359. ##
  360. ## The "fast" shaper limits traffic speed to 50000 B/s
  361. ##
  362. fast: 50000
  363. ##
  364. ## This option specifies the maximum number of elements in the queue
  365. ## of the FSM. Refer to the documentation for details.
  366. ##
  367. max_fsm_queue: 1000
  368. ###. ====================
  369. ###' ACCESS CONTROL LISTS
  370. acl:
  371. ##
  372. ## The 'admin' ACL grants administrative privileges to XMPP accounts.
  373. ## You can put here as many accounts as you want.
  374. ##
  375. admin:
  376. user:
  377. - "": "localhost"
  378. ##
  379. ## Blocked users
  380. ##
  381. ## blocked:
  382. ## user:
  383. ## - "baduser": "example.org"
  384. ## - "test"
  385. ## Local users: don't modify this.
  386. ##
  387. local:
  388. user_regexp: ""
  389. ##
  390. ## More examples of ACLs
  391. ##
  392. ## jabberorg:
  393. ## server:
  394. ## - "jabber.org"
  395. ## aleksey:
  396. ## user:
  397. ## - "aleksey": "jabber.ru"
  398. ## test:
  399. ## user_regexp: "^test"
  400. ## user_glob: "test*"
  401. ##
  402. ## Loopback network
  403. ##
  404. loopback:
  405. ip:
  406. - "127.0.0.0/8"
  407. ##
  408. ## Bad XMPP servers
  409. ##
  410. ## bad_servers:
  411. ## server:
  412. ## - "xmpp.zombie.org"
  413. ## - "xmpp.spam.com"
  414. ##
  415. ## Define specific ACLs in a virtual host.
  416. ##
  417. ## host_config:
  418. ## "localhost":
  419. ## acl:
  420. ## admin:
  421. ## user:
  422. ## - "bob-local": "localhost"
  423. ### ============
  424. ### ACCESS RULES
  425. access:
  426. ## Maximum number of simultaneous sessions allowed for a single user:
  427. max_user_sessions:
  428. all: 10
  429. ## Maximum number of offline messages that users can have:
  430. max_user_offline_messages:
  431. admin: 5000
  432. all: 100
  433. ## This rule allows access only for local users:
  434. local:
  435. local: allow
  436. ## Only non-blocked users can use c2s connections:
  437. c2s:
  438. blocked: deny
  439. all: allow
  440. ## For C2S connections, all users except admins use the "normal" shaper
  441. c2s_shaper:
  442. admin: none
  443. all: normal
  444. ## All S2S connections use the "fast" shaper
  445. s2s_shaper:
  446. all: fast
  447. ## Only admins can send announcement messages:
  448. announce:
  449. admin: allow
  450. ## Only admins can use the configuration interface:
  451. configure:
  452. admin: allow
  453. ## Admins of this server are also admins of the MUC service:
  454. muc_admin:
  455. admin: allow
  456. ## Only accounts of the local ejabberd server can create rooms:
  457. muc_create:
  458. local: allow
  459. ## All users are allowed to use the MUC service:
  460. muc:
  461. all: allow
  462. ## Only accounts on the local ejabberd server can create Pubsub nodes:
  463. pubsub_createnode:
  464. local: allow
  465. ## In-band registration allows registration of any possible username.
  466. ## To disable in-band registration, replace 'allow' with 'deny'.
  467. register:
  468. all: deny
  469. ## Only allow to register from localhost
  470. trusted_network:
  471. loopback: allow
  472. ## Do not establish S2S connections with bad servers
  473. ## s2s:
  474. ## bad_servers: deny
  475. ## all: allow
  476. ## By default the frequency of account registrations from the same IP
  477. ## is limited to 1 account every 10 minutes. To disable, specify: infinity
  478. ## registration_timeout: 600
  479. ##
  480. ## Define specific Access Rules in a virtual host.
  481. ##
  482. ## host_config:
  483. ## "localhost":
  484. ## access:
  485. ## c2s:
  486. ## admin: allow
  487. ## all: deny
  488. ## register:
  489. ## all: deny
  490. ### ================
  491. ### DEFAULT LANGUAGE
  492. ##
  493. ## language: Default language used for server messages.
  494. ##
  495. language: "en"
  496. ##
  497. ## Set a different default language in a virtual host.
  498. ##
  499. ## host_config:
  500. ## "localhost":
  501. ## language: "ru"
  502. ### =======
  503. ### CAPTCHA
  504. ##
  505. ## Full path to a script that generates the image.
  506. ##
  507. ## captcha_cmd: "/lib/ejabberd/priv/bin/captcha.sh"
  508. ##
  509. ## Host for the URL and port where ejabberd listens for CAPTCHA requests.
  510. ##
  511. ## captcha_host: "example.org:5280"
  512. ##
  513. ## Limit CAPTCHA calls per minute for JID/IP to avoid DoS.
  514. ##
  515. ## captcha_limit: 5
  516. ### =======
  517. ### MODULES
  518. ##
  519. ## Modules enabled in all ejabberd virtual hosts.
  520. ##
  521. modules:
  522. mod_adhoc: {}
  523. mod_announce: # recommends mod_adhoc
  524. access: announce
  525. mod_blocking: {} # requires mod_privacy
  526. mod_caps: {}
  527. mod_carboncopy: {}
  528. mod_configure: {} # requires mod_adhoc
  529. mod_disco: {}
  530. ## mod_echo: {}
  531. mod_irc: {}
  532. mod_http_bind: {}
  533. ## mod_http_fileserver:
  534. ## docroot: "/var/www"
  535. ## accesslog: "/var/log/ejabberd/access.log"
  536. mod_last: {}
  537. mod_muc:
  538. host: "conference.example.org"
  539. access: muc
  540. access_create: muc_create
  541. access_persistent: muc_create
  542. access_admin: muc_admin
  543. ## mod_muc_log: {}
  544. mod_offline:
  545. access_max_user_messages: max_user_offline_messages
  546. mod_ping: {}
  547. ## mod_pres_counter:
  548. ## count: 5
  549. ## interval: 60
  550. mod_privacy: {}
  551. mod_private: {}
  552. ## mod_proxy65: {}
  553. mod_pubsub:
  554. access_createnode: pubsub_createnode
  555. ## reduces resource comsumption, but XEP incompliant
  556. ignore_pep_from_offline: true
  557. ## XEP compliant, but increases resource comsumption
  558. ## ignore_pep_from_offline: false
  559. last_item_cache: false
  560. plugins:
  561. - "flat"
  562. - "hometree"
  563. - "pep" # pep requires mod_caps
  564. mod_register:
  565. ##
  566. ## Protect In-Band account registrations with CAPTCHA.
  567. ##
  568. ## captcha_protected: true
  569. ##
  570. ## Set the minimum informational entropy for passwords.
  571. ##
  572. ## password_strength: 32
  573. ##
  574. ## After successful registration, the user receives
  575. ## a message with this subject and body.
  576. ##
  577. welcome_message:
  578. subject: "Welcome!"
  579. body: |-
  580. Hi.
  581. Welcome to this XMPP server.
  582. ##
  583. ## When a user registers, send a notification to
  584. ## these XMPP accounts.
  585. ##
  586. ## registration_watchers:
  587. ## - "admin1@example.org"
  588. ##
  589. ## Only clients in the server machine can register accounts
  590. ##
  591. ip_access: trusted_network
  592. ##
  593. ## Local c2s or remote s2s users cannot register accounts
  594. ##
  595. access_from: deny
  596. access: register
  597. mod_roster: {}
  598. mod_shared_roster: {}
  599. mod_sip: {}
  600. mod_stats: {}
  601. mod_time: {}
  602. mod_vcard: {}
  603. mod_version: {}
  604. ##
  605. ## Enable modules with custom options in a specific virtual host
  606. ##
  607. ## append_host_config:
  608. ## "localhost":
  609. ## modules:
  610. ## mod_echo:
  611. ## host: "mirror.localhost"
  612. ### Local Variables:
  613. ### mode: yaml
  614. ### End:
  615. ### vim: set filetype=yaml tabstop=8