EJABBERD.YML(5)
๐ ejabberd.yml(5) โ main configuration file for ejabberd ๐
๐ NAME ๐
ejabberd.yml โ main configuration file for ejabberd.
โจ SYNOPSIS โจ
ejabberd.yml
๐ธ DESCRIPTION ๐ธ
Okay so bestie, the configuration file is written in YAML language. That's the vibe.
โ ๏ธ Warning: YAML is indentation sensitive, so make sure you respect indentation, or otherwise you will get pretty cryptic configuration errors. Fr fr, one wrong space and it's giving why is my server crying ๐ญ.
Logically, configuration options are split into 3 main categories: Modules, Listeners and everything else called Top Level options. Thus this document is split into 3 main chapters describing each category separately. So, the contents of ejabberd.yml will typically look like this:
hosts:
- example.com
- domain.tld
loglevel: info
...
listen:
-
port: 5222
module: ejabberd_c2s
...
modules:
mod_roster: {}
...
Any configuration error (such as syntax error, unknown option or invalid option value) is fatal in the sense that ejabberd will refuse to load the whole configuration file and will not start or will abort configuration reload. Not me being dramatic โ that's just the rules ๐ .
All options can be changed in runtime by running ejabberdctl reload-config command. Configuration reload is atomic: either all options are accepted and applied simultaneously or the new configuration is refused without any impact on currently running configuration. It's giving all-or-nothing, and honestly? Iconic.
Some options can be specified for particular virtual host(s) only using host_config or append_host_config options. Such options are called local. Examples are modules, auth_method and default_db. The options that cannot be defined per virtual host are called global. Examples are loglevel, certfiles and listen. It is a configuration mistake to put global options under host_config or append_host_config section - ejabberd will refuse to load such configuration. So don't try it, bestie โ it's not that girl.
It is not recommended to write ejabberd.yml from scratch. Instead it is better to start from "default" configuration file available at https://github.com/processone/ejabberd/blob/26.09/ejabberd.yml.example. Once you get ejabberd running you can start changing configuration options to meet your requirements.
Note that this document is intended to provide comprehensive description of all configuration options that can be consulted to understand the meaning of a particular option, its format and possible values. It will be quite hard to understand how to configure ejabberd by reading this document only - for this purpose the reader is recommended to read online Configuration Guide available at https://docs.ejabberd.im/admin/configuration.
๐ TOP LEVEL OPTIONS ๐
This section describes top level options of ejabberd 26.09. The options that changed in this version are marked with ๐ .
access_rules: {AccessName: {allow|deny: ACLName|ACLDefinition}}โ This option defines basic.md#access-rules|Access Rules. Each access rule is assigned a name that can be referenced from other parts of the configuration file (mostly fromaccessoptions of ejabberd modules). Each rule definition may contain arbitrary number ofallowordenysections, and each section may contain any number of ACL rules (seeacloption). There are no access rules defined by default.
Example:
access_rules:
configure:
allow: admin
something:
deny: someone
allow: all
s2s_banned:
deny: problematic_hosts
deny: banned_forever
deny:
ip: 222.111.222.111/32
deny:
ip: 111.222.111.222/32
allow: all
xmlrpc_access:
allow:
user: peter@example.com
allow:
user: ivone@example.com
allow:
user: bot@example.com
ip: 10.0.0.0/24
acl: {ACLName: {ACLType: ACLValue}}โ This option defines ../configuration/basic.md#acl|access control lists: named sets of rules which are used to match against different targets (such as a JID or an IP address). Every set of rules has nameACLName: it can be any string exceptallornone(those are predefined names for the rules that match all or nothing respectively). The nameACLNamecan be referenced from other parts of the configuration file, for example inaccess_rulesoption. The rules ofACLNameare represented by mapping{ACLType: ACLValue}. These can be one of the following:ip: Networkโ The rule matches any IP address from theNetwork.node_glob: Patternโ Same asnode_regexp, but matching is performed on a specifiedPatternaccording to the rules used by the Unix shell.node_regexp: user_regexp@server_regexpโ The rule matches any JID with node part matching regular expressionuser_regexpand server part matching regular expressionserver_regexp.resource: Resourceโ The rule matches any JID with a resourceResource.resource_glob: Patternโ Same asresource_regexp, but matching is performed on a specifiedPatternaccording to the rules used by the Unix shell.resource_regexp: Regexpโ The rule matches any JID with a resource that matches regular expressionRegexp.server: Serverโ The rule matches any JID from serverServer. The value ofServermust be a valid hostname or an IP address.server_glob: Patternโ Same asserver_regexp, but matching is performed on a specifiedPatternaccording to the rules used by the Unix shell.server_regexp: Regexpโ The rule matches any JID from the server that matches regular expressionRegexp.user: Usernameโ IfUsernameis in the form of"user@server", the rule matches a JID against this value. Otherwise, ifUsernameis in the form of"user", the rule matches any JID that hasUsernamein the node part as long as the server part of this JID is any virtual host served by ejabberd.user_glob: Patternโ Same asuser_regexp, but matching is performed on a specifiedPatternaccording to the rules used by the Unix shell.user_regexp: Regexpโ IfRegexpis in the form of"regexp@server", the rule matches any JID with node part matching regular expression"regexp"as long as the server part of this JID is equal to"server". IfRegexpis in the form of"regexp", the rule matches any JID with node part matching regular expression"regexp"as long as the server part of this JID is any virtual host served by ejabberd.
acme: Optionsโ basic.md#acme|ACME configuration, to automatically obtain SSL certificates for the domains served by ejabberd, which means that certificate requests and renewals are performed to some CA server (aka "ACME server") in a fully automated mode. The Options are:auto: true | falseโ Whether to automatically request certificates for all configured domains (that yet have no a certificate) on server start or configuration reload. The default istrue.ca_url: URLโ The ACME directory URL used as an entry point for the ACME server. The default value is https://acme-v02.api.letsencrypt.org/directory - the directory URL of Letโs Encrypt authority.cert_type: rsa | ecโ A type of a certificate key. Available values areecandrsafor EC and RSA certificates respectively. Itโs better to have RSA certificates for the purpose of backward compatibility with legacy clients and servers, thus the default isrsa.contact: [Contact, ...]โ A list of contact addresses (typically emails) where an ACME server will send notifications when problems occur. The value ofContactmust be in the form of"scheme:address"(e.g."mailto:user@domain.tld"). The default is an empty list which means an ACME server will send no notices.
Example:
acme:
ca_url: https://acme-v02.api.letsencrypt.org/directory
contact:
- mailto:admin@domain.tld
- mailto:bot@domain.tld
auto: true
cert_type: rsa
allow_contrib_modules: true | falseโ Whether to allow installation of third-party modules or not. See ../../admin/guide/modules.md#ejabberd-modules|ejabberd-modules documentation section. The default value istrue.allow_multiple_connections: true | falseโ This option is only used when the anonymous mode is enabled. Setting it totruemeans that the same username can be taken multiple times in anonymous login mode if different resource are used to connect. This option is only useful in very special occasions. The default value isfalse.anonymous_protocol: login_anon | sasl_anon | bothโ Define what authentication.md#anonymous-login-and-sasl-anonymous|anonymous protocol will be used:login_anonmeans that the anonymous login method will be used.sasl_anonmeans that the SASL Anonymous method will be used.bothmeans that SASL Anonymous and login anonymous are both enabled.
The default value is sasl_anon.
api_permissions: [Permission, ...]โ Define the permissions for API access. Please consult the ejabberd Docs web โ For Developers โ ejabberd ReST API โ ../../developer/ejabberd-api/permissions.md|API Permissions.append_host_config: {Host: Options}โ Add a few specific options to a certain ../configuration/basic.md#virtual-hosting|virtual host.auth_cache_life_time: timeout()โ Same ascache_life_time, but applied to authentication cache only. If not set, the value fromcache_life_timewill be used.auth_cache_missed: true | falseโ Same ascache_missed, but applied to authentication cache only. If not set, the value fromcache_missedwill be used.auth_cache_size: pos_integer() | infinityโ Same ascache_size, but applied to authentication cache only. If not set, the value fromcache_sizewill be used.auth_external_user_exists_check:true | false | force๐ โ bestie, this one's a supplement to the user-existence check based onmod_lastdata. It's for auth methods that literally have no reliable way to tell if a user exists (looking at you,jwtand certificate-based auth ๐). It helps with processing offline messages for those users. Set it toforceand that processing happens even when no external storage method is enabled โ like when you're using certificate auth together with locally stored passwords.
๐ Note about this option: added in23.10,forceadded in26.09.
The default value is true.
auth_method:[mnesia | sql | anonymous | external | jwt | ldap | pam, ...]โ a whole list ofauthentication.md|authenticationmethods to use. And here's the vibe: if you define several methods, auth counts as successful as long as at least one of them succeeds โจ The default value is[mnesia].auth_opts:[Option, ...]โ this one is used by the contributed moduleejabberd_auth_http, which you can install from the../../admin/guide/modules.md#ejabberd-contrib|ejabberd-contribGit repository. Go read that module's README file for the deets, iykyk ๐ซถauth_password_format:plain | scramโ the option that decides in what format the users' passwords get stored: plain text, orauthentication.md#scram|SCRAMformat.
๐ธ Note about this option: improved in 20.01.
plain: the password is stored as plain text in the database. Lowkey risky, ngl โ because the passwords can absolutely be read if your database gets compromised ๐ญ This is the default value. This format lets clients authenticate using: the old Jabber Non-SASL (XEP-0078), SASL PLAIN, SASL DIGEST-MD5, and SASL SCRAM-SHA-1/256/512(-PLUS).scram: the password is not stored, only some information required to verify the hash the client provides. It is impossible to obtain the original plain password from the stored info โ which is why, once this value is configured, it cannot be changed back toplainanymore, periodt. This format lets clients authenticate using: SASL PLAIN and SASL SCRAM-SHA-1/256/512(-PLUS). The SCRAM variant depends on theauth_scram_hashoption.
The default value is plain.
auth_password_types_hidden_in_sasl1:[plain | scram_sha1 | scram_sha256 | scram_sha512]โ a list of password types that should not be offered in SASL1 authentication.
๐
Note about this option: added in 25.07.
Here's the tea: SASL1, unlike SASL2, can't have a list of available mechanisms tailored to individual users. So it's possible the offered mechanisms won't be compatible with the stored password โ especially if a new password type was added recently. This option lets you stop offering some mechanisms in SASL1, until that new password type is available for all users. Very thoughtful, honestly ๐
auth_scram_hash:sha | sha256 | sha512โ the hash algorithm that should be used to store passwords inauthentication.md#scram|SCRAMformat. โ ๏ธ Do not change this if you already have passwords generated with a different algorithm โ users who have such passwords will not be able to authenticate. The default value issha.auth_stored_password_types:[plain | scram_sha1 | scram_sha256 | scram_sha512]โ a list of password types that should be stored simultaneously for each user in the database.
๐ฆ Note about this option: added in 25.03.
So when the user sets the account password, the database gets updated to store the password in formats compatible with each type listed here. This is the move for migrating user passwords to a more secure format ๐ฅ Heads up: if this option is set, it will override the values set in the auth_scram_hash and auth_password_format options. The default value is [].
auth_use_cache:true | falseโ same asuse_cache, but applied to the authentication cache only. If it's not set, the value fromuse_cachegets used instead ๐ซถc2s_cafile: Path โ full path to a file containing one or more CA certificates in PEM format. All client certificates should be signed by one of these root CA certificates, and should contain the corresponding JID(s) in thesubjectAltNamefield. There is no default value.
You can use host_config to specify this option per-vhost.
To set a specific file per listener, use the listener's listen-options.md#cafile|cafile option. Please notice that c2s_cafile overrides the listener's cafile option ๐
c2s_ciphers:[Cipher, ...]โ a list of OpenSSL ciphers to use for c2s connections. The default value is shown in the example below:
Example:
c2s_ciphers:
- HIGH
- "!aNULL"
- "!eNULL"
- "!3DES"
- "@STRENGTH"
c2s_dhfile: Path โ full path to a file containing custom DH parameters to use for c2s connections. You could create such a file with the commandopenssl dhparam -out dh.pem 2048โจ If this option is not specified, then a 2048-bit MODP Group with 256-bit Prime Order Subgroup gets used, as defined in RFC5114 Section 2.3.c2s_protocol_options:[Option, ...]โ a list of general SSL options to use for c2s connections. These map to OpenSSL'sset_options(). The default value is shown in the example below:
Example:
c2s_protocol_options:
- no_sslv3
- cipher_server_preference
- no_compression
c2s_tls_compression:true | falseโ whether to enable or disable TLS compression for c2s connections. The default value isfalse.ca_file: Path โ path to a file of CA root certificates. The default is to use the system-defined file if possible.
For server connections, this ca_file option is overridden by the s2s_cafile option ๐
cache_life_time:timeout()โ the amount of time a cached item is kept in the cache. Once it's expired, the corresponding item gets erased from the cache ๐ The default value is1 hour. Several modules have a similar option, and some core ejabberd parts support similar options too โ seeauth_cache_life_time,oauth_cache_life_time,router_cache_life_time, andsm_cache_life_time.cache_missed:true | falseโ whether or not to cache missed lookups. When there's an attempt to look up a value in a database and the value is not found, and this option istrue, that attempt gets cached, and no attempts are performed until the cache expires (seecache_life_time). Usually you don't want to change it. Default istrue. Several modules have a similar option, and some core ejabberd parts support similar options too โ seeauth_cache_missed,oauth_cache_missed,router_cache_missed, andsm_cache_missed.cache_size:pos_integer() | infinityโ a maximum number of items (not memory!) in the cache. The rule of thumb: for all tables except rosters, set it to the number of maximum online users you expect. For roster, multiply that number by 20 or so ๐งฎ And watch out โ if the cache size reaches this threshold, it's fully cleared, i.e. all items are deleted, and the corresponding warning gets logged. You should avoid frequent cache clearance, because it degrades performance ๐ญ The default value is1000. Several modules have a similar option, and some core ejabberd parts support similar options too โ seeauth_cache_size,oauth_cache_size,router_cache_size, andsm_cache_size.captcha_cmd: Path | ModuleName โ full path to a script that generatesbasic.md#captcha|CAPTCHAimages. The keyword@VERSION@gets replaced with the ejabberd version number inXX.YYformat. The keyword@SEMVER@gets replaced with the ejabberd version number in semver format when compiled with Elixir's mix, orXX.YYformat otherwise. Alternatively, it can be the name of a module that implements ejabberd CAPTCHA support. There is no default value: when this option is not set, CAPTCHA functionality is completely disabled ๐
๐ Note about this option: improved in 23.01.
Examples:
When using the ejabberd installers or container image, the example captcha scripts can be used like this:
captcha_cmd: /opt/ejabberd-@VERSION@/lib/ejabberd-@SEMVER@/priv/bin/captcha.sh
captcha_host: String โ Deprecated. Usecaptcha_urlinstead. ๐captcha_limit:pos_integer() | infinityโ maximum number ofbasic.md#captcha|CAPTCHAgenerated images per minute for any given JID. This option is here to protect the server from CAPTCHA DoS attacks ๐ก๏ธ The default value isinfinity.captcha_pow:pos_integer() | falseโ offer an XEP-0158 SHA-256 hashcash (proof-of-work) challenge in thebasic.md#captcha|CAPTCHAform, alongside the image challenge or on its own. The value is the difficulty: the number of hexadecimal digits of the SHA-256 digest a client must match. And unlike the image challenge, this one does not requirecaptcha_cmdโจ The default value isfalse.captcha_url: URL |auto|undefinedโ an URL wherebasic.md#captcha|CAPTCHArequests should be sent.
๐ Note about this option: improved in 23.04.
NOTE: you need to configure request_handlers for the ejabberd_http listener as well ๐
If set to auto, it builds the URL using a request_handler that's already enabled, with encryption if available. If set to undefined, it builds the URL using the deprecated captcha_host + /captcha. The default value is auto.
certfiles:[Path, ...]โ this option accepts a list of file paths (optionally with wildcards) containing either PEM certificates or PEM private keys. At startup or configuration reload, ejabberd reads all certificates from these files, sorts them, removes duplicates, finds matching private keys, and then rebuilds full certificate chains for use in TLS connections ๐ Use this option when TLS is enabled in either of the ejabberd listeners:ejabberd_c2s,ejabberd_httpand so on.
โญ NOTE: if you modify the certificate files or change the value of the option, run ejabberdctl reload-config in order to rebuild and reload the certificate chains. Don't skip this, bestie.
Examples:
If you use Let's Encrypt certificates for your domain domain.tld, the configuration will look like this:
certfiles:
- /etc/letsencrypt/live/domain.tld/fullchain.pem
- /etc/letsencrypt/live/domain.tld/privkey.pem
cluster_backend: Backend โ a database backend to use for storing information about the cluster. The only available value so far ismnesia๐cluster_nodes: [Node, ...]โ a list of Erlang nodes to hook up to on ejabberd startup ๐ซถ. Ngl this one's mostly for ejabberd customization and sophisticated setups, so if that's not you, no stress. Default is an empty list.default_db: mnesia | sqlโ your default database for storing persistent data in ejabberd (database.md#default-database). Some components get their own toplevel options likeoauth_db_type, and lots of modules get their own module options, usually calleddb_type. Default value ismnesia.default_ram_db: mnesia | redis | sqlโ the default volatile (in-memory) storage for ejabberd โจ. Same deal: some components have specific toplevel options likerouter_db_typeandsm_db_type, and some modules have specific module options, usually namedram_db_type. Default ismnesia.define_keyword: {NAME: Value}โ ๐ note about this option: added in 25.03. Lets you define configuration keywords (../configuration/file-format.md#macros-and-keywords).
Example:
define_keyword:
SQL_USERNAME: "eja.global"
host_config:
localhost:
define_keyword:
SQL_USERNAME: "eja.localhost"
sql_username: "prefix.@SQL_USERNAME@"
define_macro: {NAME: Value}โ ๐ note about this option: improved in 25.03. Lets you define configuration macros (../configuration/file-format.md#macros-and-keywords).
Example:
define_macro:
DEBUG: debug
LOG_LEVEL: DEBUG
USERBOB:
user: bob@localhost
loglevel: LOG_LEVEL
acl:
admin: USERBOB
disable_sasl_mechanisms: [Mechanism, ...]โ bestie, this is where you list SASL mechanisms (likeDIGEST-MD5orSCRAM-SHA1) that should not be offered to the client ๐ โโ๏ธ. For convenience, the value of Mechanism is case-insensitive. Default is an empty list, meaning nothing is disabled by default.disable_sasl_scram_downgrade_protection: true | falseโ lets you turn off sending the data required by XEP-0474: SASL SCRAM Downgrade Protection. Real talk: there are known buggy clients out there (looking at you, the ones using strophejs 1.6.2) that literally can't authenticate when the server sends data from that spec ๐ญ. So this option lets the server disable it and let even the buggy clients connect โ but in exchange you get decreased MITM protection. Default value isfalse, which means the extension stays enabled ๐.domain_balancing: {Domain: Options}โ an algorithm to load-balance the components plugged into an ejabberd cluster (../guide/clustering.md#service-load-balancing). Basically you can plug one or several instances of the same component on each ejabberd node and the traffic gets distributed automatically โจ. This option specifies the algorithm for delivering messages to the component(s). For any component connected as Domain, the available Options are:component_number: 2..1000โ the number of components to balance.type: Valueโ how to deliver stanzas to connected components. Default value israndom. Possible values:bare_destinationโ by the bare JID (without resource) of the packet'stoattributebare_sourceโ by the bare JID (without resource) of the packet'sfromattribute is useddestinationโ an instance is chosen by the full JID of the packet'stoattributerandomโ an instance is chosen at randomsourceโ by the full JID of the packet'sfromattribute
Example:
domain_balancing:
component.domain.tld:
type: destination
component_number: 5
transport.example.org:
type: bare_source
ext_api_headers: Headersโ a string of headers (separated with commas,) that ejabberd will provide when sending ReST requests. Default value is an empty string of headers:"".ext_api_http_pool_size: pos_integer()โ sets the size of the HTTP pool, aka the max number of sessions the ejabberd ReST service handles at the same time. Default value is100๐ฅ.ext_api_path_oauth: Pathโ sets the base URI path when doing OAUTH ReST requests. Default value is"/oauth".ext_api_url: URLโ sets the base URI when making ReST requests. Default value is"http://localhost/api".extauth_pool_name: Nameโ defines the pool name appendix in external auth (authentication.md#external-script), so the full pool name ends up beingextauth_pool_Name. Default value is the hostname ๐ฆ.extauth_pool_size: Sizeโ how many instances of the same external auth program (authentication.md#external-script) to start for better load balancing. Default is the number of available CPU cores ๐extauth_program: Pathโ put the full path to the external authentication script (authentication.md#external-script) here. The script must be executable by ejabberd.fqdn: Domainโ a fully qualified domain name used in SASL DIGEST-MD5 authentication. Default is detected automatically โจ.hide_sensitive_log_data: true | falseโ a privacy option so you don't log sensitive data (mostly IP addresses) ๐. Default value isfalsefor backward compatibility.host_config: {Host: Options}โ this one redefines Options for a virtual host Host (../configuration/basic.md#virtual-hosting). In the example below, LDAP auth is used on virtual hostdomain.tldand SQL is used onexample.org.
Example:
hosts:
- domain.tld
- example.org
auth_method:
- sql
host_config:
domain.tld:
auth_method:
- ldap
hosts: [Domain1, Domain2, ...]โ list of one or more host names (or domains) that ejabberd will serve (../configuration/basic.md#host-names). Heads up: this one is mandatory ๐.hosts_alias: {Alias: Host}โ ๐ธ note about this option: added in 25.07. Defines aliases for existing vhosts managed by ejabberd. An alias may be a regexp expression. This option is only consulted by theejabberd_httplistener.
Example:
hosts:
- domain.tld
- example.org
hosts_alias:
xmpp.domain.tld: domain.tld
jabber.domain.tld: domain.tld
mytest.net: example.org
"exa*": example.org
include_config_file: [Filename, ...] | {Filename: Options}โ read and include an additional file from Filename (../configuration/file-format.md#include-additional-files). If you provide it in the{Filename: Options}format, Options must be one of these:allow_only: [OptionName, ...]โ only allows those options to be used in the included file Filename. Options that don't match this criteria are not accepted. Default value is to include all options.disallow: [OptionName, ...]โ disallows those options in the included file Filename. Options that match this criteria are not accepted. Default value is an empty list.
install_contrib_modules: [Module, ...]โ ๐ note about this option: added in 23.10. Modules from../../admin/guide/modules.md#ejabberd-modulesto install automatically at start time. Default value is an empty list of modules:[].
Example:
install_contrib_modules:
- mod_tombstones
modules:
mod_tombstones: {}
jwt_auth_only_rule: AccessNameโ this ACL rule defines the accounts that can use only the JWT auth method (authentication.md#jwt-authentication), even if other methods are also defined in the ejabberd config file. Like, if several auth methods are enabled for this host (JWT, SQL, โฆ), users matching this rule can only use JWT. Default value isnone.jwt_jid_field: FieldNameโ by default the JID lives in the"jid"JWT field. This option lets you specify a different JWT field name where the JID is defined (authentication.md#jwt-authentication).jwt_key: FilePathโ path to the file containing the JWT key (authentication.md#jwt-authentication) ๐
Supported file formats:
- PEM format โ standard PEM-encoded keys (RSA, EC, EdDSA, etc.)
- JWK (JSON Web Key) โ JSON format
- JWK Set โ JSON with a
"keys"array (but it must contain exactly one key)
By default there is no path defined, that is: undefined.
language: Languageโ defines the default language of server strings that XMPP clients can see (../configuration/basic.md#default-language). If an XMPP client doesn't have anxml:langattribute, this language is used. Default value is"en"๐.ldap_backups: [Host, ...]โ a list of IP addresses or DNS names of LDAP backup servers (see../configuration/ldap.md#ldap-connection). When none of the servers listed inldap_serversare reachable, ejabberd connects to these backup ones. Default is an empty list, aka no backup servers specified. Please notice ๐ ejabberd only connects to the next server when the existing connection is lost; it doesn't detect when a previously-attempted server becomes available again.ldap_base: Baseโ the LDAP base directory that stores user accounts. There is no default value: you have to set this option for LDAP connections to work properly ๐ค.ldap_deref_aliases: never | always | finding | searchingโ whether to dereference aliases or not. Default value isnever.ldap_dn_filter({Filter: FilterAttrs}) โ okay so this one's a lil extra filter that runs on whatever the main filter spits back at you ๐ซถ. It does a whole extra LDAP lookup to build the complete result โ which is exactly what you want when you literally cannot cram all your filter rules intoldap_filter. You can drop"%u","%d","%s"and"%D"pattern variables inside Filter:"%u"gets swapped for the user's part of the JID,"%d"gets swapped for the corresponding domain (virtual host), all the"%s"variables get replaced one after another by values from the attributes in FilterAttrs, and"%D"gets replaced by the Distinguished Name from the result set. There's no default value, which means the result just isn't filtered. > WARNING: because this filter does extra LDAP lookups, use it only as the last resort โ try to define all filter rules inldap_filterif you possibly can, bestie, fr fr. Example:
ldap_dn_filter:
"(&(name=%s)(owner=%D)(user=%u@%d))": [sn]
ldap_encrypt(tls|none) โ whether to encrypt the LDAP connection with TLS or not ๐ . Default isnone. NOTE: STARTTLS encryption is not supported โ like, at all.ldap_filter(Filter) โ an LDAP filter as defined in RFC4515 โจ. No default value. Example:"(&(objectClass=shadowAccount)(memberOf=XMPP Users))". NOTE: don't forget to close your brackets and don't use superfluous whitespaces (the filter is picky, she's got standards). Also you must not use the"uid"attribute in the filter, because that attribute gets appended to the filter automatically. iykyk.ldap_password(Password) โ the bind password ๐. Default is an empty string.ldap_port(1..65535) โ port to connect to your LDAP server. Default port is389if encryption is disabled and636if encryption is enabled ๐ธ.ldap_rootdn(RootDN) โ bind Distinguished Name. Default is an empty string, which means "anonymous connection" ๐.ldap_servers([Host, ...]) โ a list of IP addresses or DNS names of your LDAP servers (see../configuration/ldap.md#ldap-connection|LDAP connection). ejabberd connects immediately to all of them and reconnects infinitely if a connection is lost โ she's committed ๐. Default value is[localhost].ldap_tls_cacertfile(Path) โ a path to a file containing PEM encoded CA certificates. This option is required when TLS verification is enabled โญ.ldap_tls_certfile(Path) โ a path to a file containing the PEM encoded certificate along with the PEM encoded private key. This certificate will be provided by ejabberd when TLS is enabled for LDAP connections ๐. There's no default value, which means no client certificate gets sent.ldap_tls_depth(Number) โ specifies the maximum verification depth when TLS verification is enabled, i.e. how far in a chain of certificates the verification process can proceed before the verification is considered to have failed ๐. Peer certificate = 0, CA certificate = 1, higher level CA certificate = 2, etc. So the value2means a chain can at most contain peer cert, CA cert, next CA cert, and an additional CA cert. Default value is1.ldap_tls_verify(false|soft|hard) โ this one decides whether to verify the LDAP server certificate or not when TLS is enabled ๐. Withhard, ejabberd doesn't proceed if the certificate is invalid. Withsoft, ejabberd proceeds even if the check has failed (she's being nice). Default isfalse, which means no checks are performed at all.ldap_uids([Attr]|{Attr: AttrFormat}) โ LDAP attributes which hold a list of attributes to use as alternatives for getting the JID, where Attr is an LDAP attribute which holds the user's part of the JID, and AttrFormat must contain one and only one pattern variable"%u"which will be replaced by the user's part of the JID ๐ฆ. For example,"%u@example.org". If the value is in the form of[Attr]then AttrFormat is assumed to be"%u".listen([Options, ...]) โ the option for listeners configuration ๐ฅ. See thelisten.md|Listen Modulessection for details.log_burst_limit_count(Number) โ note about this option: added in 22.10 โจ. The number of messages to accept in thelog_burst_limit_window_timeperiod before starting to drop them. Default500.log_burst_limit_window_time(Number) โ note about this option: added in 22.10 โจ. The time period to rate-limit log messages by. Defaults to1second.log_modules_fully([Module, ...]) โ note about this option: added in 23.01 โจ. List of modules that will log everything independently from the generallogleveloption.log_rotate_count(Number) โ the number of rotated log files to keep ๐. Default value is1, which means it only keepsejabberd.log.0,error.log.0andcrash.log.0.log_rotate_size(pos_integer()|infinity) โ the size (in bytes) of a log file that triggers rotation ๐. If set toinfinity, log rotation is disabled. Default value is 10 Mb expressed in bytes:10485760.loglevel(none|emergency|alert|critical|error|warning|notice|info|debug) โ verbosity of ejabberd../configuration/basic.md#logging|logging๐ . Default value isinfo. NOTE: previous versions of ejabberd had log levels defined in numeric format (0..5). Those numeric values are still accepted for backward compatibility, but they are not recommended โ we've moved on, bestie.max_fsm_queue(Size) โ this option specifies the maximum number of elements in the queue of the FSM (Finite State Machine) ๐ญ. Roughly speaking, each message in such queues represents one XML stanza queued to be sent into its relevant outgoing stream. If the queue size reaches the limit (because, for example, the receiver of stanzas is too slow ๐), the FSM and the corresponding connection (if any) get terminated and an error message is logged. The reasonable value depends on your hardware configuration. Allowed values are positive integers. Default value is10000.modules({Module: Options}) โ set all themodules.md|modulesconfiguration options ๐ง.negotiation_timeout(timeout()) โ time to wait for an XMPP stream negotiation to complete โณ. When the timeout hits, the corresponding XMPP stream is closed. Default value is120seconds.net_ticktime(timeout()) โ this option tunes the tick time parameter ofnet_kernel. It tells the Erlang VM how often nodes should check whether intra-node communication was interrupted ๐. > This option must have an identical value on all nodes, or it will lead to subtle bugs. Usually leaving the default value alone is best โ tweak it only if you know what you're doing, no cap. Default value is1minute.new_sql_schema(true|false) โ note about this option: obsoleted in 25.10 ๐. This option was renamed tosql_schema_multihostin ejabberd 25.10. Please update your configuration to use the new option name โ she's moved on and so should you.oauth_access(AccessName) โ by default, creating OAuth tokens is not allowed ๐ซ. To define which users can create OAuth tokens, you can refer to an ejabberd access rule in theoauth_accessoption. Useallto allow everyone to create tokens ๐.oauth_cache_life_time(timeout()) โ same ascache_life_time, but applied to the OAuth cache only โจ. If not set, the value fromcache_life_timeis used.oauth_cache_missed(true|false) โ same ascache_missed, but applied to the OAuth cache only โจ. If not set, the value fromcache_missedis used.oauth_cache_rest_failure_life_time(timeout()) โ note about this option: added in 21.01 โจ. The time that a failure in OAuth ReST is cached. Default value isinfinity.oauth_cache_size(pos_integer()|infinity) โ same ascache_size, but applied to the OAuth cache only โจ. If not set, the value fromcache_sizeis used.oauth_client_id_check(allow|db|deny) โ define whether client authentication is always allowed, denied, or whether it will depend on if the client ID is present in the database ๐. Default value isdb.oauth_db_type(mnesia|sql) โ database backend to use for OAuth authentication ๐ฆ. Default value is picked from thedefault_dboption, or if that's not set,mnesiawill be used.oauth_expire(timeout()) โ time during which the OAuth token is valid, in seconds โฐ. After that amount of time, the token expires and the delegated credential cannot be used and is removed from the database. Default is4294967seconds (that's a lot of seconds, iconique).oauth_use_cache(true|false) โ same asuse_cache, but applied to the OAuth cache only โจ. If not set, the value fromuse_cacheis used.oom_killer(true|false) โ enable or disable the OOM (out-of-memory) killer ๐. When system memory raises above the limit defined in theoom_watermarkoption, ejabberd triggers the OOM killer to terminate the most memory-consuming Erlang processes. Note that in order to maintain functionality, ejabberd only attempts to kill transient processes, such as those managing client sessions, s2s or database connections ๐ซถ. Default value istrue.oom_queue(Size) โ trigger the OOM killer when some of the running Erlang processes have a message queue above this Size ๐ญ. Note that such processes won't be killed if theoom_killeroption is set tofalseor ifoom_watermarkis not reached yet.oom_watermark(Percent) โ a percent of total system memory consumed at which the OOM killer should be activated, with some of the processes possibly getting killed (see theoom_killeroption) ๐ฅ. Later, when memory drops below this Percent, the OOM killer is deactivated. Default value is80percents.outgoing_s2s_families([ipv6|ipv4, ...]) โ note about this option: changed in 23.01 โจ. Specify which address families to try, and in what order. Default is[ipv6, ipv4], which means it first tries connecting with IPv6, and if that fails it tries using IPv4. > Heads up: this option is obsolete and irrelevant when using ejabberd 23.01 and Erlang/OTP 22, or newer versions of them ๐ซถ.outgoing_s2s_ipv4_address(Address) โ note about this option: added in 20.12 โจ. Specify the IPv4 address that will be used when establishing an outgoing S2S IPv4 connection, for example"127.0.0.1". Default value isundefined.outgoing_s2s_ipv6_address(Address) โ note about this option: added in 20.12 โจ. Specify the IPv6 address that will be used when establishing an outgoing S2S IPv6 connection, for example"::FFFF:127.0.0.1". Default value isundefined.outgoing_s2s_port(1..65535) โ a port number to use for outgoing s2s connections when the target server doesn't have an SRV record ๐. Default value is5269.outgoing_s2s_timeout: timeout()โ how long (in seconds) ejabberd waits when it's trying to open an outgoing S2S connection before giving up. Default is 10 seconds โ a whole decade in group-chat time, but okay. โณpam_service: Nameโ the PAM service name for PAM authentication. Check your OS's PAM docs if you need the deets. Default value isejabberd, cute and on-brand. ๐pam_userinfotype: username | jidโ decides what ejabberd hands over to the PAM service: just the plainusername, or the user's fulljid. Default isusername. Lowkey simple, highkey important. ๐pgsql_users_number_estimate: true | falseโ whether to use PostgreSQL's estimation when counting registered users. Default isfalse. No cap. ๐queue_dir: Directoryโ ifqueue_typeis set tofile, this is theDirectorywhere file queues get stored. Default is to keep queues inside the Mnesia directory. ๐๏ธqueue_type: ram | fileโ the default type of queues in ejabberd. Modules may have their own value for this option.rammeans queues live in memory. If you setfile, you can also specify where they go with thequeue_diroption. Default isram. โจredis_connect_timeout: timeout()โ how long to wait for the connection to the Redis server to be re-established. Default is 1 second. ๐งredis_db: Numberโ the Redis database number. Default is0. ๐redis_password: Passwordโ the password for the Redis server. Default is an empty string, i.e. no password. ๐redis_pool_size: Numberโ how many simultaneous connections to the Redis server. Default value is10. ๐redis_port: 1..65535โ the port where the Redis server accepts connections. Default is6379. ๐redis_queue_type: ram | fileโ the type of request queue for the Redis server. See thequeue_typeoption description for the explanation. Default value is whateverqueue_typeis set to, orramif that one isn't set. ๐ธredis_server: Host | IP Address | Unix Socket Pathโ a hostname, IP address, or unix domain socket file for the Redis server. Set up a unix domain socket path like:"unix:/path/to/socket". Default value islocalhost. Note about this option: improved in 24.12. ๐ฆregistration_timeout: timeout()โ this is a global option formod_register. It limits how often registrations can happen from a given IP or username. So if a user tries to register a new account from the same IP address or JID during this window after their previous registration, they get an error with the corresponding explanation. Set it toinfinityto disable the whole limitation. Default value is 600 seconds. ๐ญreplaced_connection_timeout: timeout()โ Note about this option: added in 26.01. The maximum time a new session will wait for the termination of the session it's replacing. This lets the old session properly send its unavailable presences and helps with potential race conditions between old and new session presences. ๐ซถresource_conflict: setresource | closeold | closenewโ > โ ๏ธ NOTE: this option is deprecated and may be removed anytime in future versions. The possible values match exactly the three possibilities described in XMPP Core: section 7.7.2.2. Default value iscloseold. If the client uses old Jabber Non-SASL authentication (XEP-0078), then this option is not respected, and the action performed iscloseold. ๐rest_proxy: Hostโ Note about this option: added in 25.07. Address of an HTTP Connect proxy used by modules issuing REST calls (likeejabberd_oauth_rest). ๐rest_proxy_password: string()โ Note about this option: added in 25.07. Password used to authenticate to the HTTP Connect proxy used by modules issuing REST calls (likeejabberd_oauth_rest). ๐rest_proxy_port: 1..65535โ Note about this option: added in 25.07. Port of the HTTP Connect proxy used by modules issuing REST calls (likeejabberd_oauth_rest). ๐rest_proxy_username: string()โ Note about this option: added in 25.07. Username used to authenticate to the HTTP Connect proxy used by modules issuing REST calls (likeejabberd_oauth_rest). ๐ซงrouter_cache_life_time: timeout()โ same ascache_life_time, but applied to the routing table cache only. If not set, the value fromcache_life_timewill be used. โฐrouter_cache_missed: true | falseโ same ascache_missed, but applied to the routing table cache only. If not set, the value fromcache_missedwill be used. ๐ฏrouter_cache_size: pos_integer() | infinityโ same ascache_size, but applied to the routing table cache only. If not set, the value fromcache_sizewill be used. ๐ฆrouter_db_type: mnesia | redis | sqlโ the database backend to use for routing information. Default value is picked from thedefault_ram_dboption, or if that's not set,mnesiawill be used. ๐๏ธrouter_use_cache: true | falseโ same asuse_cache, but applied to the routing table cache only. If not set, the value fromuse_cachewill be used. ๐งrpc_timeout: timeout()โ a timeout for remote function calls between nodes in an ejabberd cluster. You should probably never change this value since those calls are used for internal needs only. Default value is 5 seconds. ๐s2s_access: Accessโ this Access Rule defines what remote servers s2s connections can be established with. Default value isallโ no restrictions, so it's allowed to connect s2s to/from all remote servers. ๐s2s_cafile: Pathโ a path to a file with CA root certificates used to authenticate s2s connections. If not set, the value ofca_filewill be used. ๐
You can use host_config to specify this option per-vhost. ๐
s2s_ciphers: [Cipher, ...]โ a list of OpenSSL ciphers to use for s2s connections. The default value is shown in the example below: ๐งช
Example:
s2s_ciphers:
- HIGH
- "!aNULL"
- "!eNULL"
- "!3DES"
- "@STRENGTH"
s2s_dhfile: Pathโ full path to a file containing custom DH parameters to use for s2s connections. You can make one with the commandopenssl dhparam -out dh.pem 2048. If this option is not specified, a 2048-bit MODP Group with 256-bit Prime Order Subgroup will be used as defined inRFC5114Section 2.3. ๐ฑs2s_dns_retries: Numberโ DNS resolving retries. Default value is2. ๐s2s_dns_timeout: timeout()โ the timeout for DNS resolving. Default value is 10 seconds. โฑ๏ธs2s_max_retry_delay: timeout()โ the maximum allowed delay for an s2s connection retry after a failed connection attempt. Default value is 300 seconds (5 minutes). ๐คs2s_protocol_options: [Option, ...]โ a list of general SSL options to use for s2s connections. These map to OpenSSL'sset_options(). The default value is shown in the example below: โ๏ธ
Example:
s2s_protocol_options:
- no_sslv3
- cipher_server_preference
- no_compression
s2s_queue_type: ram | fileโ the type of queue for s2s packets. See thequeue_typeoption description for the explanation. Default value is whateverqueue_typeis set to, orramif that one isn't set. ๐ฌs2s_timeout: timeout()โ how long to wait before closing an idle s2s connection. Default value is 1 hour. ๐คs2s_tls_compression: true | falseโ whether to enable or disable TLS compression for s2s connections. Default value isfalse. ๐๏ธs2s_use_starttls: true | false | optional | requiredโ whether to use STARTTLS for s2s connections.falsemeans STARTTLS is prohibited.trueoroptionalmeans STARTTLS is enabled but plain connections are still allowed.requiredmeans only STARTTLS connections are allowed. Default value isfalse(for historical reasons). ๐ฐ๏ธs2s_zlib: true | falseโ whether to use zlib compression (as defined inXEP-0138) or not. Default value isfalse. > โ ๏ธ WARNING: this type of compression is nowadays considered insecure. ๐shaper: {ShaperName: Rate}โ this option defines a set of shapers. Every shaper gets a name,ShaperName, that can be used elsewhere in the config file, like in theshaper_rulesoption. The shaper itself is defined by itsRate, whereRateis the maximum allowed incoming rate in bytes per second. When a connection exceeds this limit, ejabberd stops reading from the socket until the average rate is back below the allowed maximum. In the example below, shapernormallimits traffic speed to 1,000 bytes/sec and shaperfastlimits traffic speed to 50,000 bytes/sec: ๐ฆ
Example:
shaper:
normal: 1000
fast: 50000
shaper_rules: {ShaperRuleName: {Number|ShaperName: ACLName|ACLDefinition}}โ this option defines shaper rules to use for matching users/hosts. The semantics are similar to theaccess_rulesoption โ the only difference is that instead of usingallowordeny, you use the name of a shaper (defined in theshaperoption) or a positive number. ๐ซ
Example:
shaper_rules:
connections_limit:
10:
user: peter@example.com
100: admin
5: all
download_speed:
fast: admin
slow: anonymous_users
normal: all
log_days: 30
sm_cache_life_time: timeout()โ same ascache_life_time, but applied to the client sessions table cache only. If not set, the value fromcache_life_timewill be used. ๐ฐ๏ธsm_cache_missed: true | falseโ same ascache_missed, but applied to the client sessions table cache only. If not set, the value fromcache_missedwill be used. ๐ฏsm_cache_size: pos_integer() | infinityโ same ascache_size, but applied to the client sessions table cache only. If not set, the value fromcache_sizewill be used. ๐sm_db_type: mnesia | redis | sqlโ the database backend to use for client sessions information. Default value is picked from thedefault_ram_dboption, or if that's not set,mnesiawill be used. ๐๏ธsm_use_cacheโtrue | false. Same vibe asuse_cache, bestie, except it only applies to the client sessions table cache โจ. If you don't set it, the value fromuse_cachegets used instead.sql_connect_timeoutโtimeout(). How long we're willing to wait for a connection to the SQL server to actually get established ๐ซถ. Default is 5 seconds.sql_databaseโDatabaseName | PathSqliteFile. The SQL database name, and the default value isejabberd. ๐ฉต But ifsql_typeis set tosqlite, this has to be a full path to a database file, and the default value becomes:"@DATABASE_PATH@/sqlite/@HOST@.sqlite". (Note: improved in 26.04, slay.)sql_flagsโ[mysql_alternative_upsert]. Note: added in 24.02 ๐ซ. This one takes a list of SQL flags, and it's empty by default. Settingmysql_alternative_upsertforces the alternative upsert implementation in MySQL. iykyk.sql_keepalive_intervalโtimeout(). An interval where we fire off a dummy SQL request just to keep those database connections alive ๐ . There is no default value, so no keepalive requests get made unless you ask for them.sql_odbc_driverโPath. Note: added in 20.12 ๐ฆ. Path to the ODBC driver used to connect to a Microsoft SQL Server database. This only applies if thesql_typeoption is set tomssqlandsql_serveris not an ODBC connection string. Default value:libtdsodbc.so.sql_passwordโPassword. The password for SQL authentication. Default is empty string ๐.sql_pool_sizeโSize. Number of connections to the SQL server that ejabberd will open for each virtual host. Default value is10. ๐จ WARNING: for SQLite this value is1by default and it's not recommended to change it, due to potential race conditions.sql_portโ1..65535. The port where the SQL server is accepting connections ๐ฅ. Defaults:3306for MySQL,5432for PostgreSQL,1433for MS SQL. The option has no effect for SQLite.sql_prepared_statementsโtrue | false. Note: added in 20.01. This istrueby default, and it's useful for disabling prepared statements. Valid for PostgreSQL and MySQL ๐.sql_query_timeoutโtimeout(). How long to wait for an SQL query response before we lose our patience ๐ญ. Default value is 60 seconds.sql_queue_typeโram | file. The type of request queue for the SQL server. Peep the description of thequeue_typeoption for the explanation. The default value is whateverqueue_typeis set to, orramif that one isn't set at all.sql_schema_multihostโtrue | false. Note: renamed in 25.10 ๐ธ. Whether to use thedatabase.md#singlehost-or-multihost|multihostSQL schema. All schemas live athttps://github.com/processone/ejabberd/tree/26.09/sql. There are two schemas available:- The legacy singlehost schema stores one XMPP domain into one ejabberd database.
- The multihost schema can handle several XMPP domains in a single ejabberd database.
The multihost schema is preferable when you're serving several XMPP domains and/or changing domains from time to time โ it avoids having to manage several databases and deal with complex configuration changes ๐. The default depends on the ../../admin/install/source.md#configure|./configure flag --enable-sql-schema-multihost, which is set at compile time.
sql_serverโHost | IP Address | ODBC Connection String | Unix Socket Path. Note: improved in 24.06 ๐ง. The hostname or IP address of the SQL server. Forsql_typemssqlorodbc, this can also be an ODBC connection string. Whensql_typeismysqlorpgsql, this can be the path to a unix domain socket, expressed like:"unix:/path/to/socket". The default value islocalhost.sql_sslโtrue | false. Note: improved in 20.03. Whether to use SSL encrypted connections to the SQL server ๐. Only available for MySQL, MS SQL and PostgreSQL. Default value isfalse.sql_ssl_cafileโPath. A path to a file with CA root certificates that'll be used to verify SQL connections. This implies thesql_sslandsql_ssl_verifyoptions are set totrue. There is no default, which means certificate verification is disabled. This option has no effect for MS SQL.sql_ssl_certfileโPath. A path to a certificate file that'll be used for SSL connections to the SQL server. Impliessql_sslis set totrue. There's no default, which means ejabberd won't provide a client certificate to the SQL server ๐. This option has no effect for MS SQL.sql_ssl_verifyโtrue | false. Whether to verify the SSL connection to the SQL server against the CA root certificates defined in thesql_ssl_cafileoption. Impliessql_sslis set totrue. No effect for MS SQL. Default value isfalse.sql_start_intervalโtimeout(). How long to wait before retrying to restore a failed SQL connection ๐ซ . Default value is 30 seconds.sql_typeโmssql | mysql | odbc | pgsql | sqlite. The type of SQL connection. Default isodbc.sql_usernameโUsername. A user name for SQL authentication. Default value isejabberdโจ.trusted_proxiesโall | [Network1, Network2, ...]. Tells us which proxies are trusted when an HTTP request contains theX-Forwarded-Forheader. You can specifyallto allow every proxy, or give a list of IPs, possibly with masks. Default value is an empty list. With this option you can actually know the real IP of the request โ for admin purposes, or for security configuration (for example, usingmod_fail2ban) ๐ฅ.
IMPORTANT: the proxy MUST be configured to set the X-Forwarded-For header if you enable this option. Otherwise the client can set it themselves, and as a result the IP value cannot be trusted for security rules in ejabberd ๐.
update_sql_schemaโtrue | false. Note: updated in 24.06. Lets ejabberd update the SQL schema in MySQL, PostgreSQL and SQLite databases ๐ ๏ธ. This option was added in ejabberd 23.10, and enabled by default since 24.06. Default value istrue.update_sql_schema_timeoutโtimeout(). Note: added in 24.07. Time allocated to SQL schema update queries. Default is set to 5 minutes โณ.use_cacheโtrue | false. Turn the cache on or off. Default istrue. Several modules have a similar option, and some core ejabberd parts support similar options too โ seeauth_use_cache,oauth_use_cache,router_use_cache, andsm_use_cache๐.validate_streamโtrue | false. Whether to validate any incoming XML packet according to the schemas of supported XMPP extensions.
WARNING: the validation is only intended for use by client developers โ do not enable it in a production environment ๐ฑ. Default value is false.
versionโstring(). This option sets a custom ejabberd version that different parts of ejabberd will use, for example themod_versionmodule. By default the value is obtained at compile time from the underlying version control system ๐ฆ.websocket_originโignore | URL. This option enables validation of theOriginheader, to protect against connections from domains other than the one given in the config file ๐. That way, the lower-layer load balancer can be picked for a specific ejabberd implementation while still providing a secure WebSocket connection. Default value isignore. An example value of the URL is"https://test.example.org:8081".websocket_ping_intervalโtimeout(). Defines the time between pings the server sends to a client (WebSocket-level protocol pings are used for this) to keep a connection active ๐ซถ. If the client doesn't respond to two consecutive pings, the connection is assumed closed. A value of0disables the feature. Heads up: this option makes the server send pings only for connections using the RFC compliant protocol โ for older style connections, the server expects whitespace pings to be used for this purpose. Default value is 60 seconds.websocket_timeoutโtimeout(). Amount of time without any communication after which the connection gets closed ๐ค. Default value is 300 seconds.
๐งฉ MODULES ๐งฉ
This section describes the modules options of ejabberd 26.09 โจ. The modules that changed in this version are marked with ๐ .
mod_adhoc
def:ad-hoc command: a Command that can be executed by an XMPP client using XEP-0050 ๐.
This module implements XEP-0050: Ad-Hoc Commands. It's an auxiliary module, so it's only needed by some of the other modules ๐ .
Available options:
report_commands_nodeโtrue | false. Provide the Commands item in the Service Discovery. Default value:false.
mod_adhoc_api
Note: added in 25.03 ๐ฆ.
Execute (def:API commands) in an XMPP client using XEP-0050: Ad-Hoc Commands. This module requires mod_adhoc (to execute the commands), and recommends mod_disco (to discover the commands) ๐ซถ.
Available options:
default_versionโinteger() | string(). What API version to use. If you set an ejabberd version, it'll use the latest API version that was available in that (def:c2s) ejabberd version โ for example, setting"24.06"in this option implies2๐. The default value is the latest version.
Example:
acl:
admin:
user: jan@localhost
api_permissions:
"adhoc commands":
from: mod_adhoc_api
who: admin
what:
- "[tag:roster]"
- "[tag:session]"
- stats
- status
modules:
mod_adhoc_api:
default_version: 2
mod_admin_extra
This module provides additional administrative commands ๐ฅ.
Details for some commands:
ban_account API: this command kicks all the connected sessions of the account from the server ๐. It also changes their password to a randomly generated one, so they can't log in anymore unless a server administrator changes their password again. You can define the reason of the ban. The new password also includes the reason and the date and time of the ban. See an example below โฌ๏ธ.
push_roster API (and push_roster_all API): the roster file must be placed โ if you're on Windows โ on the directory where you installed ejabberd: C:/Program Files/ejabberd or similar ๐ช. If you use another Operating System, place the file on the same directory where the .beam files are installed. See below an example roster file ๐.
srg_create API: oh and if you wanna put a group Name with blank spaces inside it, you wrap it with "' and '" to mark where the Name starts and where it ends ๐
(yes it's giving dramatic but it works). Example below, bestie.
This module has no options. Like, zero. Not a single one. Iconic of it honestly ๐
Examples
With this config, vCards can only be modified with mod_admin_extra commands:
acl:
adminextraresource:
- resource: "modadminextraf8x,31ad"
access_rules:
vcard_set:
- allow: adminextraresource
modules:
mod_admin_extra: {}
mod_vcard:
access_set: vcard_set
Content of the roster file for the push_roster API:
[{<<"bob">>, <<"example.org">>, <<"workers">>, <<"Bob">>},
{<<"mart">>, <<"example.org">>, <<"workers">>, <<"Mart">>},
{<<"Rich">>, <<"example.org">>, <<"bosses">>, <<"Rich">>}].
With this next call, the sessions of the local account whose JID is boby@example.org get kicked, and its password gets set to something like BANNED_ACCOUNTโ20080425T21:45:07โ2176635โSpammed_rooms ๐ญ
ejabberdctl vhost example.org ban_account boby "Spammed rooms"
Call to the srg_create API using double-quotes and single-quotes:
ejabberdctl srg_create g1 example.org "'Group number 1'" this_is_g1 g1
API Tags โ here's the whole lil tag family ๐ซถ:
../../developer/ejabberd-api/admin-tags.md#accounts|accounts../../developer/ejabberd-api/admin-tags.md#erlang|erlang../../developer/ejabberd-api/admin-tags.md#last|last../../developer/ejabberd-api/admin-tags.md#private|private../../developer/ejabberd-api/admin-tags.md#purge|purge../../developer/ejabberd-api/admin-tags.md#roster|roster../../developer/ejabberd-api/admin-tags.md#session|session../../developer/ejabberd-api/admin-tags.md#shared_roster_group|shared_roster_group../../developer/ejabberd-api/admin-tags.md#stanza|stanza../../developer/ejabberd-api/admin-tags.md#statistics|statistics../../developer/ejabberd-api/admin-tags.md#vcard|vcard
mod_admin_update_sql
This module is literally the glow-up artist for your existing SQL database โ it converts it from the singlehost schema to the multihost schema โจ. Check the section database.md#singlehost-or-multihost|Singlehost or Multihost for the deets.
Heads up bestie: only MS SQL, MySQL, and PostgreSQL are supported. That's the whole guest list ๐
When the module is loaded, use the update_sql API.
This module has no options โ again, nothing to configure. We love a low-maintenance queen ๐
mod_announce
This module lets configured users broadcast announcements and set the message of the day (MOTD) ๐ข. Configured users can do all this with an XMPP client either by using Ad-Hoc Commands or by sending messages to specific JIDs. Equivalent API commands are available too, so pick your vibe ๐
Note This module can be resource intensive on large deployments, because it may broadcast a whole lot of messages. Like, a LOT. It should be disabled for instances of ejabberd with hundreds of thousands of users ๐ no cap.
To send announcements using XEP-0050: Ad-Hoc Commands, this module requires mod_adhoc (to actually execute the commands), and it recommends mod_disco (so people can discover the commands). Teamwork, bestie ๐ค
To send announcements by sending messages to specific JIDs, these are the destination JIDs:
example.org/announce/all: sends the message to all registered users in that vhost. If the user is online and connected to several resources, only the resource with the highest priority receives the message. If the registered user isn't connected, the message is stored offline, assuming offline storage (seemod_offline) is enabled ๐ฅexample.org/announce/online: sends the message to all connected users. If the user is online and connected to several resources, all resources receive the message ๐ฆexample.org/announce/motd: sets the message of the day (MOTD) that's sent to users when they log in. It also sends the message to all connected users (similar toannounce/online) โญexample.org/announce/motd/update: sets the message of the day (MOTD) that's sent to users when they log in. This one does not send the message to any currently connected user ๐ธexample.org/announce/motd/delete: removes the existing message of the day (MOTD) by sending a message to this JID ๐งน
And there are similar destination JIDs that apply to all virtual hosts in ejabberd:
example.org/announce/all-hosts/all: send to all registered accountsexample.org/announce/all-hosts/online: send to online sessionsexample.org/announce/all-hosts/motd: set MOTD and send to onlineexample.org/announce/all-hosts/motd/update: update MOTDexample.org/announce/all-hosts/motd/delete: delete MOTD
Available options
access:AccessNameโ this one decides who's allowed to send announcements and set the message of the day. The default value isnone, which means nobody is able to send such messages ๐ โโ๏ธcache_life_time:timeout()โ same as the top-levelcache_life_timeoption, but applied to this module only ๐ซcache_missed:true | falseโ same as the top-levelcache_missedoption, but applied to this module only ๐ซcache_size:pos_integer() | infinityโ same as the top-levelcache_sizeoption, but applied to this module only ๐ซdb_type:mnesia | sqlโ same as the top-leveldefault_dboption, but applied to this module only ๐ซuse_cache:true | falseโ same as the top-leveluse_cacheoption, but applied to this module only ๐ซ
API Tags:
../../developer/ejabberd-api/admin-tags.md#announce|announce
mod_antispam
Note about this option: added in 25.07 โจ
This module filters spam messages and subscription requests coming in from remote servers, based on Real-Time Block Lists (RTBL), lists of known spammer JIDs, and/or URLs mentioned inside spam messages ๐ซ. Anything classified as spam gets rejected with an error (and an [info] message gets logged), unless the sender is subscribed to the recipient's presence. Rude spammers, be gone ๐
Available options
access_spam:Accessโ access rule that controls which accounts may receive spam messages. If the rule returnsallowfor a given recipient, spam messages aren't rejected for that recipient. The default value isnone, which means all recipients are subject to spam filtering verification ๐cache_size:pos_integer()โ the maximum number of JIDs that get cached for sending spam URLs. If that limit is exceeded, the least recently used entries get removed from the cache. Setting this option to0disables the caching feature entirely. Note that separate caches are used for each virtual host, and that the caches aren't distributed across cluster nodes ๐ซ . The default value is10000rtbl_services:[Service]โ queries an RTBL service to get domains to block, as provided byxmppbl.org. Ngl, right now this option only supports one service in that list. For blocking spam and abuse on MUC channels, please usemod_muc_rtblfor now ๐. If only the host is provided, the default node names are assumed. If the node name is different thanspam_source_domains, you can set up the custom node name with the optionspam_source_domains_node. The default value is an empty list of services.
Example:
rtbl_services:
- pubsub.server1.localhost:
spam_source_domains_node: actual_custom_pubsub_node
spam_domains_file:none | Pathโ path to a plain text file holding a list of known spam domains, one domain per line. Messages and subscription requests sent from one of the listed domains get classified as spam if the sender isn't in the recipient's roster. This list of domains gets merged with the one retrieved by an RTBL host, if any is given. Use an absolute path, or the@CONFIG_PATH@predefined keyword if the file is available in the configuration directory. The default value isnone๐๏ธspam_dump_file:false | true | Pathโ path to the file where blocked messages get stored. Use an absolute path, or the@LOG_PATH@predefined keyword to store logs in the same place as the otherejabberdlog files. If set tofalse, it doesn't dump stanzas, which is the default. If set totrue, it stores them in"@LOG_PATH@/spam_dump_@HOST@.log"๐spam_jids_file:none | Pathโ path to a plain text file holding a list of known spammer JIDs, one JID per line. Messages and subscription requests sent from one of the listed JIDs get classified as spam. Messages containing at least one of the listed JIDs are classified as spam as well. On top of that, the sender's JID gets cached, so future traffic originating from that JID will also be classified as spam ๐. Use an absolute path, or the@CONFIG_PATH@predefined keyword if the file is available in the configuration directory. The default value isnonespam_urls_file:none | Pathโ path to a plain text file holding a list of URLs known to be mentioned in spam message bodies. Messages containing at least one of the listed URLs get classified as spam. And again, the sender's JID gets cached, so future traffic originating from that JID will also be classified as spam ๐. Use an absolute path, or the@CONFIG_PATH@predefined keyword if the file is available in the configuration directory. The default value isnonewhitelist_domains_file:none | Pathโ path to a file holding a list of domains to whitelist from being blocked, one per line. If a domain is inspam_domains_fileor, more realistically, in a domain sent by an RTBL host (see optionrtbl_services), then this domain gets ignored and stanzas from there won't be blocked ๐๏ธ. Use an absolute path, or the@CONFIG_PATH@predefined keyword if the file is available in the configuration directory. The default value isnone
Example
modules:
mod_antispam:
rtbl_services:
- xmppbl.org
spam_jids_file: "@CONFIG_PATH@/spam_jids.txt"
spam_dump_file: "@LOG_PATH@/spam/host-@HOST@.log"
mod_auth_fast
Note about this option: improved in 26.07 ๐
This module adds support for XEP-0484: Fast Authentication Streamlining Tokens, which lets users authenticate using self-managed tokens ๐. Self-managed? We love an independent era fr fr.
Available options:
db_typeโmnesia|sql. Note about this option: improved in 26.07. It's literally the same thing as the top-leveldefault_dboption, bestie, except it only applies to this module. Local queen behaviour ๐token_lifetimeโ timeout(). How long tokens get to stick around, counted from the moment they were created. Default is set to 30 days. Lowkey generous but slay ๐token_refresh_ageโ timeout(). This one's the age a token has to hit before it qualifies for an automatic glow-up (aka refresh). Default is set to 1 day โจ
Example ๐
modules:
mod_auth_fast:
token_lifetime: 14days
๐ฆ mod_avatar
Okay so this module's whole thing is handling both the legacy and the modern XMPP clients that post avatars โ which is a mess, but she copes. The whole process is described in XEP-0398: User Avatar to vCard-Based Avatars Conversion ๐ธ
Bonus: the module also supports converting between avatar image formats on the fly. Obsessed ๐ญ
Heads up: the module depends on mod_vcard, mod_vcard_xupdate and mod_pubsub. No cap, it needs all three ๐ซถ
Available options: ๐
convertโ{From: To}. This defines your image conversion rules: whatever format is in From gets converted into the format in To. The value of From can also bedefault, which is the match-all rule. NOTE: the list of supported formats is detected at compile time, depending on which image libraries are actually installed on your system. So like, don't come for her if your fave format isn't there ๐
Here's the vibe:
convert:
webp: jpg
default: png
rate_limitโ Number. Caps any given JID to that number of avatars it can convert per minute. Why? To protect the server from image conversion DoS, obviously ๐ The default value is10.
๐ซ mod_block_strangers
This one blocks and logs any messages coming from an unknown entity. So if the writing entity isn't in your roster, you can let this module drop and/or log the message. By default you'll just not receive messages from that entity โ silent treatment, iconic. Enable this module if you want to drop SPAM messages ๐ต
Available options: ๐ธ
accessโ AccessName. Use this whenallow_local_usersandallow_transportsjust aren't enough. It's an Access Rule wheredenymeans the stanza will be rejected โ with one exception if optioncaptchais configured. Andallowmeans the sender is whitelisted and the stanza passes right through, VIP style ๐๏ธ The default value isnone, which means nothing is whitelisted.allow_local_usersโtrue|false. Specifies if strangers from the same local host should be accepted or not. Default value istrue.allow_transportsโtrue|false. If it'strueand some server's JID is in the user's roster, then messages from any user of that server are accepted, even if there's no subscription present. Default value istrue.captchaโtrue|false. Whether to generate CAPTCHA challenges in response to incoming presence subscription requests from strangers. See also sectionbasic.md#captcha|CAPTCHAof the Configuration Guide ๐งฉ The default value isfalse.dropโtrue|false. Specifies if strangers' messages should be dropped or not. Default value istrue.logโtrue|false. Specifies if strangers' messages should be logged (as an info message) inejabberd.log. Default value isfalse.
๐ mod_blocking
Implements XEP-0191: Blocking Command. That's it, that's the tweet ๐
This module depends on mod_privacy, where all the actual configuration is performed.
The module has no options. She's low maintenance, we love her ๐
๐ mod_bosh
This module implements XMPP over BOSH as defined in XEP-0124 and XEP-0206. BOSH stands for Bidirectional-streams Over Synchronous HTTP โ yes, the acronym ate ๐ฅ It makes it possible to simulate the long-lived connections that XMPP requires, but over the HTTP protocol. In practice? This module lets you use XMPP in a browser without WebSocket support, and more generally gives you a way to use XMPP while having to get through an HTTP proxy ๐
Available options: โจ
cache_life_timeโ timeout(). Same as the top-levelcache_life_timeoption, but applied to this module only.cache_missedโtrue|false. Same as the top-levelcache_missedoption, but applied to this module only.cache_sizeโ pos_integer() | infinity. Same as the top-levelcache_sizeoption, but applied to this module only.jsonโtrue|false. This option has no effect. Yeah. She's just there for the vibes ๐max_concatโ pos_integer() | infinity. Limits the number of stanzas the server will send in a single bosh request. Default value is unlimited.max_inactivityโ timeout(). Defines the maximum inactivity period. Default value is30seconds.max_pauseโ pos_integer(). The maximum length of a temporary session pause (in seconds) that a client can request. Default value is120.prebindโtrue|false. If enabled, the client can create the session without going through authentication โ basically it creates a new session with anonymous authentication ๐ต๏ธ Default value isfalse.queue_typeโram|file. Same as the top-levelqueue_typeoption, but applied to this module only.ram_db_typeโmnesia|sql|redis. Same as the top-leveldefault_ram_dboption, but applied to this module only.use_cacheโtrue|false. Same as the top-leveluse_cacheoption, but applied to this module only.
Example ๐
listen:
-
port: 5222
module: ejabberd_c2s
-
port: 5443
module: ejabberd_http
request_handlers:
/bosh: mod_bosh
modules:
mod_bosh: {}
๐งฉ mod_caps
Implements XEP-0115: Entity Capabilities. The main character purpose here is providing PEP functionality โ see mod_pubsub ๐
Available options: ๐
cache_life_timeโ timeout(). Same as the top-levelcache_life_timeoption, but applied to this module only.cache_missedโtrue|false. Same as the top-levelcache_missedoption, but applied to this module only.cache_sizeโ pos_integer() | infinity. Same as the top-levelcache_sizeoption, but applied to this module only.db_typeโmnesia|sql. Same as the top-leveldefault_dboption, but applied to this module only.use_cacheโtrue|false. Same as the top-leveluse_cacheoption, but applied to this module only.
๐ฌ mod_carboncopy
Implements XEP-0280: Message Carbons โ the module broadcasts messages on all connected user resources (aka devices). So everything's synced everywhere, no more "wait which laptop was I on" energy ๐ซถ
The module has no options.
๐ค mod_client_state
Okay this one's actually so smart. It lets you queue certain types of stanzas when a client indicates that the user isn't actively using the client right now โ see XEP-0352: Client State Indication. Which saves bandwidth and resources. Mother ๐
A stanza gets dropped from the queue if it's effectively obsoleted by a new one (e.g., a new presence stanza would replace an old one from the same client). And the queue gets flushed if a stanza arrives that won't be queued, or if the queue size reaches a certain limit (currently 100 stanzas), or if the client becomes active again. Flush = she's back, give her everything ๐ฟ
Available options: ๐
queue_chat_statesโtrue|false. Queues "standalone" chat state notifications (as defined in XEP-0085: Chat State Notifications) while a client indicates inactivity. Default value istrue.queue_pepโtrue|false. Queues PEP notifications while a client is inactive. When the queue gets flushed, only the most recent notification of a given PEP node is delivered โ no spam, just the latest tea โ Default value istrue.queue_presenceโtrue|false. While a client is inactive, queues presence stanzas that indicate (un)availability. Default value istrue.
โ๏ธ mod_configure
Note about this option: improved in 25.10.
This module provides server configuration functionalities using XEP-0030: Service Discovery and XEP-0050: Ad-Hoc Commands:
- List and discover outgoing s2s, online client sessions and all registered accounts
- Most of the ad-hoc commands defined in XEP-0133: Service Administration
- Additional custom ad-hoc commands specific to ejabberd
Ad-hoc commands from XEP-0133 that behave differently to the XEP ๐
get-user-roster: returns standard fields instead of roster items that the client cannot display
Those ad-hoc commands from XEP-0133 do not include in the response the client that executed the command:
get-active-users-numget-idle-users-numget-active-usersget-idle-users
Those ad-hoc commands from XEP-0133 are not implemented at all, sorry bestie ๐ญ
edit-blacklistedit-whitelistedit-admin
This module requires mod_adhoc (to execute the commands) and recommends mod_disco (to discover the commands).
Please notice that all the ad-hoc commands implemented by this module have an equivalent API Command that you can execute using mod_adhoc_api or any other API frontend. iykyk ๐
Available options: ๐
accessโ AccessName. Note about this option: added in 25.03. Defines which access rule is used to control who's allowed to access the features provided by this module. The default value isconfigure๐
Example ๐
acl:
admin:
user: sun@localhost
access_rules:
configure:
allow: admin
modules:
mod_configure:
access: configure
๐ฌ mod_conversejs
Note about this option: improved in 25.07.
This module serves a simple page for the Converse XMPP web browser client. She's cute, she's functional, we stan ๐ธ
To use this module, in addition to adding it to the modules section, you must also enable it in listen โ ejabberd_http โ listen-options.md#request_handlers|request_handlers. Both places, bestie, don't skip step two ๐
Make sure either mod_bosh or listen.md#ejabberd_http_ws|ejabberd_http_ws are enabled in at least one request_handlers.
When conversejs_css and conversejs_script are auto, by default they point to the public Converse client. Free real estate โจ
When this module is enabled in modules, it adds automatically a request handler and link in WebAdmin. . ๐
This module is available since ejabberd 21.12.
Available options:
bosh_service_urlโauto|BoshURLโ okay so this is the BOSH service URL Converse can connect to. The keyword@HOST@gets replaced with the real virtual host name, no cap. If itโs set toauto, it builds the URL of the first configured BOSH request handler. Default value isauto. โจconversejs_cssโauto|URLโ the Converse CSS URL, bestie. The keyword@HOST@gets swapped for the hostname. Default value isauto. ๐conversejs_optionsโ{Name: Value}โ quick note: this option was added in22.05. It lets you specify extra options passed to Converse. See Converse configuration. Only boolean, integer and string values are supported; lists are not supported. ๐conversejs_pluginsโ[Filename]โ a list of additional local files to include as scripts in the homepage. Please make sure those files are available in the path specified inconversejs_resourcesoption, in subdirectoryplugins/. Notice that libsignal is only required for OMEMO encryption in Converse 13 or lower; Converse 14 uses and includes libomemo. If using the public Converse client, then"libsignal"gets replaced with the URL of the public library. Default value is[]. ๐ฆconversejs_resourcesโPathโ quick note: this option was added in22.05. Local path to the Converse files. If not set, the public Converse client will be used instead. ๐ธconversejs_scriptโauto|URLโ the Converse main script URL. The keyword@HOST@gets replaced with the hostname. Default value isauto. โญdefault_domainโDomainโ specify a domain to act as the default for user JIDs. The keyword@HOST@is replaced with the hostname. Default value is@HOST@. ๐websocket_urlโauto|WebSocketURLโ a WebSocket URL to which Converse can connect. The@HOST@keyword is replaced with the real virtual host name. If set toauto, it builds the URL of the first configured WebSocket request handler. Default value isauto. ๐ฅ
Examples: ๐ซถ
Manually setup WebSocket url, and use the public Converse client:
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
/bosh: mod_bosh
/websocket: ejabberd_http_ws
/conversejs: mod_conversejs
modules:
mod_bosh: {}
mod_conversejs:
websocket_url: "ws://@HOST@:5280/websocket"
Host Converse locally and let auto detection of WebSocket and Converse URLs:
listen:
-
port: 443
module: ejabberd_http
tls: true
request_handlers:
/websocket: ejabberd_http_ws
/conversejs: mod_conversejs
modules:
mod_conversejs:
conversejs_resources: "/home/ejabberd/conversejs-x.y.z/package/dist"
conversejs_plugins: ["libsignal-protocol.min.js"]
# File path is: /home/ejabberd/conversejs-x.y.z/package/dist/plugins/libsignal-protocol.min.js
Configure some additional options for Converse:
modules:
mod_conversejs:
websocket_url: auto
conversejs_options:
auto_away: 30
clear_cache_on_logout: true
i18n: "pt"
locked_domain: "@HOST@"
message_archiving: always
theme: dracula
๐ธ mod_delegation ๐ธ
Okay so this module is an implementation of XEP-0355: Namespace Delegation. Only admin mode has been implemented by now. Namespace delegation allows external services to handle IQ using a specific namespace. This may be applied for an external PEP service, iykyk. ๐ซ
โ ๏ธ Warning โ Security issue: Namespace delegation gives components access to sensitive data, so permission should be granted carefully, only if you trust the component. Bestie, seriously, be careful with this one.
๐ก Note โ This module is complementary to mod_privilege but can also be used separately.
Available options: ๐
namespacesโ{Namespace: Options}โ if you want to delegate namespaces to a component, specify them in this option, and associate them to an access rule. The Options are:accessโAccessNameโ this option defines which components are allowed for namespace delegation. Default value isnone.filteringโAttributesโ the list of attributes. Currently not used.
Examples: โจ
Make sure you do not delegate the same namespace to several services at the same time. As in the example provided later, to have the sat-pubsub.example.org component perform correctly disable the mod_pubsub module.
access_rules:
external_pubsub:
allow: external_component
external_mam:
allow: external_component
acl:
external_component:
server: sat-pubsub.example.org
modules:
mod_delegation:
namespaces:
urn:xmpp:mam:1:
access: external_mam
http://jabber.org/protocol/pubsub:
access: external_pubsub
๐ฆ mod_disco ๐ฆ
This module adds support for XEP-0030: Service Discovery. With this module enabled, services on your server can be discovered by XMPP clients. Itโs giving discovery era, periodt. ๐
Available options: ๐
extra_domainsโ[Domain, ...]โ with this option, you can specify a list of extra domains that are added to the Service Discovery item list. Default value is an empty list. ๐nameโNameโ a name of the server in the Service Discovery. This will only be displayed by special XMPP clients. Default value isejabberd. ๐server_infoโ[Info, ...]โ specify additional information about the server, as described in XEP-0157: Contact Addresses for XMPP Services. Every Info element in the list is constructed from the following options:modulesโall|[Module, ...]โ the value can be the keywordall, in which case the information is reported in all the services, or a list of ejabberd modules, in which case the information is only specified for the services provided by those modules.nameโNameโ the field var name that will be defined. See XEP-0157 for some standardized names.urlsโ[URI, ...]โ a list of contact URIs, such as HTTP URLs, XMPP URIs and so on.
Example: ๐
server_info:
-
modules: all
name: abuse-addresses
urls: ["mailto:abuse@shakespeare.lit"]
-
modules: [mod_muc]
name: "Web chatroom logs"
urls: ["http://www.example.org/muc-logs"]
-
modules: [mod_disco]
name: feedback-addresses
urls:
- http://shakespeare.lit/feedback.php
- mailto:feedback@shakespeare.lit
- xmpp:feedback@shakespeare.lit
-
modules:
- mod_disco
- mod_vcard
name: admin-addresses
urls:
- mailto:xmpp@shakespeare.lit
- xmpp:admins@shakespeare.lit
๐ mod_fail2ban ๐
The module bans IPs that show the malicious signs. Currently only C2S authentication failures are detected. ๐จ
Unlike the standalone program, mod_fail2ban clears the record of authentication failures after some time since the first failure or on a successful authentication. It also does not simply block network traffic, but provides the client with a descriptive error message. ๐
โ ๏ธ Warning โ You should not use this module behind a proxy or load balancer. ejabberd will see the failures as coming from the load balancer and, when the threshold of auth failures is reached, will reject all connections coming from the load balancer. You can lock all your user base out of ejabberd when using this module behind a proxy. No cap, thatโs a whole mess.
Available options: ๐ธ
accessโAccessNameโ specify an access rule for whitelisting IP addresses or networks. If the rule returnsallowfor a given IP address, that address will never be banned. TheAccessNameshould be of typeip. Default value isnone. โจc2s_auth_ban_lifetimeโtimeout()โ the lifetime of the IP ban caused by too many C2S authentication failures. Default value is1 hour. โณc2s_max_auth_failuresโNumberโ the number of C2S authentication failures to trigger the IP ban. Default value is20. ๐ฅ
API Tags: ../../developer/ejabberd-api/admin-tags.md#accounts|accounts
๐ง mod_host_meta ๐ง
Note about this option: added in 22.05. ๐
This module serves small host-meta files as described in XEP-0156: Discovering Alternative XMPP Connection Methods. ๐
To use this module, in addition to adding it to the modules section, you must also enable it in listen โ ejabberd_http โ listen-options.md#request_handlers|request_handlers. ๐
Notice it only works if listen.md#ejabberd_http|ejabberd_http has listen-options.md#tls|tls enabled. Important, bestie. ๐
Available options: ๐
bosh_service_urlโundefined|auto|BoshURLโ BOSH service URL to announce. The keyword@HOST@is replaced with the real virtual host name. If set toauto, it will build the URL of the first configured BOSH request handler. Default value isauto. โจwebsocket_urlโundefined|auto|WebSocketURLโ WebSocket URL to announce. The keyword@HOST@is replaced with the real virtual host name. If set toauto, it will build the URL of the first configured WebSocket request handler. Default value isauto. ๐ฆ
Example: ๐ซ
listen:
-
port: 443
module: ejabberd_http
tls: true
request_handlers:
/bosh: mod_bosh
/websocket: ejabberd_http_ws
/.well-known/host-meta: mod_host_meta
/.well-known/host-meta.json: mod_host_meta
modules:
mod_bosh: {}
mod_host_meta:
bosh_service_url: "https://@HOST@:5443/bosh"
websocket_url: "wss://@HOST@:5443/websocket"
๐ธ mod_http_api
Okay bestie, this one is so useful โ it hands you a ReST interface so you can call [ejabberd API commands](../../developer/ejabberd-api/index.md) with JSON data. Like, actual API calls. Obsessed. โจ
Heads up though: adding it to modules is not enough. You also have to enable it in listen โ ejabberd_http โ [request_handlers](listen-options.md#request_handlers). Both places. No cap, both. ๐ซถ
And if you want a specific API version N, just slap a vN into the URL path when you define it in the request_handlers. Example: /api/v2: mod_http_api.
To actually run a command, you send a POST request to the matching URL:
http://localhost:5280/api/COMMAND-NAME
<b>Available options:</b>
default_version:integer()|string()โ note about this option: added in 24.12. This is the API version used when the URL path doesn't say which one you want. If you set an ejabberd version in here, it'll use the latest API version that was available in that ejabberd version. So for example, setting"24.06"in this option implies2. The default value is the latest version. ๐
<b>Example:</b>
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
/api: mod_http_api
modules:
mod_http_api:
default_version: 2
๐ mod_http_fileserver
note about this option: improved docroot in 26.01.
A simple lil' module that serves files from the local disk over HTTP. That's it, that's the whole vibe. ๐
<b>Available options:</b>
accesslog: Path โ file where accesses get logged, in an Apache-like format. If you don't specify this option, literally nothing gets logged. Silence. ๐content_types: {Extension: Type} โ lets you map extensions to content types. Several content types are already defined, and with this option you can add new definitions or modify existing ones. The default values are:custom_headers: {Name: Value} โ custom HTTP headers to include in all responses. There are no custom headers by default.default_content_type: Type โ the content type used for unknown extensions. Default value isapplication/octet-stream.directory_indices: [Index, ...] โ one or more directory index files, just like Apache'sDirectoryIndexvariable. When an HTTP request hits a directory instead of a regular file, those directory indices get checked in order, and the first one found is returned. Default value is an empty list.docroot: PathDir | {PathURL, PathDir} โ note about this option: improved in 26.01. The directory to serve files from, or a map with several URL paths (as specified in [request_handlers](listen-options.md#request_handlers)) and their matching directories. This is a mandatory option. ๐must_authenticate_with: [{Username, Hostname}, ...] โ the list of accounts that are allowed to use this service. Default value:[].
<b>Example</b> (the content_types defaults, verbatim):
content_types:
.avi: video/avi
.bmp: image/bmp
.bz2: application/x-bzip2
.css: text/css
.gif: image/gif
.gz: application/x-gzip
.html: text/html
.ico: image/vnd.microsoft.icon
.jar: application/java-archive
.jpeg: image/jpeg
.jpg: image/jpeg
.js: text/javascript
.json: application/json
.m4a: audio/mp4
.map: application/json
.mp3: audio/mpeg
.mp4: video/mp4
.mpeg: video/mpeg
.mpg: video/mpeg
.ogg: application/ogg
.pdf: application/pdf
.png: image/png
.rtf: application/rtf
.svg: image/svg+xml
.tiff: image/tiff
.ttf: font/ttf
.txt: text/plain
.wav: audio/wav
.wasm: application/wasm
.webp: image/webp
.woff: font/woff
.woff2: font/woff2
.xml: application/xml
.xpi: application/x-xpinstall
.xul: application/vnd.mozilla.xul+xml
.xz: application/x-xz
.zip: application/zip
<b>docroot as a map, example:</b>
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
/pub/content: mod_http_fileserver
/share: mod_http_fileserver
/: mod_http_fileserver
modules:
mod_http_fileserver:
docroot:
/pub/content: /var/service/www
/share: /usr/share/javascript
/: /var/www
<b>Examples:</b>
This example configuration will serve the files from the local directory /var/www at the address http://example.org:5280/pub/content/. In this example a new content type ogg is defined, png is redefined, and the jpg definition is deleted:
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
/pub/content: mod_http_fileserver
modules:
mod_http_fileserver:
docroot: /var/www
accesslog: /var/log/ejabberd/access.log
directory_indices:
- index.html
- main.htm
custom_headers:
X-Powered-By: Erlang/OTP
X-Fry: "It's a widely-believed fact!"
content_types:
.ogg: audio/ogg
.png: image/png
default_content_type: text/html
Fr fr, that X-Fry header is iconic and I will not be taking questions. ๐ญ
๐ฆ mod_http_upload
note about this option: added content_types in 26.01.
This module lets clients request permission to upload a file via HTTP, exactly as described in XEP-0363: HTTP File Upload. If the request is accepted, the client gets a URL for uploading the file โ plus another URL where that file can be downloaded later. Two URLs, one slay. โจ
To use this module, it must be enabled in listen โ ejabberd_http โ [request_handlers](listen-options.md#request_handlers).
<b>Available options:</b>
access: AccessName โ defines the access rule limiting who's allowed to use the HTTP upload service. The default value islocal. And listen: if no access rule with that name exists, no user will be allowed to use the service. ๐append_module_config: {UploadHost: Options} โ note about this option: added in 26.07. Adds a few specific options to a certain upload host that was previously defined in the mod_http_uploadhostsoption. Right now onlynameandvcardcan be defined here. It's similar to the toplevelappend_host_configoption, but in this case it's applied to this module's options.content_types: {Extension: Type} โ note about this option: added in 26.01. Mappings of extension to content type, just like thecontent_typesoption ofmod_http_fileserver.custom_headers: {Name: Value} โ extra header fields to include in all HTTP responses. By default no custom headers are included.dir_mode: Permission โ the permission bits of the docroot directory and any directories created during file uploads. Bits are given as an octal number (see thechmod(1)manual page) inside double quotes. For example:"0755". The default is undefined, which means no explicit permissions will be set.docroot: Path โ uploaded files are stored below the directory given here (as an absolute path). The keyword@HOME@is replaced with the home directory of the user running ejabberd, and the keyword@HOST@with the virtual host name. The default value is"@HOME@/upload".external_secret: Text โ this one makes it possible to offload all HTTP Upload processing to a separate HTTP server. Both ejabberd and that HTTP server should share this secret and behave exactly as described at Prosody'smod_http_upload_external: Implementation. There is no default value.file_mode: Permission โ the permission bits of uploaded files. Bits are given as an octal number (see thechmod(1)manual page) inside double quotes. For example:"0644". The default is undefined, which means no explicit permissions will be set.get_url: URL โ the initial part of the GET URLs used for downloading files. The default value is undefined. When this option is undefined, it gets set to the same value asput_url. The keyword@HOST@is replaced with the virtual host name. NOTE: if GET requests are handled by this module,get_urlmust matchput_url. Setting it to a different value only makes sense if an external web server ormod_http_fileserveris used to serve the uploaded files.hostโ Deprecated. Usehostsinstead. (Yes bestie, deprecated deprecated. Don't.)hosts: [Host, ...] โ the Jabber IDs of the service. If thehostsoption isn't specified, the only Jabber ID will be the hostname of the virtual host with the prefix"upload.". The keyword@HOST@is replaced with the real virtual host name.jid_in_url: node | sha1 โ when set tonode, the node identifier of the user's JID (i.e., the user name) gets included in the GET and PUT URLs generated bymod_http_upload. Otherwise, a SHA-1 hash of the user's bare JID is included instead. The default value issha1.
<b>append_module_config example:</b>
modules:
mod_http_upload:
hosts:
- service1.@HOST@
- service2.@HOST@
name: "Service General"
append_module_config:
service1.localhost:
name: "Service 1"
service2.example.net:
name: "Service 2"
max_size: Size โ caps how big a file is even allowed to be, bestie. you gotta give it either a byte count (and it has to be larger than zero, no funny business) or the wordinfinity. default is104857600. ๐name: Name โ the name your service shows up under in Service Discovery. default is"HTTP File Upload". fair warning tho: only some XMPP clients actually bother displaying it ๐put_url: URL โ sets the front bit of the PUT URLs used for uploads. two magic keywords live here:@HOST@gets swapped for the virtual host name, and@HOST_URL_ENCODE@gets swapped for the host name encoded for URL โ which is literally your saving grace when your virtual hosts have non-latin characters in them. default is"https://@HOST@:5443/upload".
โ ๏ธ ok important: different virtual hosts cannot use the same PUT URL. like, at all. no cap.
rm_on_unregister:true|falseโ decides whether files a user uploaded get yeeted when that user gets unregistered. default istrue(yes, it cleans up after itself, slay).secret_length: Length โ how long the random string inside the GET and PUT URLs thatmod_http_uploadgenerates should be. minimum is8characters but honestly? go bigger, it's giving security ๐ . default is40.service_urlโ deprecated. that's it, that's the whole thing. she's retired ๐ซถthumbnail:true|falseโ tells ejabberd whether it should make thumbnails of uploaded images. if it does, a<thumbnail/>element comes back with the PUT response, containing the download<uri/>plus some metadata. default isfalse.vcard: vCard โ a custom vCard for the service, which some XMPP clients will show off in Service Discovery. the value is a YAML map built from the XML representation of a vCard. since that representation has no attributes, the mapping is literally straightforward, no mental gymnastics required โจ
Example:
# This XML representation of vCard:
# <vCard xmlns='vcard-temp'>
# <FN>Conferences</FN>
# <ADR>
# <WORK/>
# <STREET>Elm Street</STREET>
# </ADR>
# </vCard>
#
# is translated to:
vcard:
fn: Conferences
adr:
-
work: true
street: Elm Street
Example:
listen:
-
port: 5443
module: ejabberd_http
tls: true
request_handlers:
/upload: mod_http_upload
modules:
mod_http_upload:
docroot: /ejabberd/upload
put_url: "https://@HOST@:5443/upload"
๐ธ mod_http_upload_quota ๐ธ
this module adds quota support for mod_http_upload. she's the responsible bestie who makes sure nobody eats the whole disk ๐
this module depends on mod_http_upload. like, don't try to run her solo, it won't go well.
Available options:
access_hard_quota: AccessName โ picks which access rule defines the "hard quota" for the matching JIDs. that rule has to yield a positive number for any JID that's supposed to have a quota limit โ and that number is the count of megabytes the corresponding user may upload. when the threshold gets exceeded, ejabberd starts deleting the oldest files uploaded by that user, and keeps going until their disk usage equals or falls below the specified soft quota (peep optionaccess_soft_quotatoo). default value ishard_upload_quota.access_soft_quota: AccessName โ same deal but for the "soft quota". the rule must yield a positive number of megabytes for any JID that's supposed to have a quota limit. for the details, go read the description of theaccess_hard_quotaoption, it's all there ๐. default value issoft_upload_quota.max_days: Days โ if you give it a number larger than zero, then any files (and directories, yes, those too) older than that many days get removed from the subdirectories of thedocrootdirectory, once per day. default value isinfinity.
Examples:
๐ซถ heads up: it's not necessary to specify theaccess_hard_quotaandaccess_soft_quotaoptions in order to use the quota feature. you can just stick to the default names and only specify access rules, like the ones in this example:
shaper_rules:
soft_upload_quota:
1000: all # MiB
hard_upload_quota:
1100: all # MiB
modules:
mod_http_upload: {}
mod_http_upload_quota:
max_days: 100
๐ฆ mod_invites ๐ฆ
๐ note about this option: improved in 26.07. (glow up!!)
lets User Invitation and Account Creation make out-of-band links to onboard other people onto the XMPP network and establish a mutual subscription. this implements XEP-0379: Pre-Authenticated Roster Subscription, XEP-0401: Ad-hoc Account Invitation Generation, and XEP-0445: Pre-Authenticated In-Band Registration. it's giving โจrecruitment eraโจ
these invitations get created as XMPP URIs, either via ad-hoc commands or via API commands (like generate_invite API and generate_invite_with_username API), and they're then meant to be sent out-of-band.
the receiving user should have a client installed that supports those invitations. and since that has proven to be a common obstacle for easy adoption (๐ญ real), this module comes with an optional landing page parameter โ which can be some external service like an installation of easy-xmpp-invitation, a third-party service like JoinJabber, or, for convenience, a built-in service. that landing page then guides the recipient through setting up a client and creating an account if required. so helpful, honestly.
to use the included landing page feature, you have to set landing_page to either auto or an URL template like https://{{ host }}/invites/{{ invite.token }} if your server setup includes a so called reverse proxy. and you also need to connect this module as a handler of an ejabberd_http listener, as shown in the example below. both things, not one. both.
for convenience there's now also a start page included, at wherever you mount mod_invites at the ejabberd_http handler. this start page lets people generate invites by giving their username and password. as such the URL should be protected by HTTPS (please, bestie, protect it). main use-case? when people only have clients that don't support generating invites natively. periodt.
if you'd rather use an external service, set landing_page to something like http://{{ host }}:8080/easy-xmpp-invites/#{{ invite.uri|strip_protocol }} or https://invite.joinjabber.org/#{{ invite.uri|strip_protocol }}.
Available options:
access_create_account: Access Rule Name โ the name of an access rule specifying who's allowed to create invites of create account. default value isnone, i.e. nobody is able to create such invites. plus it applies to roster invites and allows doing in-band registration (IBR) if the sending user is allowed by this rule. and users from theadminACL are always allowed to create those invites, no questions asked ๐
Example:
mod_invites:
access_create_account: local
db_type:mnesia|sqlโ same as the top-leveldefault_dboption, but applied to this module only.landing_page:none|auto| LandingPageURLTemplate โ whether or not to use a landing page for the invites that are being created. if you're using a template URL, it can be either external or internal. template variables includehost,invite.tokenandinvite.uri, and there are filters defined too โ most notablystrip_protocol. here's an example:http://{{ host }}:8080/easy-xmpp-invites/#{{ invite.uri|strip_protocol }}. for convenience you can chooseautoand theejabberd_httphandler formod_inviteswill be used to construct the landing page URL. default isnone.max_invites:pos_integer()|infinityโ the max number of create account invites that one individual user can create. users that match theadminACL are exempt from this limitation (they're built different ๐ ). plus it restricts the use of roster invites for account creation. default isinfinity.site_name: Site Name โ a human readable name for your site. e.g."My Beautiful Laundrette". used in landing page templates. cute.templates_dir: Path โ the directory containing templates and static files used for the landing page and web registration form. you only need to set this if you want to ship your own set of templates or list of recommended apps. iykyk.token_expire_seconds:pos_integer()โ number of seconds until the token expires. default value is432000(that is five days:5 * 24 * 60 * 60).webchat_url:none|auto| Webchat URL โ ๐ note about this option: added in 26.03. URL to a webchat client. upon manual registration through the web-form this will be recommended in order to get started. ifautois chosen, we pick themod_conversejsfrom thelistenerssection. default isauto.
Examples:
basic configuration with landing page but without creating accounts, just roster invites:
listen:
-
port: 5281
module: ejabberd_http
request_handlers:
/invites: mod_invites
# [...]
modules:
mod_invites:
landing_page: auto
to allow only admin users to create invites of create account and disable regular in-band registration, you'd have a config like this:
acl:
admin:
- user: "my_admin_user@example.com"
access_rules:
register:
allow: admin
modules:
mod_invites:
landing_page: auto
mod_register:
allow_modules:
- mod_invites
if you want all your users to be able to send create account invites, you'd configure your server like this instead. note that the names of the access rules are just examples and you're free to change them ๐
acl:
local:
user_regexp: ""
access_rules:
create_account_invite:
allow: local
modules:
mod_invites:
access_create_account: create_account_invite
landing_page: auto
mod_register:
allow_modules:
- mod_invites
๐ mod_jidprep
Okay so this one is genuinely so useful โ it lets XMPP clients ask the server to normalize a JID according to the rules in RFC 6122: XMPP Address Format. Bestie, that's lowkey a lifesaver for clients stuck in certain constrained environments, and it's also iconic for testing purposes. ๐
Available options:
access: AccessNameโ tells you which access rule decides who gets to use this service. The default value islocal.
๐ mod_last
This module adds support for XEP-0012: Last Activity. It's giving "detective era" โ you can use it to discover when a disconnected user last accessed the server, to know when a connected user was last active on the server, or to query the uptime of the ejabberd server. Obsessed. โจ
Available options:
cache_life_time: timeout()โ Same as top-levelcache_life_timeoption, but applied to this module only.cache_missed: true | falseโ Same as top-levelcache_missedoption, but applied to this module only.cache_size: pos_integer() | infinityโ Same as top-levelcache_sizeoption, but applied to this module only.db_type: mnesia | sqlโ Same as top-leveldefault_dboption, but applied to this module only.use_cache: true | falseโ Same as top-leveluse_cacheoption, but applied to this module only.
๐ฆ mod_legacy_auth
The module implements XEP-0078: Non-SASL Authentication.
Note ๐ซถ This type of authentication was obsoleted in 2008 and you unlikely need this module unless you have something like outdated Jabber bots.
The module has no options. Literally zero. Nothing. Empty. A whole vibe of nothingness. ๐
๐ mod_mam
This module implements XEP-0313: Message Archive Management and XEP-0441: Message Archive Management Preferences. Compatible XMPP clients can use it to store their chat history on the server. It's giving "the server remembers everything so you don't have to" energy. ๐ธ
Note ๐ญ Mnesia backend for mod_mam is not recommended: it's limited to 2GB and often gets corrupted when reaching this limit. SQL backend is recommended. Namely, for small servers SQLite is a preferred choice because it's very easy to configure. Do not come for me, this is literally what the docs say.
Available options:
access_preferences: AccessNameโ this access rule defines who is allowed to modify the MAM preferences. The default value isall.archive_muc_as_mucsub: true | falseโ Note about this option: added in 25.10. When this option is enabled, incoming groupchat messages for users that have mucsub subscription to a room from which message originated will have those messages archived after being converted to mucsub event messages. The default value isfalse.assume_mam_usage: true | falseโ this option determines how ejabberd's stream management code (seemod_stream_mgmt) handles unacknowledged messages when the connection is lost. Usually, such messages are either bounced or resent. However, neither is done for messages that were stored in the user's MAM archive if this option is set totrue. In this case, ejabberd assumes those messages will be retrieved from the archive. The default value isfalse.cache_life_time: timeout()โ Same as top-levelcache_life_timeoption, but applied to this module only.cache_missed: true | falseโ Same as top-levelcache_missedoption, but applied to this module only.cache_size: pos_integer() | infinityโ Same as top-levelcache_sizeoption, but applied to this module only.clear_archive_on_room_destroy: true | falseโ whether to destroy message archive of a room (seemod_muc) when it gets destroyed. The default value istrue.compress_xml: true | falseโ when enabled, new messages added to archives are compressed using a custom compression algorithm. This feature works only with SQL backends. The default value isfalse.db_type: mnesia | sqlโ Same as top-leveldefault_dboption, but applied to this module only.default: always | never | rosterโ the option defines default policy for chat history. Whenalwaysis set every chat message is stored. Withrosteronly chat history with contacts from user's roster is stored. Andneverfully disables chat history. Note that a client can change its policy via protocol commands. The default value isnever.request_activates_archiving: true | falseโ if the value istrue, no messages are stored for a user until their client issue a MAM request, regardless of the value of thedefaultoption. Once the server received a request, that user's messages are archived as usual. The default value isfalse.use_cache: true | falseโ Same as top-leveluse_cacheoption, but applied to this module only.user_mucsub_from_muc_archive: true | falseโ when this option is disabled, for each individual subscriber a separate mucsub message is stored. With this option enabled, when a user fetches archive virtual mucsub, messages are generated from muc archives. The default value isfalse.
API Tags: ../../developer/ejabberd-api/admin-tags.md#mam|mam, ../../developer/ejabberd-api/admin-tags.md#purge|purge
๐ mod_matrix_gw
Note about this option: improved in 25.08.
Matrix gateway, bestie!! โจ Supports room versions 9, 10 and 11 since ejabberd 25.03; room versions 4 and higher since ejabberd 25.07; room version 12 (hydra rooms) since ejabberd 25.08. Erlang/OTP 25 or higher is required to use this module. This module is available since ejabberd 24.02. She's been around a minute and she keeps leveling up. ๐ฅ
Available options:
host: Hostโ this option defines the Jabber IDs of the service. If thehostoption is not specified, the Jabber ID will be the hostname of the virtual host with the prefix"matrix.". The keyword@HOST@is replaced with the real virtual host name.key: string()โ value of the matrix signing key, in base64.key_name: string()โ name of the matrix signing key.leave_timeout: integer()โ delay in seconds between a user leaving a MUC room and sending leave Matrix event.matrix_domain: Domainโ specify a domain in the Matrix federation. The keyword@HOST@is replaced with the hostname. The default value is@HOST@.matrix_id_as_jid: true | falseโ if set totrue, all packets failing to be delivered via an XMPP server-to-server connection will then be routed to the Matrix gateway by translating a Jabber IDuser@matrixdomain.tldto a Matrix user identifier@user:matrixdomain.tld. When set tofalse, messages must be explicitly sent to the matrix gateway service Jabber ID to be routed to a remote Matrix server. In this case, to send a message to Matrix user@user:matrixdomain.tld, the client must send a message to the JIDuser%matrixdomain.tld@matrix.myxmppdomain.tld, wherematrix.myxmppdomain.tldis the JID of the gateway service as set by thehostoption. The default isfalse.notary_servers: [Server, ...]โ a list of notary servers.
Example โ look at her go ๐ซถ:
listen:
-
port: 8448
module: ejabberd_http
tls: true
request_handlers:
"/_matrix": mod_matrix_gw
modules:
mod_matrix_gw:
key_name: "key1"
key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
matrix_id_as_jid: true
โญ mod_metrics
This module sends events to external backend (by now only grapherl is supported). Supported events are:
sm_register_connectionsm_remove_connectionuser_send_packetuser_receive_packets2s_send_packets2s_receive_packetregister_userremove_useroffline_message
When enabled, every call to these hooks triggers a counter event to be sent to the external backend. It's literally just counting vibes and shipping them out. ๐
Available options:
ip: IPv4Addressโ IPv4 address where the backend is located. The default value is127.0.0.1.port: Portโ an internet port number at which the backend is listening for incoming connections/packets. The default value is11111.
๐ง mod_mix
Note about this option: added in 16.03 and improved in 19.02.
This module is an experimental implementation of XEP-0369: Mediated Information eXchange (MIX). It's asserted that the MIX protocol is going to replace the MUC protocol in the future (see mod_muc). So like, future energy, but experimental future energy, okay? ๐
To learn more about how to use that feature, you can refer to our tutorial: ../../tutorials/mix-010.md|Getting started with MIX
The module depends on mod_mam. Yes, she needs her friend. ๐ซถ
Available options:
access_create: AccessNameโ an access rule to control MIX channels creations. The default value isall.db_type: mnesia | sqlโ Same as top-leveldefault_dboption, but applied to this module only.hostโ Deprecated. Usehostsinstead. Like, respectfully, move on. ๐hosts: [Host, ...]โ this option defines the Jabber IDs of the service. If thehostsoption is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix"mix.". The keyword@HOST@is replaced with the real virtual host name.name: Nameโ a name of the service in the Service Discovery. This will only be displayed by special XMPP clients. The default value isChannels.
๐ธ mod_mix_pam
This module implements XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements. The module is needed if MIX compatible clients on your server are going to join MIX channels (either on your server or on any remote servers). Local or remote, she doesn't gatekeep. โจ
Note ๐ทmod_mixis not required for this module to work, however, withoutmod_mix_pamthe MIX functionality of your local XMPP clients will be impaired. So like, technically optional, practically please don't skip her.
Available options:
cache_life_time: timeout()โ Same as top-levelcache_life_timeoption, but applied to this module only.cache_missed: true | falseโ Same as top-levelcache_missedoption, but applied to this module only.cache_size: pos_integer() | infinityโ Same as top-levelcache_sizeoption, but applied to this module only.db_type:mnesia|sqlโ literally the same thing as the top-leveldefault_dboption, just scoped to this module only ๐use_cache:true|falseโ same as the top-leveluse_cacheoption, but again, this module's vibe only โจ
๐ฆ mod_mqtt ๐ฆ
Okay so this one adds ../guide/mqtt/index.md|support for the MQTT protocol version 3.1.1 and 5.0 โ periodt. But bestie, listen: remember to configure mod_mqtt in both the modules and listen sections or it's giving nothing ๐
Available options, let's go ๐
access_publish:{TopicFilter: AccessName}โ access rules that restrict who can publish to which topics. No restrictions by default, so it's a free-for-all until you say otherwise ๐access_subscribe:{TopicFilter: AccessName}โ same energy but for subscribers. Also zero restrictions by default ๐cache_life_time:timeout()โ same as the top-levelcache_life_timeoption, but applied to this module only โญcache_missed:true|falseโ same as the top-levelcache_missedoption, but for this module only ๐cache_size:pos_integer()|infinityโ same as the top-levelcache_sizeoption, applied to this module only ๐ธdb_type:mnesia|sqlโ same as the top-leveldefault_dboption, applied to this module only ๐ซถmatch_retained_limit:pos_integer()|infinityโ caps how many retained messages get returned to a client when it subscribes to some topic filter. Default is1000๐ฅmax_queue:Sizeโ maximum queue size for outgoing packets. Default is5000๐max_topic_aliases:0..65535โ the max number of aliases a client can associate with topics. Default is100โจmax_topic_depth:Depthโ the max topic depth, aka the number of slashes (/) in the topic. Default is8๐ฆqueue_type:ram|fileโ same as the top-levelqueue_typeoption, but applied to this module only ๐ram_db_type:mnesiaโ same as the top-leveldefault_ram_dboption, but applied to this module only ๐session_expiry:timeout()โ how long to wait for an MQTT session resumption. If you set it to0, the session gets destroyed the moment the underlying client connection closes. Default is 5 minutes โณuse_cache:true|falseโ same as the top-leveluse_cacheoption, but applied to this module only ๐
๐ฅ mod_mqtt_bridge ๐ฅ
This icon lets you sync local MQTT topics with data sitting on remote servers. It can push topic updates to remote servers whenever a local user updates a local topic, or it can subscribe to changes on a remote server and update the local copy when the remote data changes. Available since ejabberd 23.01, ngl it's lowkey underrated ๐
Available options:
replication_user:JIDโ the identifier of the user that gets assigned as owner of local changes ๐servers:{ServerUrl: {Key: Value}}โ declares what data to share for eachServerUrl. Server URLs can use these schemas:mqtt,mqtts(mqtt with tls),mqtt5,mqtt5s(both of these trigger v5 protocol),ws,wss,ws5,wss5๐ The keys must be:authentication:{AuthKey: AuthValue}โ a list of authentication info, whereAuthKeycan be theusernameandpasswordfields, orcertfilepointing to a client certificate. Heads up bestie: certificate authentication only works withmqtts,mqtt5s,wss,wss5๐publish:{LocalTopic: RemoteTopic}โ eitherpublishorsubscribemust be set, or both โจsubscribe:{RemoteTopic: LocalTopic}โ eitherpublishorsubscribemust be set, or both โจ
Example, slay:
modules:
mod_mqtt_bridge:
replication_user: "mqtt@xmpp.server.com"
servers:
"mqtt://server.com":
authentication:
certfile: "/etc/ejabberd/mqtt_server.pem"
publish:
"localA": "remoteA" # local changes to 'localA' will be replicated on remote server as 'remoteA'
"topicB": "topicB"
subscribe:
"remoteB": "localB" # changes to 'remoteB' on remote server will be stored as 'localB' on local server
๐ mod_muc ๐
Note about this option: incorporatedmod_muc_occupantidin26.02๐ซถ
This module is the whole Multi-User Chat (MUC) situation โ users can discover existing rooms, join them, or create their own. Occupants of a room can chat in public or have private chats. Main character energy fr fr ๐
Protocols implemented in this module:
- XEP-0045: Multi-User Chat
- XEP-0249: Direct MUC Invitations
- XEP-0421: Occupant identifiers for semi-anonymous MUCs
- XEP-0486: MUC Avatars
- Muc/Sub: Multi-User Chat Subscriptions
The MUC service lets any Jabber ID register a nickname, so nobody else can steal that nickname in any room across the whole MUC service. To register a nickname, open the Service Discovery in your XMPP client and register in the MUC service โจ
You can also register a nickname in a room, so nobody else can use that nickname in that room. And here's the tea: if a nick is registered in the MUC service, it can't be registered in any room, and vice versa โ a nick registered in a room can't be registered at the MUC service. Mutual exclusivity, we love to see it ๐
This module supports clustering and load balancing. One module can be started per cluster node. Rooms are distributed at creation time across all available MUC module instances. The multi-user chat module is clustered, but the rooms themselves are not clustered and not fault-tolerant: if the node managing a set of rooms goes down, those rooms disappear ๐ญ and they'll be recreated on an available node on the first connection attempt.
Available options:
access:AccessNameโ you can specify who's allowed to use the Multi-User Chat service. By default, everyone is allowed ๐access_admin:AccessNameโ specifies who's allowed to administrate the Multi-User Chat service. Default isnone, which means only the room creator can administer their own room. Administrators can send a normal message to the service JID and it'll show up in all active rooms as a service message. They can also send a groupchat message to the JID of an active room, and it'll be shown in that room as a service message ๐access_create:AccessNameโ configures who's allowed to create new rooms at the Multi-User Chat service. Default isall, meaning everyone can create rooms ๐access_mam:AccessNameโ configures who's allowed to modify themamroom option. Default isall, meaning everyone's allowed to modify it ๐ฆaccess_persistent:AccessNameโ configures who's allowed to modify thepersistentroom option. Default isall, meaning everyone's allowed to modify it ๐ธaccess_register:AccessNameโ specifies who's allowed to register a nickname within the Multi-User Chat service and rooms.
Note about this option: improved in23.10. The default isallfor backward compatibility, meaning any user is allowed to register any free nick in the MUC service and in the rooms ๐
append_module_config:{MUCHost: Options}โ add a few specific options to a certain MUC host that was previously defined in themod_muchostsoption. It's similar to the toplevelappend_host_configoption, but here it applies to themod_mucoptions instead.
Note about this option: added in 26.07 โจ
Example:
modules:
mod_muc:
hosts:
- service1.@HOST@
- service2.@HOST@
name: "Service General"
append_module_config:
service1.localhost:
name: "Service 1"
service2.example.net:
name: "Service 2"
cleanup_affiliations_on_start:true|falseโ removes affiliations for non-existing local users on startup. Default isfalse.
Note about this option: added in 22.05 ๐งน
db_type:mnesia|sqlโ same as the top-leveldefault_dboption, but applied to this module only ๐default_room_options:Optionsโ defines the default room options. Just so you know, the creator of a room can modify their room's options at any time using an XMPP client with MUC capability ๐ TheOptionsare:allow_change_subj:true|falseโ allow occupants to change the subject. Default istrue๐allow_private_messages_from_visitors:anyone|moderators|nobodyโ visitors can send private messages to other occupants. Default isanyone, meaning visitors can DM any occupant ๐allow_query_users:true|falseโ occupants can send IQ queries to other occupants. Default istrueโจallow_subscription:true|falseโ allow users to subscribe to room events as described in../../developer/xmpp-clients-bots/extensions/muc-sub.md|Multi-User Chat Subscriptions. Default isfalse๐ธallow_user_invites:true|falseโ allow occupants to send invitations. Default isfalse๐allow_visitor_nickchange:true|falseโ allow visitors to change their nickname. Default istrue๐allow_visitor_status:true|falseโ allow visitors to send status text in presence updates. If disallowed, the status text gets stripped before the presence update is broadcast to all room occupants. Default istrueโ๏ธallow_voice_requests:true|falseโ allow visitors in a moderated room to request voice. Default istrue๐คallowpm:anyone|participants|moderators|noneโ who can send private messages. Default isanyone๐ฌanonymous:true|falseโ the room is anonymous, so occupants don't see the real JIDs of other occupants. Note that room moderators can always see the real JIDs of the occupants. Default istrue๐ต๏ธโโ๏ธ
captcha_protected: true | falseโ if a user tries to join a room where they have, like, no affiliation (not an owner, not an admin, not a member), the room hits them with a CAPTCHA challenge before letting them in โ see the sectionbasic.md#captcha|CAPTCHA. The default value isfalse. ๐งdescription: Room Descriptionโ a short lil description of the room. The default value is an empty string.enable_hats: true | falseโ note about this option: improved in 25.10</p> โจ It allows extended roles as defined in XEP-0317: Hats. Forejabberdolder than 25.10, go peek at the../../tutorials/muc-hats.md|MUC Hatspage. The default value istrue.lang: Languageโ the preferred language for the discussions happening in the room. The language format should conform to RFC 5646. There is no value by default.logging: true | falseโ the public messages get logged usingmod_muc_log. The default value isfalse.mam: true | falseโ enables message archiving. This impliesmod_mamis enabled. The default value isfalse.max_users: Numberโ maximum number of occupants allowed in the room. The default value is200.members_by_default: true | falseโ the occupants who enter the room are participants by default, so they get "voice". The default value istrue.members_only: true | falseโ only members of the room can enter. The default value isfalse.moderated: true | falseโ only occupants with "voice" can send public messages. The default value istrue.password: Passwordโ the password of the room. This implies the optionpassword_protectedis set totrue. There is no default value.password_protected: true | falseโ the password is required to enter the room. The default value isfalse.persistent: true | falseโ the room persists even if the last participant leaves. The default value isfalse.presence_broadcast: [Role]โ a list of roles whose presence gets broadcasted. The list can contain one or several of:moderator,participant,visitor. The default value is shown in the example below:
Example:
presence_broadcast:
- moderator
- participant
- visitor
public: true | falseโ the room is public in the list of the MUC service, so it can be discovered. MUC admins and room participants will see private rooms in Service Discovery if their XMPP client supports this feature. The default value istrue.public_list: true | falseโ the list of participants is public, without requiring anyone to actually enter the room. The default value istrue.pubsub: PubSub Nodeโ XMPP URI of the associated Publish/Subscribe node. The default value is an empty string.title: Room Titleโ a human-readable title of the room. There is no default value ๐vcard: vCardโ a custom vCard for the room. See the equivalentmod_mucoption. The default value is an empty string.vcard_xupdate: undefined | external | AvatarHashโ sets the hash of the avatar image. The default value isundefined.voice_request_min_interval: Numberโ minimum interval between voice requests, in seconds. The default value is1800.
hibernation_timeout: infinity | Secondsโ timeout before hibernating the room process, expressed in seconds. The default value isinfinity.history_size: Sizeโ okay so a small history of the current discussion gets sent to users when they enter the room. With this option you define the number of history messages to keep and send to users joining the room. The value is a non-negative integer. Setting the value to0disables the history feature and, as a result, nothing is kept in memory. The default value is20. This value affects all rooms on the service. NOTE: modern XMPP clients rely on Message Archives (XEP-0313), so feel free to disable the history feature if youโre only using modern clients and havemod_mammodule loaded. ๐ฆhostโ Deprecated. Usehostsinstead.hosts: [Host, ...]โ this option defines the Jabber IDs of the service. If thehostsoption is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix"conference.". The keyword@HOST@is replaced with the real virtual host name.max_captcha_whitelist: Numberโ note about this option: added in 21.01</p> This option defines the maximum number of characters that Captcha Whitelist can have when configuring the room. The default value isinfinity.max_password: Numberโ note about this option: added in 21.01</p> This option defines the maximum number of characters that Password can have when configuring the room. The default value isinfinity.max_room_desc: Numberโ this option defines the maximum number of characters that Room Description can have when configuring the room. The default value isinfinity.max_room_id: Numberโ this option defines the maximum number of characters that Room ID can have when creating a new room. The default value isinfinity.max_room_name: Numberโ this option defines the maximum number of characters that Room Name can have when configuring the room. The default value isinfinity.max_rooms_discoitems: Numberโ when there are more rooms than this Number, only the non-empty ones are returned in a Service Discovery query. The default value is100.max_user_conferences: Numberโ this option defines the maximum number of rooms that any given user can join. The default value is100. It's there to prevent possible abuses. Note that this is a soft limit: some users can sometimes join more conferences in cluster configurations. ๐max_users: Numberโ this option defines, at the service level, the maximum number of users allowed per room. It can be lowered in each room configuration, but it cannot be increased in individual room configuration. The default value is200.max_users_admin_threshold: Numberโ this option defines the number of service admins or room owners allowed to enter the room when the maximum number of allowed occupants was reached. The default limit is5.max_users_presence: Numberโ this option defines after how many users in the room it's considered overcrowded. When a MUC room is considered overcrowded, presence broadcasts are limited to reduce load, traffic and the excessive presence "storm" received by participants. The default value is1000.min_message_interval: Numberโ this option defines the minimum interval between two messages sent by an occupant, in seconds. This option is global and valid for all rooms. A decimal value can be used. When this option is not defined, message rate is not limited. This feature can protect a MUC service from occupant abuses and limit the number of messages that will be broadcasted by the service. A good value for this minimum message interval is0.4second. If an occupant tries to send messages faster, an error is sent back explaining that the message has been discarded and describing the reason why the message is not acceptable.min_presence_interval: Numberโ this option defines the minimum amount of time between presence changes coming from a given occupant, in seconds. This option is global and valid for all rooms. A decimal value can be used. When this option is not defined, no restriction is applied. It can protect a MUC service from occupant abuses. If an occupant tries to change their presence more often than the specified interval, the presence is cached byejabberdand only the last presence is broadcasted to all occupants in the room after expiration of the interval delay. Intermediate presence packets are silently discarded. A good value for this option is4seconds.name: string()โ the value of the service name. This name is only visible in some clients that support XEP-0030: Service Discovery. The default isChatrooms.preload_rooms: true | falseโ whether to load all persistent rooms in memory on startup. If disabled, the room is only loaded on first participant join. The default istrue. It makes sense to disable room preloading when the number of rooms is high: this will improve server startup time and memory consumption. โญqueue_type: ram | fileโ same as the top-levelqueue_typeoption, but applied to this module only.ram_db_type: mnesia | sqlโ same as the top-leveldefault_ram_dboption, but applied to this module only.regexp_room_id: string()โ this option defines the regular expression that a Room ID must satisfy to allow the room creation. The default value is the empty string.room_shaper: none | ShaperNameโ this option defines shaper for the MUC rooms. The default value isnone.user_message_shaper: none | ShaperNameโ this option defines shaper for the users messages. The default value isnone.user_presence_shaper: none | ShaperNameโ this option defines shaper for the users presences. The default value isnone.vcard: vCardโ a custom vCard of the service that will be displayed by some XMPP clients in Service Discovery. The value ofvcardis a YAML map constructed from an XML representation of vCard. Since the representation has no attributes, the mapping is straightforward. ๐
Example:
# This XML representation of vCard:
# <vCard xmlns='vcard-temp'>
# <FN>Conferences</FN>
# <ADR>
# <WORK/>
# <STREET>Elm Street</STREET>
# </ADR>
# </vCard>
#
# is translated to:
vcard:
fn: Conferences
adr:
-
work: true
street: Elm Street
mod_muc_admin
Okay so this one is lowkey the backstage pass for your local MUC services and all their MUC rooms ๐๏ธ โ it gives you commands to administer them, plus some cute little WebAdmin pages so you can actually look at the rooms that exist instead of just vibing in the dark.
Heads up bestie: this module depends on mod_muc. No mod_muc, no party.
Available options:
subscribe_room_many_max_users(Number) โ ๐ซถ note: added in 22.05. This is the cap on how many users can be subscribed to a room at once when you use thesubscribe_room_manyAPI. The default value is50.
API Tags: ../../developer/ejabberd-api/admin-tags.md#muc|muc, ../../developer/ejabberd-api/admin-tags.md#muc_room|muc_room, ../../developer/ejabberd-api/admin-tags.md#muc_sub|muc_sub
mod_muc_log
This module โจ optionally logs Multi-User Chat (MUC) public conversations to HTML. So once you enable it, users can join a room with a MUC capable XMPP client, and โ if they've got enough privileges โ they can pull up the configuration form and flip the option that turns room logging on. It's giving scrapbook but for group chats ๐
Features, and honestly, slay:
- Room details get added on top of each page: room title, JID, author, subject and configuration. The whole vibe check up front ๐
- The room JID in the generated HTML is a link to join the room (using XMPP URI). clickable. iconic.
- Subject and room configuration changes are tracked and displayed.
- Joins, leaves, nick changes, kicks, bans and
/meare all tracked and displayed โ including the reason, if there is one. receipts = kept ๐งพ - Generated HTML files are XHTML 1.0 Transitional and CSS compliant.
- Timestamps are self-referencing links.
- Links on top for quicker navigation: Previous day, Next day, Up.
- CSS is used for style definition, and a custom CSS file can be used. customize ur heart out ๐
- URLs on messages and subjects are converted to hyperlinks.
- The timezone used on timestamps is shown on the log files.
- A custom link can be added on top of each page.
And yes โ the module depends on mod_muc.
Available options:
access_log(AccessName) โ this restricts which occupants are allowed to enable or disable room logging. The default value ismuc_admin. โ ๏ธ NOTE: for this default setting you need to have an access rule formuc_adminin order for it to take effect.cssfile(Path | URL) โ decides whether the HTML files should have a custom CSS file or just use the embedded CSS. Allowed values are either a Path to a local file or a URL to a remote file. By default a predefined CSS will be embedded into the HTML page.dirname(room_jid | room_name) โ configures the name of the room directory. If set toroom_jid, the room directory name will be the full room JID. Otherwise, the room directory name will be only the room name, not including the MUC service name. The default value isroom_jid.dirtype(subdirs | plain) โ the type of the created directories. If set tosubdirs, subdirectories are created for each year and month. Otherwise the names of the log files contain the full date, and there are no subdirectories. The default value issubdirs. ๐๏ธfile_format(html | plaintext) โ defines the format of the log files:htmlstores in HTML format,plaintextstores in plain text. The default value ishtml.file_permissions({mode: Mode, group: Group}) โ the permissions that must be used when creating the log files: the number of the mode, and the numeric id of the group that will own the files. The default value is shown in the example below:
file_permissions:
mode: 644
group: 33
outdir(Path) โ sets the full path to the directory in which the HTML files should be stored. ๐ด Make sure the ejabberd daemon user has write access on that directory, fr fr. The default value iswww/muc.spam_prevention(true | false) โ if set totrue, a special attribute is added to links that prevents their indexation by search engines. The default value istrue, which means thatnofollowattributes will be added to user submitted links. bye-bye crawlers ๐ซ๐คtimezone(local | universal) โ the time zone for the logs. If set tolocal, the local time, as reported to the Erlang emulator by the operating system, will be used. Otherwise, UTC time will be used. The default value islocal.top_link({URL: Text}) โ lets you customize the link on the top right corner of each log file. The default value is shown in the example below:
top_link:
/: Home
url(URL) โ a top level URL where a client can access logs of a particular conference. The conference name is appended to the URL if thedirnameoption is set toroom_name, or a conference JID is appended to the URL otherwise. There is no default value.
mod_muc_rtbl
โญ note: added in 23.04.
This module implements Real-time blocklists for MUC rooms ๐ก๏ธ โ it works by observing a remote pubsub node conforming with the specification described in https://xmppbl.org/. Very "security guard energy" of it, honestly.
Available options:
rtbl_node(PubsubNodeName) โ the name of the pubsub node that should be used to track blocked users. The default value ismuc_bans_sha256.rtbl_server(Domain) โ the domain of the XMPP server that serves the block list. The default value isxmppbl.org.
mod_multicast
This module implements a service for XEP-0033: Extended Stanza Addressing ๐ฌ โ one message, many destinations, no extra effort. main character service tbh.
Available options:
access(Access) โ the access rule to restrict who can send packets to the multicast service. Default value:all.hostโ ๐ Deprecated. Usehostsinstead. (put it away bestie, we don't use it anymore)hosts([Host, ...]) โ defines the Jabber IDs of the service. If thehostsoption is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix"multicast.". The keyword@HOST@is replaced with the real virtual host name. โ ๏ธ Please note: this module only uses the first vhost defined in this option.limits(Sender: Stanza: Number) โ specify a list of custom limits which override the default ones defined in XEP-0033. Limits are defined per sender type and stanza type, where:- sender can be:
localorremote. - stanza can be:
messageorpresence. - number can be a positive integer or
infinite.
- sender can be:
Example:
# Default values:
local:
message: 100
presence: 100
remote:
message: 20
presence: 20
nameโ service name to provide in the Info query to the Service Discovery. Default is"Multicast".vcardโ vCard element to return when queried. Default value isundefined.
Example:
# Only admins can send packets to multicast service
access_rules:
multicast:
- allow: admin
# If you want to allow all your users:
access_rules:
multicast:
- allow
# This allows both admins and remote users to send packets,
# but does not allow local users
acl:
allservers:
server_glob: "*"
access_rules:
multicast:
- allow: admin
- deny: local
- allow: allservers
modules:
mod_multicast:
host: multicast.example.org
access: multicast
limits:
local:
message: 40
presence: infinite
remote:
message: 150
mod_offline
This module implements XEP-0160: Best Practices for Handling Offline Messages and XEP-0013: Flexible Offline Message Retrieval ๐ฅ Which basically means: every message sent to an offline user gets stored on the server until that user comes back online. So it's very similar to how email works โ the server is holding your mail, bestie ๐
A user is considered offline if no session presence priority > 0 are currently open.
The delete_expired_messages API allows to delete expired messages, and the delete_old_messages API deletes older ones. ๐๏ธ
Available options:
access_max_user_messages(AccessName) โ defines which access rule will be enforced to limit the maximum number of offline messages that a user can have (their quota). When a user has too many offline messages, any new messages that they receive are discarded, and a<resource-constraint/>error is returned to the sender. The default value ismax_user_offline_messages.bounce_groupchat(true | false) โ this option is used to disable an optimization that avoids bouncing error messages when groupchat messages could not be stored as offline. It will reduce chat room load, without any drawback in standard use cases. ๐ซถ You may change the default value only if you have a custom module which uses an offline hook aftermod_offline. This option can be useful for both standard MUC and MucSub, but the bounce is much more likely to happen in the context of MucSub, so it is even more important to have it on large MucSub services. The default value isfalse, meaning the optimization is enabled.cache_life_time(timeout()) โ same as the top-levelcache_life_timeoption, but applied to this module only.cache_size(pos_integer() | infinity) โ same as the top-levelcache_sizeoption, but applied to this module only.db_type(mnesia | sql) โ same as the top-leveldefault_dboption, but applied to this module only.store_empty_bodyโtrue|false|unless_chat_state. Are we storing messages that have no<body/>element? The default isunless_chat_state, which means ejabberd stores messages even without<body/>, unless they only contain a chat state notification (as defined in XEP-0085: Chat State Notifications). ๐store_groupchatโtrue|false. Do we store groupchat messages? Default isfalse.use_cacheโtrue|false. Same as the top-leveluse_cacheoption, but it only applies to this module.use_mam_for_storageโtrue|false. This one is experimental, bestie. Enabling it makes this module use the archive table frommod_maminstead of its own spool table to retrieve messages received while the user was offline. It lets client developers slowly drop XEP-0160 and rely on XEP-0313 instead. It also further reduces storage when you enable MucSub. Known drawback for now: most flexible message retrieval queries donโt work โ specifically those that allow retrieval/deletion of messages by id โ but this specification is not widely used. Default isfalseto keep former behaviour as default.
Examples:
acl:
admin:
user:
- admin1@localhost
- admin2@example.org
poweruser:
user:
- bob@example.org
- jane@example.org
shaper_rules:
max_user_offline_messages:
- 5000: poweruser
- 2000: admin
- 100
modules:
...
mod_offline:
access_max_user_messages: max_user_offline_messages
...
API Tags: ../../developer/ejabberd-api/admin-tags.md#offline|offline
๐ mod_ping
This module implements support for XEP-0199: XMPP Ping and periodic keepalives. When this module is enabled, ejabberd responds correctly to ping requests, as defined by the protocol. โจ
Available options:
ping_ack_timeoutโtimeout(). How long to wait before deeming that a client has not answered a given server ping request. NOTE: whenmod_stream_mgmtis loaded and stream management is enabled by a client, this value is ignored, and theack_timeoutapplies instead. Default isundefined.ping_intervalโtimeout(). How often to send pings to connected clients, ifsend_pingsis set totrue. If a client connection does not send or receive any stanza within this interval, a ping request is sent to the client. Default is1 minute.send_pingsโtrue|false. If this istrue, the server sends pings to connected clients that are not active in the interval defined inping_interval. Useful to keep client connections alive or checking availability. Default isfalse.timeout_actionโnone|kill. What to do when a client does not answer a server ping request in less than the period defined inping_ack_timeout:killmeans destroying the underlying connection,nonemeans do nothing. NOTE: whenmod_stream_mgmtis loaded and stream management is enabled by a client, killing the client connection doesnโt mean killing the client session โ the session will be kept alive to give the client a chance to resume it. Default isnone.
Example:
modules:
mod_ping:
send_pings: true
ping_interval: 4 min
timeout_action: kill
๐จ mod_pres_counter
This module detects flood/spam in presence subscriptions traffic. If a user sends or receives more of those stanzas in a given time interval, the exceeding stanzas are silently dropped, and a warning is logged. ๐
Available options:
countโNumber. The number of subscription presence stanzas (subscribe,unsubscribe,subscribed,unsubscribed) allowed for any direction (input or output) per the time defined ininterval. Please note that two users subscribing to each other usually generate 4 stanzas, so the recommended value is 4 or more. Default is5.intervalโtimeout(). The time interval. Default is1 minute.
Example:
modules:
mod_pres_counter:
count: 5
interval: 30 secs
๐ต๏ธ mod_privacy
This module implements XEP-0016: Privacy Lists. ๐
๐ Note โ Nowadays modern XMPP clients rely on XEP-0191: Blocking Command, which is implemented bymod_blocking. However, you still needmod_privacyloaded in order formod_blockingto work.
Available options:
cache_life_timeโtimeout(). Same as the top-levelcache_life_timeoption, but applied to this module only.cache_missedโtrue|false. Same as the top-levelcache_missedoption, but applied to this module only.cache_sizeโpos_integer()|infinity. Same as the top-levelcache_sizeoption, but applied to this module only.db_typeโmnesia|sql. Same as the top-leveldefault_dboption, but applied to this module only.use_cacheโtrue|false. Same as the top-leveluse_cacheoption, but applied to this module only.
๐ mod_private
This module adds support for XEP-0049: Private XML Storage. ๐พ
Using this method, XMPP entities can store private data on the server, retrieve it whenever necessary, and share it between multiple connected clients of the same user. The data stored might be anything, as long as it is a valid XML. One typical usage is storing a bookmark of all userโs conferences (XEP-0048: Bookmarks).
It also implements the bookmark conversion described in XEP-0402: PEP Native Bookmarks, see bookmarks_to_pep API.
Available options:
cache_life_timeโtimeout(). Same as the top-levelcache_life_timeoption, but applied to this module only.cache_missedโtrue|false. Same as the top-levelcache_missedoption, but applied to this module only.cache_sizeโpos_integer()|infinity. Same as the top-levelcache_sizeoption, but applied to this module only.db_typeโmnesia|sql. Same as the top-leveldefault_dboption, but applied to this module only.use_cacheโtrue|false. Same as the top-leveluse_cacheoption, but applied to this module only.
API Tags: ../../developer/ejabberd-api/admin-tags.md#private|private
๐ mod_privilege
Note about this option: improved in 24.10.
This module is an implementation of XEP-0356: Privileged Entity. This extension allows components to have privileged access to other entity data (send messages on behalf of the server or on behalf of a user, get/set user roster, access presence information, etc.). This may be used to write powerful external components, for example implementing an external PEP or MAM service. โจ
By default a component does not have any privileged access. It is worth noting that the permissions grant access to the component to a specific data type for all users of the virtual host on which mod_privilege is loaded.
Make sure you have a listener configured to connect your component. Check the section about listening ports for more information.
โ ๏ธ Warning โ Security issue: Privileged access gives components access to sensitive data, so permission should be granted carefully, only if you trust a component.
๐ Note โ This module is complementary to mod_delegation, but can also be used separately.
Available options:
iqโ{Namespace: Options}. This option defines namespaces and their IQ permissions. By default no permissions are given. The Options are:bothโAccessName. Allows sending IQ stanzas of typegetandset. Default isnone.getโAccessName. Allows sending IQ stanzas of typeget. Default isnone.setโAccessName. Allows sending IQ stanzas of typeset. Default isnone.
messageโOptions. This option defines permissions for messages. By default no permissions are given. The Options are:outgoingโAccessName. The option defines an access rule for sending outgoing messages by the component. Default isnone.
presenceโOptions. This option defines permissions for presences. By default no permissions are given. The Options are:managed_entityโAccessName. An access rule that gives permissions to the component to receive server presences. Default isnone.rosterโAccessName. An access rule that gives permissions to the component to receive the presence of both the users and the contacts in their roster. Default isnone.
rosterโOptions. This option defines roster permissions. By default no permissions are given. The Options are:bothโAccessName. Sets read/write access to a userโs roster. Default isnone.getโAccessName. Sets read access to a userโs roster. Default isnone.setโAccessName. Sets write access to a userโs roster. Default isnone.
Example:
modules:
mod_privilege:
iq:
http://jabber.org/protocol/pubsub:
get: all
roster:
get: all
presence:
managed_entity: all
message:
outgoing: all
๐ฆ mod_providers
Note about this option: added in 25.08.
This module serves JSON provider files API v2 as described by XMPP Providers. ๐ฆ
Okay so this module literally attempts to fill some properties gathering values automatically from your existing ejabberd configuration. Try enabling the module, check what values are displayed, and then customize using the options. It's giving auto-detect, but make it yours. โจ
To use this module, in addition to adding it to the modules section, you must also enable it in listen โ ejabberd_http โ listen-options.md#request_handlers|request_handlers. Notice you should set in listen.md#ejabberd_http|ejabberd_http the option listen-options.md#tls|tls enabled. Don't skip this step, bestie.
Available options:
alternativeJids: [string()]โ List of JIDs (XMPP server domains) a provider offers for registration other than its main JID. The default value is[].busFactor: integer()โ Bus factor of the XMPP service (i.e., the minimum number of team members that the service could not survive losing) or-1for n/a. The default value is-1.freeOfCharge: true | falseโ Whether the XMPP service can be used for free. The default value isfalse.languages: [string()]โ List of language codes that your pages are available. Some options define URL where the keyword@LANGUAGE_URL@will be replaced with each of those language codes. The default value is a list with the language set in the optionlanguage, for example:[en].legalNotice: string()โ Legal notice web page (per language). The keyword@LANGUAGE_URL@is replaced with each language. The default value is"".maximumHttpFileUploadStorageTime: integer()โ Maximum storage duration of each shared file (number in days,0for no limit or-1for less than 1 day). The default value is the same as optionmax_daysfrom modulemod_http_upload_quota, or0otherwise.maximumHttpFileUploadTotalSize: integer()โ Maximum size of all shared files in total per user (number in megabytes (MB),0for no limit or-1for less than 1 MB). Attention: MB is used instead of MiB (e.g.,104,857,600 bytes = 100 MiB H 104 MB). This property is not about the maximum size of each shared file, which is already retrieved via XMPP. The default value is the value of the shaper value of optionaccess_hard_quotafrom modulemod_http_upload_quota, or0otherwise.maximumMessageArchiveManagementStorageTime: integer()โ Maximum storage duration of each exchanged message (number in days,0for no limit or-1for less than 1 day). The default value is0.organization: string()โ Type of organization providing the XMPP service. Allowed values are:company,"commercial person","private person",governmental,"non-governmental"or"". The default value is"".passwordReset: string()โ Password reset web page (per language) used for an automatic password reset (e.g., via email) or describing how to manually reset a password (e.g., by contacting the provider). The keyword@LANGUAGE_URL@is replaced with each language. The default value is an URL built automatically ifmod_register_webis configured as arequest_handler, or""otherwise.professionalHosting: true | falseโ Whether the XMPP server is hosted with good internet connection speed, uninterruptible power supply, access protection and regular backups. The default value isfalse.serverLocations: [string()]โ List of language codes of Server/Backup locations. The default value is an empty list:[].serverTesting: true | falseโ Whether tests against the providerโs server are allowed (e.g., certificate checks and uptime monitoring). The default value isfalse.since: string()โ Date since the XMPP service is available. The default value is an empty string:"".website: string()โ Provider website. The keyword@LANGUAGE_URL@is replaced with each language. The default value is"".
Example:
listen:
-
port: 443
module: ejabberd_http
tls: true
request_handlers:
/.well-known/xmpp-provider-v2.json: mod_providers
modules:
mod_providers:
alternativeJids: ["example1.com", "example2.com"]
busFactor: 1
freeOfCharge: true
languages: [ag, ao, bg, en]
legalNotice: "http://@HOST@/legal/@LANGUAGE_URL@/"
maximumHttpFileUploadStorageTime: 0
maximumHttpFileUploadTotalSize: 0
maximumMessageArchiveManagementStorageTime: 0
organization: "non-governmental"
passwordReset: "http://@HOST@/reset/@LANGUAGE_URL@/"
professionalHosting: true
serverLocations: [ao, bg]
serverTesting: true
since: "2025-12-31"
website: "http://@HOST@/website/@LANGUAGE_URL@/"
๐ฆ mod_proxy65
This module implements XEP-0065: SOCKS5 Bytestreams. It allows ejabberd to act as a file transfer proxy between two XMPP clients. Proxy era, but make it XMPP. ๐ซถ
Available options:
access: AccessNameโ Defines an access rule for file transfer initiators. The default value isall. You may want to restrict access to the users of your server only, in order to avoid abusing your proxy by the users of remote servers.append_module_config: {ProxyHost: Options}โ Note about this option: added in 25.xx. Add a few specific options to a certain upload host previously defined in themod_proxy65hostsoption. Right now onlynameandvcardcan be defined here. This is similar to the toplevelappend_host_configoption, but in this case itโs applied to this module options.
Example:
modules:
mod_proxy65:
hosts:
- service1.@HOST@
- service2.@HOST@
name: "Service General"
append_module_config:
service1.localhost:
name: "Service 1"
service2.example.net:
name: "Service 2"
auth_type: anonymous | plainโ SOCKS5 authentication type. The default value isanonymous. If set toplain, ejabberd will use authentication backend as it would for SASL PLAIN.hostโ Deprecated. Usehostsinstead.hostname: Hostโ Defines a hostname offered by the proxy when establishing a session with clients. This is useful when you run the proxy behind a NAT. The keyword@HOST@is replaced with the virtual host name. The default is to use the value ofipoption. Examples:proxy.mydomain.org,200.150.100.50.hosts: [Host, ...]โ This option defines the Jabber IDs of the service. If thehostsoption is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix"proxy.". The keyword@HOST@is replaced with the real virtual host name.ip: IPAddressโ This option specifies which network interface to listen for. The default value is an IP address of the serviceโs DNS name, or, if fails,127.0.0.1.max_connections: pos_integer() | infinityโ Maximum number of active connections per file transfer initiator. The default value isinfinity.name: Nameโ The value of the service name. This name is only visible in some clients that support XEP-0030: Service Discovery. The default is"SOCKS5 Bytestreams".port: 1..65535โ A port number to listen for incoming connections. The default value is7777.ram_db_type: mnesia | redis | sqlโ Same as top-leveldefault_ram_dboption, but applied to this module only.recbuf: Sizeโ A size of the buffer for incoming packets. If you define a shaper, set the value of this option to the size of the shaper in order to avoid traffic spikes in file transfers. The default value is65536bytes.shaper: Shaperโ This option defines a shaper for the file transfer peers. A shaper with the maximum bandwidth will be selected. The default isnone, i.e. no shaper.sndbuf: Sizeโ A size of the buffer for outgoing packets. If you define a shaper, set the value of this option to the size of the shaper in order to avoid traffic spikes in file transfers. The default value is65536bytes.vcard: vCardโ A custom vCard of the service that will be displayed by some XMPP clients in Service Discovery. The value ofvCardis a YAML map constructed from an XML representation of vCard. Since the representation has no attributes, the mapping is straightforward.
Example:
acl:
admin:
user: admin@example.org
proxy_users:
server: example.org
access_rules:
proxy65_access:
allow: proxy_users
shaper_rules:
proxy65_shaper:
none: admin
proxyrate: proxy_users
shaper:
proxyrate: 10240
modules:
mod_proxy65:
host: proxy1.example.org
name: "File Transfer Proxy"
ip: 200.150.100.1
port: 7778
max_connections: 5
access: proxy65_access
shaper: proxy65_shaper
recbuf: 10240
sndbuf: 10240
๐ธ mod_pubsub
This module offers a service for XEP-0060: Publish-Subscribe. The functionality in mod_pubsub can be extended using plugins. The plugin that implements PEP (XEP-0163: Personal Eventing via Pubsub) is enabled in the default ejabberd configuration file, and it requires mod_caps. Pubsub girlies, rise. ๐
Available options:
access_createnode: AccessNameโ This option restricts which users are allowed to create pubsub nodes usingaclandaccess. By default any account in the local ejabberd server is allowed to create pubsub nodes. The default value is:all.append_module_config: {PubSubHost: Options}โ new drop, added in 26.07 โจ This one lets you bolt a few extra options onto a specific PubSub host that you already defined up inmod_pubsub'shostsoption. rn the only keys you can put here arenameandvcard. It's basically the same energy as the top-levelappend_host_configoption, except it applies to this module's options instead. ๐
Example:
modules:
mod_pubsub:
hosts:
- service1.@HOST@
- service2.@HOST@
name: "Service General"
append_module_config:
service1.localhost:
name: "Service 1"
service2.example.net:
name: "Service 2"
db_type: mnesia | sqlโ same vibe as the top-leveldefault_dboption, but it only applies to this module. no cap ๐ซถdefault_node_config: List of Key:Valueโ use this to override the default node configuration no matter which node plugin is in play. The value is a list of key-value definitions. Important detail bestie: node configuration still uses the default configuration defined by the node plugin, and this configurable list just overrides whichever items you specify. ๐force_node_config: List of Node and the list of its Key:Valueโ defines the configuration for specific nodes. The default value is[].
Example:
force_node_config:
## Avoid buggy clients to make their bookmarks public
storage:bookmarks:
access_model: whitelist
hostโ deprecated ๐ usehostsinstead, bestie.hosts: [Host, ...]โ this option defines the Jabber IDs of the service. If you don't specifyhosts, the only Jabber ID will be the hostname of the virtual host with the prefix"pubsub.". The keyword@HOST@gets replaced with the real virtual host name. ๐ignore_pep_from_offline: false | trueโ controls whether or not we should get last published PEP items from users in our roster who are offline when we connect. Value istrueorfalse. If it's not defined, pubsub assumestrue, so we only get the last items of online contacts. ๐last_item_cache: false | trueโ whether pubsub should cache last items. Value istrueorfalse. If it's not defined, pubsub does not cache last items. On systems with not so many nodes, caching last items speeds up pubsub and lets you raise the user connection rate. The cost? Memory usage, because every item is stored in memory. ๐max_item_expire_node: timeout() | infinityโ added in 21.12 ๐ฆ specifies the maximum item expiry time. Default value isinfinity.max_items_node: non_neg_integer() | infinityโ the maximum number of items that can be stored in a node. Default value is1000.max_nodes_discoitems: pos_integer() | infinityโ the maximum number of nodes to return in a discoitem response. The default value is100.max_subscriptions_node: MaxSubsโ the maximum number of subscriptions managed by a node. Default is no limitation:undefined. ๐ธname: Nameโ the value of the service name. This name is only visible in some clients that support XEP-0030: Service Discovery. The default isvCard User Search. โจnodetree: Nodetreeโ picks which nodetree to use. If it's not defined, the default pubsub nodetree is used:tree. Only one nodetree can be used per host, and it's shared by all node plugins.treenodetree stores node configuration and relations on the database.flatnodes are stored without any relationship, andhometreenodes can have child nodes.virtualnodetree does not store nodes on the database. This saves resources on systems with tons of nodes. If you're using thevirtualnodetree, you can only enable these node plugins:[flat, pep]or[flat]โ any other plugins configuration will not work. Also, all nodes will have the default configuration, and this can't be changed. Usingvirtualnodetree requires starting from a clean database โ it will not work if you used the defaulttreenodetree before. ๐ญ
pep_mapping: List of Key:Valueโ here you can hand over a list of key-value pairs to choose defined node plugins on a given PEP namespace. The following example will usenode_tuneinstead ofnode_pepfor every PEP node with thetunenamespace:
Example:
modules:
...
mod_pubsub:
pep_mapping:
http://jabber.org/protocol/tune: tune
...
plugins: [Plugin, ...]โ specifies which pubsub node plugins to use. The first one in the list is used by default. If this option isn't defined, the default plugins list is[flat]. PubSub clients can define which plugin to use when creating a node: just add atype='plugin-name'attribute to the create stanza element. ๐flatplugin handles the default behaviour and follows the standard XEP-0060 implementation.pepplugin adds an extension to handle Personal Eventing Protocol (XEP-0163) to the PubSub engine. When it's enabled, PEP is handled automatically. โญ
vcard: vCardโ a custom vCard of the server that some XMPP clients will display in Service Discovery. The value ofvCardis a YAML map constructed from an XML representation of vCard. Since that representation has no attributes, the mapping is straightforward. ๐
Example:
# This XML representation of vCard:
# <vCard xmlns='vcard-temp'>
# <FN>Conferences</FN>
# <ADR>
# <WORK/>
# <STREET>Elm Street</STREET>
# </ADR>
# </vCard>
#
# is translated to:
vcard:
fn: Conferences
adr:
-
work: true
street: Elm Street
๐ Examples ๐
Example of a configuration that uses flat nodes as default, and allows use of flat, hometree and pep nodes:
modules:
mod_pubsub:
access_createnode: pubsub_createnode
max_subscriptions_node: 100
default_node_config:
notification_type: normal
notify_retract: false
max_items: 4
plugins:
- flat
- pep
Using a relational database requires using mod_pubsub with db_type: sql. Only the flat, hometree and pep plugins support SQL. The following example shows the previous configuration with SQL usage:
modules:
mod_pubsub:
db_type: sql
access_createnode: pubsub_createnode
ignore_pep_from_offline: true
last_item_cache: false
plugins:
- flat
- pep
API Tags: ../../developer/ejabberd-api/admin-tags.md#purge|purge
๐ฆ mod_pubsub_serverinfo ๐ฆ
added in 25.07 โจ This module adds support for XEP-0485: PubSub Server Information, exposing S2S information over the Pub/Sub service.
Active S2S connections get published to a local PubSub node. rn the node name is hardcoded as "serverinfo". ๐
Connections that support this feature are exposed with their domain names, otherwise they show up as anonymous nodes. At startup a list of well known public servers is fetched โ those are not shown as anonymous even if they don't support this feature. ๐
โ ๏ธ okay bestie, important: the module only shows S2S connections that were established while the module is running. If you install the module at runtime, run the stop_s2s_connections API or restart ejabberd to force S2S reconnections that the module will detect and publish. ๐ฅ
This module depends on mod_pubsub and mod_disco.
Available options:
pubsub_host: undefined | string()โ use this local PubSub host to advertise S2S connections. This must be a host local to this service handled bymod_pubsub. You only need this option if your configuration has more than one host inmod_pubsub'shostsoption. The default value is the first host defined in themod_pubsubhostsoption. ๐ซถ
Example:
modules:
mod_pubsub_serverinfo:
pubsub_host: custom.pubsub.domain.local
๐ฅ mod_push ๐ฅ
This module implements the XMPP server's part of the push notification solution specified in XEP-0357: Push Notifications. It does not generate, like, APNS or FCM notifications directly โ nope. Instead, it's designed to work with so-called "app servers" operated by third-party vendors of mobile apps. Those app servers will usually trigger notification delivery to the user's mobile device using platform-dependent backend services such as FCM or APNS. ๐
Available options:
cache_life_time: timeout()โ same as the top-levelcache_life_timeoption, but applied to this module only.cache_missed: true | falseโ same as the top-levelcache_missedoption, but applied to this module only.cache_size: pos_integer() | infinityโ same as the top-levelcache_sizeoption, but applied to this module only.db_type: mnesia | sqlโ same as the top-leveldefault_dboption, but applied to this module only.include_body: true | false | Textโ if this is set totrue, the message text is included with push notifications generated for incoming messages with a body. The option can instead be set to a staticText, and in that case the specified text will be included in place of the actual message body. This is useful to signal the app server whether the notification was triggered by a message with a body (as opposed to other types of traffic) without leaking the actual message contents. The default value is"New message". ๐include_sender: true | falseโ if this is set totrue, the sender's JID is included with push notifications generated for incoming messages with a body. The default value isfalse. ๐notify_on:messages | allโ okay so this option was added in 23.10 โจ If itโs set tomessages, notifications are generated only for actual chat messages with a body text (or some encrypted payload). If itโs set toall, any kind of XMPP stanza will trigger a notification. If youโre unsure, itโs strongly recommended to stick toall, which is the default value. ๐use_cache:true | falseโ same as the top-leveluse_cacheoption, but applied to this module only. ๐ซถ
๐ท๏ธ API Tags: ../../developer/ejabberd-api/admin-tags.md#purge|purge
๐ mod_push_keepalive
This module tries to keep the stream management session (see mod_stream_mgmt) of a disconnected mobile client alive if the client enabled push notifications for that session. However, the normal session resumption timeout is restored once a push notification is issued, so the session will be closed if the client doesnโt respond to push notifications. ๐ญ
The module depends on mod_push. No cap.
Available options:
resume_timeout:timeout()โ this option specifies the period of time until the session of a disconnected push client times out. This timeout is only in effect as long as no push notification is issued. Once that happened, the resumption timeout configured formod_stream_mgmtis restored. The default value is 72 hours. โณwake_on_start:true | falseโ if this option is set totrue, notifications are generated for all registered push clients during server startup. This option should not be enabled on servers with many push clients as it can generate significant load on the involved push services and the server itself. The default value isfalse. ๐จwake_on_timeout:true | falseโ if this option is set totrue, a notification is generated shortly before the session would time out as per theresume_timeoutoption. The default value istrue. โจ
๐ mod_register
This module adds support for XEP-0077: In-Band Registration. This protocol enables end users to use an XMPP client to:
- Register a new account on the server. ๐
- Change the password from an existing account on the server. ๐
- Delete an existing account on the server. ๐
This module reads also the top-level registration_timeout option defined globally for the server, so please check that option documentation too. ๐
Available options:
access:AccessNameโ specify rules to restrict what usernames can be registered. If a rule returnsdenyon the requested username, registration of that user name is denied. There are no restrictions by default. IfAccessNameisnone, then registering new accounts using In-Band Registration is disabled and the corresponding stream feature is not announced to clients. ๐access_from:AccessNameโ by default,ejabberddoesnโt allow the client to register new accounts from s2s or existing c2s sessions. You can change it by defining an access rule in this option. Use with care: allowing registration from s2s leads to uncontrolled massive accounts creation by rogue users. โ ๏ธaccess_remove:AccessNameโ specify rules to restrict access for user unregistration. By default any user is able to unregister their account. ๐ซถallow_modules:all | [Module, ...]โ note about this option: added in 21.12. List of modules that can register accounts, orall. The default value isall, which is equivalent to something like[mod_register, mod_register_web]. ๐captcha_protected:true | falseโ protect registrations with CAPTCHA (basic.md#captcha|CAPTCHA). The default isfalse. ๐งip_access:AccessNameโ define rules to allow or deny account registration depending on the IP address of the XMPP client. TheAccessNameshould be of typeip. The default value isall. ๐password_strength:Entropyโ this option sets the minimum Shannon entropy for passwords. The valueEntropyis a number of bits of entropy. The recommended minimum is 32 bits. The default is 0, i.e. no checks are performed. ๐ฅredirect_url:URLโ this option enables registration redirection as described in XEP-0077: In-Band Registration: Redirection. ๐ฆregistration_watchers:[JID, ...]โ this option defines a list of JIDs which will be notified each time a new account is registered. ๐welcome_message:{subject: Subject, body: Body}โ set a welcome message that is sent to each newly registered account. The message will have subjectSubjectand textBody. ๐ธ
Example:
modules:
mod_register:
welcome_message:
subject: "Welcome!"
body: |-
Hi!
Welcome to this XMPP server
๐ mod_register_web
This module provides a web page where users can:
- Register a new account on the server. ๐
- Change the password from an existing account on the server. ๐
- Unregister an existing account on the server. ๐
This module supports CAPTCHA (basic.md#captcha|CAPTCHA) to register a new account. To enable this feature, configure the top-level captcha_cmd and top-level captcha_url options. โจ
As an example usage, the users of the host localhost can visit the page: https://localhost:5280/register/ It is important to include the last / character in the URL, otherwise the subpages URL will be incorrect. ๐ญ
This module is enabled in listen โ ejabberd_http โ listen-options.md#request_handlers|request_handlers.
There is no need to enable this module in modules, but it adds a link to the register page in WebAdmin menu. The module depends on mod_register where all the configuration is performed. ๐ซถ
The module has no options.
Example:
listen:
-
port: 5280
module: ejabberd_http
request_handlers:
/register: mod_register_web
modules:
mod_register: {}
๐ mod_roster
This module implements roster management as defined in RFC6121 Section 2. The module also adds support for XEP-0237: Roster Versioning. ๐
Available options:
access:AccessNameโ this option can be configured to specify rules to restrict roster management. If the rule returnsdenyon the requested user name, that user cannot modify their personal roster, i.e. they cannot add/remove/modify contacts or send presence subscriptions. The default value isall, i.e. no restrictions. ๐cache_life_time:timeout()โ same as top-levelcache_life_timeoption, but applied to this module only. โณcache_missed:true | falseโ same as top-levelcache_missedoption, but applied to this module only. ๐ซถcache_size:pos_integer() | infinityโ same as top-levelcache_sizeoption, but applied to this module only. ๐ฆdb_type:mnesia | sqlโ same as top-leveldefault_dboption, but applied to this module only. ๐พstore_current_id:true | falseโ if this option is set totrue, the current roster version number is stored on the database. If set tofalse, the roster version number is calculated on the fly each time. Enabling this option reduces the load for bothejabberdand the database. This option does not affect the client in any way. This option is only useful if optionversioningis set totrue. The default value isfalse. IMPORTANT: if you usemod_shared_rosterormod_shared_roster_ldap, you must set the value of the option tofalse. ๐จuse_cache:true | falseโ same as top-leveluse_cacheoption, but applied to this module only. โจversioning:true | falseโ enables/disables Roster Versioning. The default value isfalse. ๐ฆ
Example:
modules:
mod_roster:
versioning: true
store_current_id: false
๐ท๏ธ API Tags: ../../developer/ejabberd-api/admin-tags.md#roster|roster
๐ mod_s2s_bidi
Note about this option: added in 24.10.
The module adds support for XEP-0288: Bidirectional Server-to-Server Connections that allows using single s2s connection to communicate in both directions. ๐ฅ
The module has no options.
Example:
modules:
mod_s2s_bidi: {}
๐ก๏ธ mod_s2s_dialback
The module adds support for XEP-0220: Server Dialback to provide server identity verification based on DNS.
Warning โ ๏ธ DNS-based verification is vulnerable to DNS cache poisoning, so modern servers rely on verification based on PKIX certificates. Thus this module is only recommended for backward compatibility with servers running outdated software or non-TLS servers, or those with invalid certificates (as long as you accept the risks, e.g. you assume that the remote server has an invalid certificate due to poor administration and not because itโs compromised). ๐
Available options:
access:AccessNameโ an access rule that can be used to restrict dialback for some servers. The default value isall. ๐ซถ
Example:
modules:
mod_s2s_dialback:
access:
allow:
server: legacy.domain.tld
server: invalid-cert.example.org
deny: all
๐ mod_scram_upgrade
Note about this option: added in 24.10.
The module adds support for XEP-0480: SASL Upgrade Tasks that allows users to upgrade passwords to more secure representation. โจ
Available options:
offered_upgrades:list(sha256, sha512)โ list with upgrade types that should be offered. ๐
Example:
modules:
mod_scram_upgrade:
offered_upgrades:
- sha256
- sha512
๐ค mod_service_log
This module forwards copies of all stanzas to remote XMPP servers or components. Every stanza is encapsulated into <forwarded/> element as described in XEP-0297: Stanza Forwarding. ๐ฆ
Available options:
loggers:[Domain, ...]โ a list of servers or connected components to which stanzas will be forwarded. ๐
Example:
modules:
mod_service_log:
loggers:
- xmpp-server.tld
- component.domain.tld
๐ซถ mod_shared_roster
Okay bestie so this module is the one that lets you make shared roster groups โ aka groups of accounts that can see members from (other) groups right there in their rosters. Iconic, honestly. ๐
The big advantages (and yes, they're big): end users don't have to manually add every single user to their own rosters, and they cannot permanently delete users from the shared roster groups. Like, the group stays, no cap. A shared roster group can have members from any XMPP server, but the presence will only be available from and to members of the same virtual host where the group is created. It still lets users keep / add their own contacts too, because it does not replace the standard roster. Instead, the shared roster contacts get merged into the relevant users' rosters at retrieval time, so the standard user rosters stay completely unmodified. Clean. โจ
Shared roster groups can be edited via the Web Admin, and also with some API commands called srg_, for example the srg_add API. Each group has a unique name and these parameters:
- Label โ used in the rosters where this group is displayed.
- Description โ of the group, which has no effect. (Decorative. A vibe. ๐)
- Members โ a list of JIDs of group members, entered one per line in the Web Admin. The special member directive
@all@represents all the registered users in the virtual host; which is only recommended for a small server with just a few hundred users. The special member directive@online@represents the online users in the virtual host. With those two directives, the actual list of members in those shared rosters is generated dynamically at retrieval time. ๐ช - Displayed โ a list of groups that will be in the rosters of this group's members. A group of another vhost can be identified with
groupid@vhost.
Heads up bestie: this module depends onmod_roster. If it's not enabled, roster queries will return503errors. Not cute. ๐ญ
Available options:
cache_life_time:timeout()โ same as the top-levelcache_life_timeoption, but applied to this module only.cache_missed:true|falseโ same as the top-levelcache_missedoption, but applied to this module only.cache_size:pos_integer()|infinityโ same as the top-levelcache_sizeoption, but applied to this module only.db_type:mnesia|sqlโ same as the top-leveldefault_dboption, but applied to this module only.use_cache:true|falseโ same as the top-leveluse_cacheoption, but applied to this module only.
Examples โจ
Picture a computer club that wants all its members seeing each other in their rosters. To pull that off, they need to create a shared roster group kinda like this one:
Name: club_members
Label: Club Members
Description: Members from the computer club
Members: member1@example.org, member2@example.org, member3@example.org
Displayed Groups: club_members
In another case we've got a company with three divisions: Management, Marketing and Sales. All group members should see all other members in their rosters. Additionally, all managers should have all marketing and sales people in their roster. Simultaneously, all marketeers and the whole sales team should see all managers. This scenario can be achieved by creating shared roster groups as shown in the following lists:
First list:
Name: management
Label: Management
Description: Management
Members: manager1@example.org, manager2@example.org
Displayed: management, marketing, sales
Second list:
Name: marketing
Label: Marketing
Description: Marketing
Members: marketeer1@example.org, marketeer2@example.org, marketeer3@example.org
Displayed: management, marketing
Third list:
Name: sales
Label: Sales
Description: Sales
Members: salesman1@example.org, salesman2@example.org, salesman3@example.org
Displayed: management, sales
๐ง mod_shared_roster_ldap
This module lets the server administrator automatically populate users' rosters (contact lists) with entries based on users and groups defined in an LDAP-based directory. It's giving "the directory is the source of truth" and honestly? Obsessed. ๐
Notemod_shared_roster_ldapdepends onmod_rosterbeing enabled. Roster queries will return503errors ifmod_rosteris not enabled. Forewarned is forearmed, bestie. ๐ซถ
The module accepts many configuration options. Some of them, if unspecified, default to the values specified for the top level of configuration. This lets you avoid specifying, for example, the bind password in multiple places. Repetition is so not the vibe.
- Filters:
ldap_rfilter,ldap_ufilter,ldap_gfilter,ldap_filter. These options specify LDAP filters used to query for shared roster information. All of them are run against theldap_base. - Attributes:
ldap_groupattr,ldap_groupdesc,ldap_memberattr,ldap_userdesc,ldap_useruid. These options specify the names of the attributes which hold interesting data in the entries returned by running filters specified with the filter options. - Control parameters:
ldap_auth_check,ldap_group_cache_validity,ldap_memberattr_format,ldap_memberattr_format_re,ldap_user_cache_validity. These parameters control the behaviour of the module. - Connection parameters: The module also accepts the connection parameters, all of which default to the top-level parameter of the same name, if unspecified. See
ldap.md#ldap-connection|LDAP Connectionsection for more information about them.
Check also the ldap.md#ldap-examples|Configuration examples section to get details about retrieving the roster, and configuration examples including Flat DIT and Deep DIT. ๐
Available options:
cache_life_timeโ same as top-levelcache_life_timeoption, but applied to this module only.cache_missedโ same as top-levelcache_missedoption, but applied to this module only.cache_sizeโ same as top-levelcache_sizeoption, but applied to this module only.ldap_auth_check:true|falseโ whether the module should check (via the ejabberd authentication subsystem) for existence of each user in the shared LDAP roster. Set tofalseif you want to disable the check. Default value istrue.ldap_backupsโ same as top-levelldap_backupsoption, but applied to this module only.ldap_baseโ same as top-levelldap_baseoption, but applied to this module only.ldap_deref_aliasesโ same as top-levelldap_deref_aliasesoption, but applied to this module only.ldap_encryptโ same as top-levelldap_encryptoption, but applied to this module only.ldap_filterโ additional filter which is AND-ed together with "User Filter" and "Group Filter". For more information check the LDAPldap.md#filters|Filterssection.ldap_gfilterโ "Group Filter", used when retrieving human-readable name (a.k.a. "Display Name") and the members of a group. See also the parametersldap_groupattr,ldap_groupdescandldap_memberattr. If unspecified, defaults to the top-level parameter of the same name. If that one also is unspecified, then the filter is constructed exactly like "User Filter".ldap_groupattrโ the name of the attribute that holds the group name, and that is used to differentiate between them. Retrieved from results of the "Roster Filter" and "Group Filter". Defaults tocn.ldap_groupdescโ the name of the attribute which holds the human-readable group name in the objects you use to represent groups. Retrieved from results of the "Group Filter". Defaults to whateverldap_groupattris set to.ldap_memberattrโ the name of the attribute which holds the IDs of the members of a group. Retrieved from results of the "Group Filter". Defaults tomemberUid. The name of the attribute differs depending on theobjectClassyou use for your group objects, for example:posixGroupโmemberUid;groupOfNamesโmember;groupOfUniqueNamesโuniqueMember.ldap_memberattr_formatโ a globbing format for extracting user ID from the value of the attribute named byldap_memberattr. Defaults to%u, which means that the whole value is the member ID. If you change it to something different, you may also need to specify the User and Group Filters manually; see section Filters.ldap_memberattr_format_reโ a regex for extracting user ID from the value of the attribute named byldap_memberattr. Check the LDAPldap.md#control-parameters|Control Parameterssection.ldap_passwordโ same as top-levelldap_passwordoption, but applied to this module only.ldap_portโ same as top-levelldap_portoption, but applied to this module only.ldap_rfilterโ so called "Roster Filter". Used to find names of all "shared roster" groups. See also theldap_groupattrparameter. If unspecified, defaults to the top-level parameter of the same name. You must specify it in some place in the configuration, there is no default. (Yeah, this one's on you. ๐)ldap_rootdnโ same as top-levelldap_rootdnoption, but applied to this module only.ldap_serversโ same as top-levelldap_serversoption, but applied to this module only.ldap_tls_cacertfileโ same as top-levelldap_tls_cacertfileoption, but applied to this module only.ldap_tls_certfileโ same as top-levelldap_tls_certfileoption, but applied to this module only.ldap_tls_depthโ same as top-levelldap_tls_depthoption, but applied to this module only.ldap_tls_verifyโ same as top-levelldap_tls_verifyoption, but applied to this module only.ldap_ufilterโ "User Filter", used for retrieving the human-readable name of roster entries (usually full names of people in the roster). See also the parametersldap_userdescandldap_useruid. For more information check the LDAPldap.md#filters|Filterssection.ldap_uidsโ same as top-levelldap_uidsoption, but applied to this module only.ldap_userdescโ the name of the attribute which holds the human-readable user name. Retrieved from results of the "User Filter". Defaults tocn.ldap_userjidattrโ the name of the attribute that maps a user id onto an XMPP jid. If you don't set it (and like, that's the default value of this option, so no pressure), the user jid gets built from the user id plus this module's host. โจldap_useruidโ the name of the attribute that holds the ID of a roster item. The value of this attribute in the roster item objects has to match the ID you pull from theldap_memberattrattribute of a group object. It's retrieved from the results of the "User Filter". Defaults tocn. ๐use_cacheโ same as the top-leveluse_cacheoption, but applied to this module only.
๐ฆ mod_sic ๐ฆ
This module adds support for XEP-0279: Server IP Check. Basically this protocol lets a client discover its external IP address. iykyk ๐
โ ๏ธ Warning โ the protocol extension is deferred and it seems like there are no clients supporting it, so using this module is not recommended and, furthermore, the module might be removed in the future. ๐ญ So like... maybe don't build your whole vibe on it?
The module has no options. periodt.
๐ mod_sip ๐
This module adds SIP proxy/registrar support for the corresponding virtual host. iconic behavior honestly ๐
๐ Note โ it is not enough to just load this module. You should also configure listeners and DNS records properly. For details see the section about the listen.md#ejabberd_sip listen module in the ejabberd Documentation. bestie please read the docs, I'm begging ๐ซถ
Available options:
always_record_route: true | falseโ always insert "Record-Route" header into SIP messages. With this approach it's possible to bypass NATs/firewalls a bit more easily. The default value istrue.flow_timeout_tcp: timeout()โ this option sets a keep-alive timer for SIP outbound TCP connections. The default value is2 minutes.flow_timeout_udp: timeout()โ this option sets a keep-alive timer for SIP outbound UDP connections. The default value is29 seconds.record_route: URIโ when the optionalways_record_routeis set totrueor when SIP outbound is utilized, ejabberd inserts a "Record-Route" header field with this URI into a SIP message. The default is a SIP URI constructed from the virtual host on which the module is loaded.routes: [URI, ...]โ you can set a list of SIP URIs of routes pointing to this SIP proxy server. The default is a list containing a single SIP URI constructed from the virtual host on which the module is loaded.via: [URI, ...]โ a list to construct "Via" headers for inserting them into outgoing SIP messages. This is useful if you're running your SIP proxy in a non-standard network topology. Every URI element in the list must be in the form of"scheme://host:port", where"transport"must betls,tcp, orudp,"host"must be a domain name or an IP address and"port"must be an internet port number. Note that all parts of the URI are mandatory (e.g. you cannot omit"port"or"scheme"). no skipping parts fr fr ๐
Example:
modules:
mod_sip:
always_record_route: false
record_route: "sip:example.com;lr"
routes:
- "sip:example.com;lr"
- "sip:sip.example.com;lr"
flow_timeout_udp: 30 sec
flow_timeout_tcp: 1 min
via:
- tls://sip-tls.example.com:5061
- tcp://sip-tcp.example.com:5060
- udp://sip-udp.example.com:5060
๐ mod_stats ๐
This module adds support for XEP-0039: Statistics Gathering. This protocol allows you to retrieve the following statistics from your ejabberd server:
- Total number of registered users on the current virtual host (
users/total). - Total number of registered users on all virtual hosts (
users/all-hosts/total). - Total number of online users on the current virtual host (
users/online). - Total number of online users on all virtual hosts (
users/all-hosts/online).
โ ๏ธ Note โ the protocol extension is deferred and it seems like even a few clients that were supporting it are now abandoned. So using this module makes very little sense. ๐ like, the numbers are cute but nobody's asking for them anymore.
The module has no options.
๐ธ mod_stream_mgmt ๐ธ
This module adds support for XEP-0198: Stream Management. This protocol allows active management of an XML stream between two XMPP entities, including features for stanza acknowledgments and stream resumption. this one's kind of a main character tbh ๐ฅ
Available options:
ack_timeout: timeout()โ a time to wait for stanza acknowledgments. Setting it toinfinityeffectively disables the timeout. The default value is1 minute.cache_life_time: timeout()โ same as the top-levelcache_life_timeoption, but applied to this module only. The default value is48 hours.cache_size: pos_integer() | infinityโ same as the top-levelcache_sizeoption, but applied to this module only.max_ack_queue: Sizeโ this option specifies the maximum number of unacknowledged stanzas queued for possible retransmission. When the limit is exceeded, the client session is terminated. The allowed values are positive integers andinfinity. You should be careful when setting this value as it should not be set too low, otherwise you could kill sessions in a loop, before they get the chance to finish proper session initiation. It should definitely be set higher than the size of the offline queue (for example at least 3 times the value of the max offline queue and never lower than1000). The default value is5000.max_resume_timeout: timeout()โ a client may specify the period of time until a session times out if the connection is lost. During this period of time, the client may resume its session. This option limits the period of time a client is permitted to request. It must be set to a timeout equal to or larger than the defaultresume_timeout. By default, it is set to the same value as theresume_timeoutoption.queue_type: ram | fileโ same as the top-levelqueue_typeoption, but applied to this module only.resend_on_timeout: true | false | if_offlineโ if this option is set totrue, any message stanzas that weren't acknowledged by the client will be resent on session timeout. This behavior might often be desired, but could have unexpected results under certain circumstances. For example, a message that was sent to two resources might get resent to one of them if the other one timed out. Therefore, the default value for this option isfalse, which tells ejabberd to generate an error message instead. As an alternative, the option may be set toif_offline. In this case, unacknowledged messages are resent only if no other resource is online when the session times out. Otherwise, error messages are generated. ๐resume_timeout: timeout()โ this option configures the (default) period of time until a session times out if the connection is lost. During this period of time, a client may resume its session. Note that the client may request a different timeout value, see themax_resume_timeoutoption. Setting it to0effectively disables session resumption. The default value is5 minutes.
๐ง mod_stun_disco ๐ง
๐ซ Note about this option: added in 20.04.
This module allows XMPP clients to discover STUN/TURN services and to obtain temporary credentials for using them as per XEP-0215: External Service Discovery. honestly kind of a flex ๐ซถ
Available options:
access: AccessNameโ this option defines which access rule will be used to control who is allowed to discover STUN/TURN services and to request temporary credentials. The default value islocal.credentials_lifetime: timeout()โ the lifetime of temporary credentials offered to clients. If ejabberd's built-in TURN service is used, TURN relays allocated using temporary credentials will be terminated shortly after the credentials expired. The default value is12 hours. Note that restarting the ejabberd node invalidates any temporary credentials offered before the restart unless a secret is specified (see below). ๐ญ classic restart betrayal.offer_local_services: true | falseโ this option specifies whether local STUN/TURN services configured as ejabberd listeners should be announced automatically. Note that this will not include TLS-enabled services, which must be configured manually using theservicesoption (see below). For non-anonymous TURN services, temporary credentials will be offered to the client. The default value istrue.secret: Textโ the secret used for generating temporary credentials. If this option isn't specified, a secret will be auto-generated. However, a secret must be specified explicitly if non-anonymous TURN services running on other ejabberd nodes and/or external TURN services are configured. Also note that auto-generated secrets are lost when the node is restarted, which invalidates any credentials offered before the restart. Therefore, it's recommended to explicitly specify a secret if clients cache retrieved credentials (for later use) across service restarts. ๐ฅservices: [Service, ...]โ the list of services offered to clients. This list can include STUN/TURN services running on any ejabberd node and/or external services. However, if any listed TURN service not running on the local ejabberd node requires authentication, a secret must be specified explicitly, and must be shared with that service. This will only work with ejabberd's built-in STUN/TURN server and with external servers that support the same REST API For Access To TURN Services. Unless theoffer_local_servicesis set tofalse, the explicitly listed services will be offered in addition to those announced automatically. โจhost: Hostโ the hostname or IP address the STUN/TURN service is listening on. For non-TLS services, it's recommended to specify an IP address (to avoid additional DNS lookup latency on the client side). For TLS services, the hostname (or IP address) should match the certificate. Specifying thehostoption is mandatory. no skipping, bestie ๐
port: 1..65535โ the port number the STUN/TURN service is listening on. default is3478for non-TLS services and5349for TLS services โจrestricted: true | falseโ this one decides whether temporary credentials for accessing the service are offered. default isfalsefor STUN/STUNS services andtruefor TURN/TURNS services ๐transport: tcp | udpโ the transport protocol supported by the service. default isudpfor non-TLS services andtcpfor TLS services ๐type: stun | turn | stuns | turnsโ the type of service. must bestunorturnfor non-TLS services,stunsorturnsfor TLS services. default type isstun๐
Example:
services:
-
host: 203.0.113.3
port: 3478
type: stun
transport: udp
restricted: false
-
host: 203.0.113.3
port: 3478
type: turn
transport: udp
restricted: true
-
host: 2001:db8::3
port: 3478
type: stun
transport: udp
restricted: false
-
host: 2001:db8::3
port: 3478
type: turn
transport: udp
restricted: true
-
host: server.example.com
port: 5349
type: turns
transport: tcp
restricted: true
๐ธ mod_time ๐ธ
okay so this module adds support for XEP-0202: Entity Time. literally all it does is report the server's system time ๐ฐ๏ธ iconic minimalism tbh.
the module has no options. not a single one. she's low-maintenance ๐
๐ฆ mod_vcard ๐ฆ
this module lets end users store and retrieve their vCard, and retrieve other users' vCards, as defined in XEP-0054: vcard-temp. it also implements an uncomplicated Jabber User Directory based on the vCards of these users. and moreover (yes we're using moreover ๐ ) it enables the server to send its vCard when queried. main character module fr fr ๐
Available options:
allow_return_all: true | falseโ lets you specify if search operations with empty input fields should return all users who added some information to their vCard. default value isfalse. so no, you can't just yeet an empty search at it and get everyone's info by default ๐append_module_config: {VcardHost: Options}โ note about this option: added in26.07. it adds a few specific options to a certain upload host previously defined in themod_vcardhostsoption. right now onlynamecan be defined here. this is similar to the toplevelappend_host_configoption, but in this case it's applied to this module's options. iykyk ๐
Example:
modules:
mod_vcard:
hosts:
- service1.@HOST@
- service2.@HOST@
name: "Service General"
append_module_config:
service1.localhost:
name: "Service 1"
service2.example.net:
name: "Service 2"
cache_life_time: timeout()โ same as top-levelcache_life_timeoption, but applied to this module only. ๐ซcache_missed: true | falseโ same as top-levelcache_missedoption, but applied to this module only. ๐cache_size: pos_integer() | infinityโ same as top-levelcache_sizeoption, but applied to this module only. ๐db_type: mnesia | sql | ldapโ same as top-leveldefault_dboption, but applied to this module only. ๐๏ธhostโ deprecated. usehostsinstead. she's retired, let her rest ๐hosts: [Host, ...]โ this option defines the Jabber IDs of the service. if thehostsoption is not specified, the only Jabber ID will be the hostname of the virtual host with the prefix"vjud.". the keyword@HOST@is replaced with the real virtual host name. โจmatches: pos_integer() | infinityโ with this option, the number of reported search results can be limited. if the option's value is set toinfinity, all search results are reported. the default value is30. no cap, unless it's 31 results, then cap ๐งขname: Nameโ the value of the service name. this name is only visible in some clients that support XEP-0030: Service Discovery. the default isvCard User Search. ๐ท๏ธsearch: true | falseโ this option specifies whether the search functionality is enabled or not. if disabled, the optionshosts,nameandvcardwill be ignored and the Jabber User Directory service will not appear in the Service Discovery item list. default value isfalse. ๐use_cache: true | falseโ same as top-leveluse_cacheoption, but applied to this module only. ๐vcard: vCardโ a custom vCard of the server that will be displayed by some XMPP clients in Service Discovery. the value ofvCardis a YAML map constructed from an XML representation of vCard. since the representation has no attributes, the mapping is straightforward. obsessed with how clean this is tbh ๐ซถ
Example:
# This XML representation of vCard:
#
# <vCard xmlns='vcard-temp'>
# <FN>Conferences</FN>
# <ADR>
# <WORK/>
# <STREET>Elm Street</STREET>
# </ADR>
# </vCard>
#
# is translated to:
#
vcard:
fn: Conferences
adr:
-
work: true
street: Elm Street
๐ Available options for ldap backend ๐
ldap_backupsโ same as top-levelldap_backupsoption, but applied to this module only. ๐ldap_baseโ same as top-levelldap_baseoption, but applied to this module only. ๐ณldap_deref_aliasesโ same as top-levelldap_deref_aliasesoption, but applied to this module only. ๐ชldap_encryptโ same as top-levelldap_encryptoption, but applied to this module only. ๐ldap_filterโ same as top-levelldap_filteroption, but applied to this module only. ๐ฏldap_passwordโ same as top-levelldap_passwordoption, but applied to this module only. ๐คซldap_portโ same as top-levelldap_portoption, but applied to this module only. ๐ldap_rootdnโ same as top-levelldap_rootdnoption, but applied to this module only. ๐ldap_search_fields: {Name: Attribute, ...}โ this option defines the search form and the LDAP attributes to search within.Nameis the name of a search form field which will be automatically translated by using the translation files (seemsgs/*.msgfor available words).Attributeis the LDAP attribute or the pattern%u. ๐
Examples:
The default is:
User: "%u"
"Full Name": displayName
"Given Name": givenName
"Middle Name": initials
"Family Name": sn
Nickname: "%u"
Birthday: birthDay
Country: c
City: l
Email: mail
"Organization Name": o
"Organization Unit": ou
ldap_search_reported: {SearchField: VcardField}, ...}โ this option defines which search fields should be reported.SearchFieldis the name of a search form field which will be automatically translated by using the translation files (seemsgs/*.msgfor available words).VcardFieldis the vCard field name defined in theldap_vcard_mapoption. ๐บ๏ธ
Examples:
The default is:
"Full Name": FN
"Given Name": FIRST
"Middle Name": MIDDLE
"Family Name": LAST
"Nickname": NICKNAME
"Birthday": BDAY
"Country": CTRY
"City": LOCALITY
"Email": EMAIL
"Organization Name": ORGNAME
"Organization Unit": ORGUNIT
ldap_serversโ same as top-levelldap_serversoption, but applied to this module only. ๐ฅ๏ธldap_tls_cacertfileโ same as top-levelldap_tls_cacertfileoption, but applied to this module only. ๐ldap_tls_certfileโ same as top-levelldap_tls_certfileoption, but applied to this module only. ๐ซldap_tls_depthโ same as top-levelldap_tls_depthoption, but applied to this module only. ๐ณ๏ธldap_tls_verifyโ same as top-levelldap_tls_verifyoption, but applied to this module only. โldap_uidsโ same as top-levelldap_uidsoption, but applied to this module only. ๐ldap_vcard_map: {Name: {Pattern, LDAPattributes}, ...}โ with this option you can set the table that maps LDAP attributes to vCard fields.Nameis the type name of the vCard as defined in RFC 2426.Patternis a string which contains pattern variables%u,%dor%s.LDAPattributesis the list containing LDAP attributes. the pattern variables%swill be sequentially replaced with the values of LDAP attributes fromList_of_LDAP_attributes,%uwill be replaced with the user part of a JID, and%dwill be replaced with the domain part of a JID. ๐ง
Examples:
The default is:
NICKNAME: {"%u": []}
FN: {"%s": [displayName]}
LAST: {"%s": [sn]}
FIRST: {"%s": [givenName]}
MIDDLE: {"%s": [initials]}
ORGNAME: {"%s": [o]}
ORGUNIT: {"%s": [ou]}
CTRY: {"%s": [c]}
LOCALITY: {"%s": [l]}
STREET: {"%s": [street]}
REGION: {"%s": [st]}
PCODE: {"%s": [postalCode]}
TITLE: {"%s": [title]}
URL: {"%s": [labeleduri]}
DESC: {"%s": [description]}
TEL: {"%s": [telephoneNumber]}
EMAIL: {"%s": [mail]}
BDAY: {"%s": [birthDay]}
ROLE: {"%s": [employeeType]}
PHOTO: {"%s": [jpegPhoto]}
the mnesia backend options, cont'd ๐
search_all_hosts: true | falseโ do we search across every virtual host or not? Default istrue, bestie. That's the whole vibe.
mod_vcard_xupdate ๐
okay so here's the tea โ โ your client can stash an avatar inside the user vCard. The vCard-Based Avatars protocol (XEP-0153) gives clients a lil' method to tell contacts what the avatar hash value is. But simple or small clients may justโฆ not implement that protocol ๐ญ bless them.
So if you enable this module, all the outgoing client presence stanzas get the avatar hash automatically, on behalf of the client. Meaning: the contacts receive presence stanzas with the Update Data described in XEP-0153, as if the client had inserted it itself โจ. And if the client already included such an element in the presence stanza? It gets replaced with the element generated by ejabberd. not me being the main character of your presence stanza ๐.
But listen โ by enabling this module, every vCard modification produces a hash recalculation, and every presence sent by a client produces hash retrieval plus a presence stanza rewrite ๐ฅ. So yeah, enabling this module will introduce a computational overhead on servers with clients that change their presence frequently. However!! the overhead is significantly reduced by the use of caching, so you probably don't want to set use_cache to false ๐.
๐ The module depends on mod_vcard.
๐ฆ Note: Nowadays XEP-0153 is used mostly as "read-only", i.e. modern clients don't publish their avatars inside vCards. Thus in the majority of cases the module is only used along with mod_avatar for providing backward compatibility. iykyk.
Available options:
cache_life_time: timeout()โ same as the top-levelcache_life_timeoption, but applied to this module only ๐ซถcache_missed: true | falseโ same as the top-levelcache_missedoption, but applied to this module only ๐ซถcache_size: pos_integer() | infinityโ same as the top-levelcache_sizeoption, but applied to this module only ๐ซถuse_cache: true | falseโ same as the top-leveluse_cacheoption, but applied to this module only ๐ซถ
mod_version โญ
This module implements XEP-0092: Software Version. Consequently โ and this is the slay part โ it answers ejabberd's version when queried ๐.
Available options:
show_os: true | falseโ should the operating system be revealed or not? The default value istrue. (yes bestie, by default we're spilling the OS tea ๐)
๐ LISTENERS ๐
This section describes listeners options of ejabberd 26.09.
TODO ๐ซ (that's literally all it says โ not me giving you a whole heading and then just TODO, iconic honestly ๐ญ)
๐ AUTHOR ๐
ProcessOne. ๐
๐ฆ VERSION ๐ฆ
This document describes the configuration file of ejabberd 26.09. Configuration options of other ejabberd versions may differ significantly โ so like, don't come for me if you're on a different version, fr fr ๐ซถ.
๐ REPORTING BUGS ๐
Report bugs to https://github.com/processone/ejabberd/issues โ the devs wanna hear from you, bestie ๐
โจ SEE ALSO โจ
- Default configuration file:
https://github.com/processone/ejabberd/blob/26.09/ejabberd.yml.example - Main site:
https://ejabberd.im - Documentation:
https://docs.ejabberd.im - Configuration Guide:
https://docs.ejabberd.im/admin/configuration - Source code:
https://github.com/processone/ejabberd
like, go read them, they ate ๐
๐ธ COPYING ๐ธ
Copyright (c) 2002-2026 ProcessOne.
๐ and that's the whole page, bestie! this wasEJABBERD.YML(5)from theejabberd 26.09gang, dated 09/29/2026 โ go configure something iconic, mwah ๐ซถโจ๐
๐ฆ where this page comes from
- arch rolling: ejabberd 26.09.1-1 ยท GPL-2.0-or-later
- nixos 26.05: ejabberd 26.09
- nixpkgs unstable: ejabberd 26.09
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms