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