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