> ## Content Index
> Fetch the complete content index at: https://www.process-one.net/llms.txt
> Use this file to discover other available public pages before exploring further.

# ejabberd 24.02
- URL: https://www.process-one.net/blog/ejabberd-24-02/
- Published: 2024-02-27T11:05:00.000Z
- Updated: 2024-09-16T10:06:14.000Z
- Description: Introducing ejabberd 24.02: A Huge Release!
- Author: Jérôme Sautret

ejabberd 24.02 has just been release and well, this is a huge release with 200 commits and more in the libraries. We’ve packed this update with a plethora of new features, significant improvements, and essential bug fixes, all designed to supercharge your messaging infrastructure.

- [**Matrix**](https://matrix.org/?ref=process-one.net) **Federation Unleashed:** Imagine seamlessly connecting with Matrix servers – it’s now possible! ejabberd breaks new ground in cross-platform communication, fostering a more interconnected messaging universe. We have still some ground to cover and for that we are waiting for your feedback.
- **Cutting-Edge Security with** [**TLS 1.3 & SASL2**](https://www.process-one.net/blog/ejabberd-24-02/#tls)**:** In an era where security is paramount, ejabberd steps up its game. With support for TLS 1.3 and advanced SASL2 protocols, we increase the overall security for all platform users.
- **Performance Enhancements with Bind 2:** Faster connection times, especially crucial for mobile network users, thanks to Bind 2 and other performance optimizations.
- **User gains better control over on their messages:** The new support for [XEP-0424](https://www.process-one.net/blog/ejabberd-24-02/#424): Message Retraction allows users to manage their message history and remove something they posted by mistake.
- **Optimized server pings** by relying on an existing mechanism coming from [XEP-0198](https://www.process-one.net/blog/ejabberd-24-02/#198)
- **Streamlined API Versioning:** Our refined [API versioning](https://www.process-one.net/blog/ejabberd-24-02/#api) means smoother, more flexible integration for your applications.
- **Enhanced** [**Elixir, Mix and Rebar3**](https://www.process-one.net/blog/ejabberd-24-02/#compilation) **Support**

If you upgrade ejabberd from a previous release, please review those changes:

- [Update the SQL schema](https://www.process-one.net/blog/ejabberd-24-02/#sql)
- Update API commands as explained below, or use [API versioning](https://www.process-one.net/blog/ejabberd-24-02/#api)
- [Mix or Rebar3 used by default instead of Rebar to compile ejabberd](https://www.process-one.net/blog/ejabberd-24-02/#mixdefault)
- [Authentication workaround for Converse.js and Strophe.js](https://www.process-one.net/blog/ejabberd-24-02/#converse)

A more detailed explanation of those topics and other features:

## Matrix federation

ejabberd is now able to [federate](https://matrix-org.github.io/synapse/latest/federate.html?ref=process-one.net) with [Matrix](https://matrix.org/?ref=process-one.net) servers. Detailed instructions to setup Matrix federation with ejabberd will be detailed in another post.

Here is a quick summary of the configuration steps:

First, [s2s](https://datatracker.ietf.org/doc/html/rfc3920?ref=process-one.net#section-2.5) must be enabled on ejabberd. Then define a listener that uses `mod_matrix_gw`:

```yaml
listen:
  -
    port: 8448
    module: ejabberd_http
    tls: true
    certfile: "/opt/ejabberd/conf/server.pem"
    request_handlers:
      "/_matrix": mod_matrix_gw

```

And add `mod_matrix_gw` in your modules:

```yaml
modules:
  mod_matrix_gw:
    matrix_domain: "domain.com"
    key_name: "somename"
    key: "yourkeyinbase64"

```

## Support TLS 1.3, Bind 2, SASL2

- [RFC 9266 Channel Bindings for TLS 1.3](https://www.rfc-editor.org/rfc/rfc9266?ref=process-one.net): This enhances security and reliability.
- [XEP-0386: Bind 2](https://xmpp.org/extensions/xep-0386.html?ref=process-one.net): This is going to reduce the connection time for clients. This is especially important if you are using XMPP to connect from a mobile network.
- [XEP-0388: Extensible SASL Profile – SASL2](https://xmpp.org/extensions/xep-0388.html?ref=process-one.net)
- [XEP-0440: SASL Channel-Binding Type Capability](https://xmpp.org/extensions/xep-0440.html?ref=process-one.net): These updates are aimed at bolstering our authentication mechanisms.
- [XEP-0474: SASL SCRAM Downgrade Protection](https://xmpp.org/extensions/xep-0474.html?ref=process-one.net)

## Support for XEP-0424 Message Retraction

With the new support for [XEP-0424: Message Retraction](https://xmpp.org/extensions/xep-0424.html?ref=process-one.net), users of MAM message archiving can control their message archiving, with the ability to ask for deletion.

## Support for XEP-0198 pings

If stream management is enabled, let mod\_ping trigger [XEP-0198](https://xmpp.org/extensions/xep-0198.html?ref=process-one.net) `<r/>equests` rather than sending [XEP-0199](https://xmpp.org/extensions/xep-0199.html?ref=process-one.net) pings. This avoids the overhead of the ping IQ stanzas, which, if stream management is enabled, are accompanied by XEP-0198 elements anyway.

## Update the SQL schema

The table `archive` has a text column named `origin_id` (see [commit 975681](https://github.com/processone/ejabberd/commit/975681?ref=process-one.net)). You have two methods to update the SQL schema of your existing database:

If using MySQL or PosgreSQL, you can enable the option [update\_sql\_schema](https://docs.ejabberd.im/admin/configuration/toplevel/?ref=process-one.net#update-sql-schema) and ejabberd will take care to update the SQL schema when needed: add in your ejabberd configuration file the line `update_sql_schema: true`

If you are using other database, or prefer to update manually the SQL schema:

- MySQL default schema:

```sql
ALTER TABLE archive ADD COLUMN origin_id varchar(191) NOT NULL DEFAULT '';
ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT;
CREATE INDEX i_archive_username_origin_id USING BTREE ON archive(username(191), origin_id(191));

```

- MySQL new schema:

```sql
ALTER TABLE archive ADD COLUMN origin_id varchar(191) NOT NULL DEFAULT '';
ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT;
CREATE INDEX i_archive_sh_username_origin_id USING BTREE ON archive(server_host(191), username(191), origin_id(191));

```

- PostgreSQL default schema:

```sql
ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT '';
ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT;
CREATE INDEX i_archive_username_origin_id ON archive USING btree (username, origin_id);

```

- PostgreSQL new schema:

```sql
ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT '';
ALTER TABLE archive ALTER COLUMN origin_id DROP DEFAULT;
CREATE INDEX i_archive_sh_username_origin_id ON archive USING btree (server_host, username, origin_id);

```

- MSSQL default schema:

```sql
ALTER TABLE [dbo].[archive] ADD [origin_id] VARCHAR (250) NOT NULL;
CREATE INDEX [archive_username_origin_id] ON [archive] (username, origin_id)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON);

```

- MSSQL new schema:

```sql
ALTER TABLE [dbo].[archive] ADD [origin_id] VARCHAR (250) NOT NULL;
CREATE INDEX [archive_sh_username_origin_id] ON [archive] (server_host, username, origin_id)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON);

```

- SQLite default schema:

```sql
ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT '';
CREATE INDEX i_archive_username_origin_id ON archive (username, origin_id);

```

- SQLite new schema:

```sql
ALTER TABLE archive ADD COLUMN origin_id text NOT NULL DEFAULT '';
CREATE INDEX i_archive_sh_username_origin_id ON archive (server_host, username, origin_id);

```

## Authentication workaround for Converse.js and Strophe.js

This ejabberd release includes support for [XEP-0474: SASL SCRAM Downgrade Protection](https://xmpp.org/extensions/xep-0474.html?ref=process-one.net), and some clients may not support it correctly yet.

If you are using [Converse.js](https://github.com/conversejs/converse.js?ref=process-one.net) 10.1.6 or older, [Movim](https://github.com/movim/movim?ref=process-one.net) 0.23 Kojima or older, or any other client based in [Strophe.js](https://github.com/strophe/strophejs?ref=process-one.net) v1.6.2 or older, you may notice that they cannot authenticate correctly to ejabberd.

To solve that problem, either update to newer versions of those programs (if they exist), or you can enable temporarily the option [disable\_sasl\_scram\_downgrade\_protection](https://docs.ejabberd.im/admin/configuration/toplevel/?ref=process-one.net#disable-sasl-scram-downgrade-protection) in the ejabberd configuration file `ejabberd.yml` like this:

```yaml
disable_sasl_scram_downgrade_protection: true

```

## Support for API versioning

Until now, when a new ejabberd release changed some API command (an argument renamed, a result in a different format…), then you had to update your API client to the new API at the same time that you updated ejabberd.

Now the ejabberd API commands can have different versions, by default the most recent one is used, and the API client can specify the API version it supports.

In fact, this feature was [implemented seven years ago](https://github.com/processone/ejabberd/commit/3dc55c6d47e3093a6147ce275c7269a7d08ffc45?ref=process-one.net), included in [ejabberd 16.04](https://www.process-one.net/blog/ejabberd-16-04/), documented in [ejabberd Docs: API Versioning](https://docs.ejabberd.im/developer/ejabberd-api/api%5Fversioning/?ref=process-one.net)… but it was never actually used!

This ejabberd release includes many fixes to get API versioning up to date, and it starts being used by several commands.

Let’s say that ejabberd 23.10 implemented API version 0, and this ejabberd 24.02 adds API version 1\. You may want to update your API client to use the new API version 1… or you can continue using API version 0 and delay API update a few weeks or months.

To continue using API version 0:  
– if using ejabberdctl, use the switch `--version 0`. For example: `ejabberdctl --version 0 get_roster admin localhost`  
– if using mod\_http\_api, in ejabberd configuration file add `v0` to the `request_handlers` path. For example: `/api/v0: mod_http_api`

Check the details in [ejabberd Docs: API Versioning](https://docs.ejabberd.im/developer/ejabberd-api/api%5Fversioning/?ref=process-one.net).

## ejabberd commands API version 1

When you want to update your API client to support ejabberd API version 1, those are the changes to take into account:  
– Commands with list arguments  
– mod\_http\_api does not name integer and string results  
– ejabberdctl with list arguments  
– ejabberdctl list results

All those changes are described in the next sections.

## Commands with list arguments

Several commands now use `list` argument instead of a `string` with separators (different commands used different separators: `;` `:` `\\n` `,`).

The commands improved in API version 1:  
– [add\_rosteritem](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#add-rosteritem)  
– [oauth\_issue\_token](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#oauth-issue-token)  
– [send\_direct\_invitation](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#send-direct-invitation)  
– [srg\_create](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#srg-create)  
– [subscribe\_room](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#subscribe-room)  
– [subscribe\_room\_many](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#subscribe-room-many)

For example, `srg_create` in API version 0 took as arguments:

```erlang
{"group": "group3",
 "host": "myserver.com",
 "label": "Group3",
 "description": "Third group",
 "display": "group1\\ngroup2"}

```

now in API version 1 the command expects as arguments:

```erlang
{"group": "group3",
 "host": "myserver.com",
 "label": "Group3",
 "description": "Third group",
 "display": ["group1", "group2"]}

```

## mod\_http\_api not named results

There was an incoherence in mod\_http\_api results when they were integer/string and when they were list/tuple/rescode…: the result contained the name, for example:

```bash
$ curl -k -X POST -H "Content-type: application/json" -d '{}' "http://localhost:5280/api/get_loglevel/v0"
{"levelatom":"info"}

```

Staring in API version 1, when result is an integer or a string, it will not contain the result name. This is now coherent with the other result formats (list, tuple, …) which don’t contain the result name either.

Some examples with API version 0 and API version 1:

```bash
$ curl -k -X POST -H "Content-type: application/json" -d '{}' "http://localhost:5280/api/get_loglevel/v0"
{"levelatom":"info"}

$ curl -k -X POST -H "Content-type: application/json" -d '{}' "http://localhost:5280/api/get_loglevel"
"info"

$ curl -k -X POST -H "Content-type: application/json" -d '{"name": "registeredusers"}' "http://localhost:5280/api/stats/v0"
{"stat":2}

$ curl -k -X POST -H "Content-type: application/json" -d '{"name": "registeredusers"}' "http://localhost:5280/api/stats"
2

$ curl -k -X POST -H "Content-type: application/json" -d '{"host": "localhost"}' "http://localhost:5280/api/registered_users/v0"
["admin","user1"]

$ curl -k -X POST -H "Content-type: application/json" -d '{"host": "localhost"}' "http://localhost:5280/api/registered_users"
["admin","user1"]

```

## ejabberdctl with list arguments

ejabberdctl now supports list and tuple arguments, like mod\_http\_api and ejabberd\_xmlrpc. This allows ejabberdctl to execute all the existing commands, even some that were impossible until now like `create_room_with_opts` and `set_vcard2_multi`.

List elements are separated with `,` and tuple elements are separated with `:`.

Relevant commands:  
– [add\_rosteritem](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#add-rosteritem)  
– [create\_room\_with\_opts](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#create-room-with-opts)  
– [oauth\_issue\_token](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#oauth-issue-token)  
– [send\_direct\_invitation](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#send-direct-invitation)  
– [set\_vcard2\_multi](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#set-vcard2-multi)  
– [srg\_create](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#srg-create)  
– [subscribe\_room](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#subscribe-room)  
– [subscribe\_room\_many](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#subscribe-room-many)

Some example uses:

```bash
ejabberdctl add_rosteritem user1 localhost testuser7 localhost NickUser77l gr1,gr2,gr3 both
ejabberdctl create_room_with_opts room1 conference.localhost localhost public:false,persistent:true
ejabberdctl subscribe_room_many user1@localhost:User1,admin@localhost:Admin room1@conference.localhost urn:xmpp:mucsub:nodes:messages,u

```

## ejabberdctl list results

Until now, ejabberdctl returned list elements separated with `;`. Now in API version 1 list elements are separated with `,`.

For example, in ejabberd 23.10:

```bash
$ ejabberdctl get_roster admin localhost
jan@localhost jan   none    subscribe       group1;group2
tom@localhost tom   none    subscribe       group3

```

Since this ejabberd release, using API version 1:

```bash
$ ejabberdctl get_roster admin localhost
jan@localhost jan   none    subscribe       group1,group2
tom@localhost tom   none    subscribe       group3

```

it is still possible to get the results in the old syntax, using API version 0:

```bash
$ ejabberdctl --version 0 get_roster admin localhost
jan@localhost jan   none    subscribe       group1;group2
tom@localhost tom   none    subscribe       group3

```

## ejabberdctl help improved

ejabberd supports around 200 administrative commands, and probably you consult them in the ejabberd Docs -> [API Reference](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net) page, where all the commands documentation is perfectly displayed…

The `ejabberdctl` command-line script already allowed to consult the commands documentation, consulting in real-time your ejabberd server to show you exactly the commands that are available. But it lacked some details about the commands. That has been improved, and now `ejabberdctl` shows all the information, including arguments description, examples and version notes.

For example, the `connected_users_vhost` command documentation as seen in the [ejabberd Docs site](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#connected-users-vhost) is equivalently visible using `ejabberdctl`:

```bash
$ ejabberdctl help connected_users_vhost
  Command Name: connected_users_vhost

  Arguments: host::binary : Server name

  Result: connected_users_vhost::[ sessions::string ]

  Example: ejabberdctl connected_users_vhost "myexample.com"
           user1@myserver.com/tka
           user2@localhost/tka

  Tags: session

  Module: mod_admin_extra

  Description: Get the list of established sessions in a vhost

```

## Experimental support for Erlang/OTP 27

Erlang/OTP 27.0-rc1 was recently released, and ejabberd can be compiled with it. If you are developing or experimenting with ejabberd, it would be great if you can use Erlang/OTP 27 and report any problems you find. For production servers, it’s recommended to stick with Erlang/OTP 26.2 or any previous version.

In this sense, the `rebar` and `rebar3` binaries included with ejabberd are also updated: now they support from Erlang 24 to Erlang 27\. If you want to use older Erlang versions from 20 to 23, there are compatible binaries available in git: [rebar from ejabberd 21.12](https://github.com/processone/ejabberd/raw/21.12/rebar?ref=process-one.net) and [rebar3 from ejabberd 21.12](https://github.com/processone/ejabberd/raw/21.12/rebar3?ref=process-one.net).

Of course, if you have `rebar` or `rebar3` already installed in your system, it’s preferable if you use those ones, because probably they will be perfectly compatible with whatever erlang version you have installed.

## Installers and `ejabberd` container image

The binary installers now include the recent and stable Erlang/OTP 26.2.2 and Elixir 1.16.1\. Many other dependencies were updated in the installers, the most notable is OpenSSL that has jumped to version 3.2.1.

The [ejabberd container image](https://github.com/processone/ejabberd/blob/master/CONTAINER.md?ref=process-one.net) and the [ecs container image](https://github.com/processone/docker-ejabberd/blob/master/ecs/README.md?ref=process-one.net) have gotten all those version updates, and also Alpine is updated to 3.19.

By the way, this container image already had support to [run commands when the container starts](https://github.com/processone/ejabberd/blob/master/CONTAINER.md?ref=process-one.net#commands-on-start)… And now you can setup the commands to allow them fail, by prepending the character `!`.

## Summary of compilation methods

When compiling ejabberd from source code, you may have noticed there are a lot of possibilities. Let’s take an overview before digging in the new improvements:

- Tools to manage the dependencies and compilation:
  - [Rebar](https://github.com/rebar/rebar?ref=process-one.net): it is nowadays very obsolete, but still does the job of compiling ejabberd
  - [Rebar3](https://github.com/erlang/rebar3?ref=process-one.net): the successor of Rebar, with many improvements and plugins, supports [hex.pm](https://hex.pm/?ref=process-one.net) and Elixir compilation
  - [Mix](https://hexdocs.pm/mix/1.16.0/Mix.html?ref=process-one.net): included with the [Elixir programming language](https://elixir-lang.org/?ref=process-one.net), supports hex.pm, and erlang compilation
- Installation methods:
  - `make install`: copies the files to the system
  - `make prod`: prepares a self-contained [OTP production release](https://www.erlang.org/doc/design%5Fprinciples/release%5Fstructure?ref=process-one.net) in `_build/prod/`, and generates a `tar.gz` file. This was previously named `make rel`
  - `make dev`: prepares quickly an OTP development release in `_build/dev/`
  - `make relive`: prepares the barely minimum in `_build/relive/` to run ejabberd and starts it
- Start scripts and alternatives:
  - `ejabberdctl` with erlang shell: `start`/`foreground`/`live`
  - `ejabberdctl` with elixir shell: `iexlive`
  - `ejabberd` `console`/`start` (this script is generated by rebar3 or mix, and does not support ejabberdctl configurable options)

For example:  
– the [CI](https://github.com/processone/ejabberd/actions/workflows/ci.yml?ref=process-one.net) dynamic tests use `rebar3`, and [Runtime](https://github.com/processone/ejabberd/actions/workflows/runtime.yml?ref=process-one.net) tries to test all the possible combinations  
– ejabberd [binary installers](https://github.com/processone/ejabberd/actions/workflows/installers.yml?ref=process-one.net) are built using: `mix + make prod`  
– [container images](https://github.com/processone/ejabberd/actions/workflows/container.yml?ref=process-one.net) are built using: `mix + make prod` too, and started with `ejabberdctl foreground`

Several combinations didn’t work correctly until now and have been fixed, for example:  
– `mix + make relive`  
– `mix + make prod/dev + ejabberdctl iexlive`  
– `mix + make install + ejabberdctl start/foregorund/live`  
– `make uninstall` buggy has an experimental alternative: `make uninstall-rel`  
– `rebar + make prod` with Erlang 26

## Use Mix or Rebar3 by default instead of Rebar to compile ejabberd

ejabberd uses [Rebar](https://github.com/rebar/rebar?ref=process-one.net) to manage dependencies and compilation since ejabberd [13.10](https://www.process-one.net/blog/ejabberd-community-13-10/) [4d8f770](https://github.com/processone/ejabberd/commit/4d8f7706240a1603468968f47fc7b150b788d62f?ref=process-one.net). However, that tool is obsolete and unmaintained since years ago, because there is a complete replacement:

[Rebar3](https://github.com/erlang/rebar3?ref=process-one.net) is supported by ejabberd since [20.12](https://www.process-one.net/blog/ejabberd-20-12/) [0fc1aea](https://github.com/processone/ejabberd/commit/0fc1aea379924b6f83f274f173d0bbd163cae1c2?ref=process-one.net). Among other benefits, this allows to download dependencies from [hex.pm](https://hex.pm/?ref=process-one.net) and cache them in your system instead of downloading them from git every time, and allows to compile Elixir files and Elixir dependencies.

In fact, ejabberd can be compiled using `mix` (a tool included with the [Elixir programming language](https://elixir-lang.org/?ref=process-one.net)) since ejabberd [15.04](https://www.process-one.net/blog/ejabberd-15-04/) [ea8db99](https://github.com/processone/ejabberd/commit/ea8db9967fbfe53f581c3ae721657d9e6f919864?ref=process-one.net) (with improvements in ejabberd [21.07](https://www.process-one.net/blog/ejabberd-22-07/) [4c5641a](https://github.com/processone/ejabberd/commit/4c5641a6489d0669b4220b5ac759a4e1271af3b5?ref=process-one.net))

For those reasons, the tool selection performed by `./configure` will now be:  
– If `--with-rebar=rebar3` but Rebar3 not found installed in the system, use the `rebar3` binary included with ejabberd  
– Use the program specified in option: `--with-rebar=/path/to/bin`  
– If none is specified, use the system `mix`  
– If Elixir not found, use the system `rebar3`  
– If Rebar3 not found, use the `rebar3` binary included with ejabberd

## Removed Elixir support in Rebar

Support for Elixir 1.1 was added as a dependency in commit [01e1f67](https://github.com/processone/ejabberd/commit/01e1f677c72b923251f7021bc024319ff129d42d?ref=process-one.net) to ejabberd [15.02](https://www.process-one.net/blog/ejabberd-community-15-02/). This allowed to compile Elixir files. But since Elixir 1.4.5 (released Jun 22, 2017) it isn’t possible to get Elixir as a dependency… it’s nowadays a standalone program. For that reason, support to download old Elixir 1.4.4 as a dependency has been removed.

When Elixir support is required, better simply install Elixir and use `mix` as build tool:

```bash
./configure --with-rebar=mix

```

Or install Elixir and use the experimental Rebar3 support to compile Elixir files and dependencies:

```bash
./configure --with-rebar=rebar3 --enable-elixir

```

## Added Elixir support in Rebar3

It is now possible to compile ejabberd using Rebar3 and support Elixir compilation. This compiles the Elixir files included in ejabberd’s `lib/` path. There’s also support to get dependencies written in Elixir, and it’s possible to build OTP releases including Elixir support.

It is necessary to have Elixir installed in the system, and configure the compilation using `--enable-elixir`. For example:

```bash
apt-get install erlang erlang-dev elixir
git clone https://github.com/processone/ejabberd.git ejabberd
cd ejabberd
./autogen.sh
./configure --with-rebar=rebar3 --enable-elixir
make
make dev
_build/dev/rel/ejabberd/bin/ejabberdctl iexlive

```

## Elixir versions supported

[Elixir](https://elixir-lang.org/?ref=process-one.net) 1.10.3 is the minimum supported, but:  
– Elixir 1.10.3 or higher is required to build an OTP release with `make prod` or `make dev`  
– Elixir 1.11.4 or higher is required to build an OTP release if using Erlang/OTP 24 or higher  
– Elixir 1.11.0 or higher is required to use `make relive`  
– Elixir 1.13.4 with Erlang/OTP 23.0 are the lowest versions tested by [Runtime](https://github.com/processone/ejabberd/actions/workflows/runtime.yml?ref=process-one.net)

For all those reasons, if you want to use Elixir, it is highly recommended to use Elixir 1.13.4 or higher with Erlang/OTP 23.0 or higher.

## `make rel` is renamed to `make prod`

When ejabberd started to use Rebar2 build tool, that tool could create an OTP release, and the target in `Makefile.in` was conveniently named `make rel`.

However, newer tools like Rebar3 and Elixir’s Mix support creating different types of releases: production, development, … In this sense, our `make rel` target is nowadays more properly named `make prod`.

For backwards compatibility, `make rel` redirects to `make prod`.

## New `make install-rel` and `make uninstall-rel`

This is an alternative method to install ejabberd in the system, based in the OTP release process. It should produce exactly the same results than the existing `make install`.

The benefits of `make install-rel` over the existing method:  
– this uses OTP release code from rebar/rebar3/mix, and consequently requires less code in our `Makefile.in`  
– `make uninstall-rel` correctly deletes all the library files

This is still experimental, and it would be great if you are able to test it and report any problem; eventually this method could replace the existing one.

Just for curiosity:  
– ejabberd 13.03-beta1 got support for `make uninstall` [was added](https://github.com/processone/ejabberd/commit/bfb7583bb287e3e4ccabdf8b7e109702366b2971?ref=process-one.net)  
– [ejabberd 13.10](https://www.process-one.net/blog/ejabberd-community-13-10/) introduced [Rebar build tool](https://github.com/processone/ejabberd/commit/4d8f7706240a1603468968f47fc7b150b788d62f?ref=process-one.net) and code got more modular  
– ejabberd 15.10 started to [use the OTP directory structure for ‘make install’](https://github.com/processone/ejabberd/commit/70606667c60bfc3196defe86056a5eb77841dfd5?ref=process-one.net), and this [broke make uninstall](https://github.com/processone/ejabberd/issues/1496?ref=process-one.net)

## Acknowledgments

We would like to thank the contributions to the source code, documentation, and translation provided for this release by:

- [Holger Weiß](https://github.com/weiss?ref=process-one.net) for the support XEP-0198 pings and XEP-0425 fixes
- [Mr. EddX](https://github.com/MrEddX?ref=process-one.net), updated the Bulgarian translation
- [Sketch6580](https://hosted.weblate.org/user/Sketch6580/?ref=process-one.net), updated the Chinese translation
- [Jan Aschenbrenner](https://hosted.weblate.org/user/JanAschenbrenner/?ref=process-one.net), updated the Czech translation
- [Ranforingus](https://hosted.weblate.org/user/ranforingus/?ref=process-one.net), updated the Dutch translation
- [Ermete Melchiorre](https://github.com/sudcapitano?ref=process-one.net), updated the Italian translation
- [Mako N](https://github.com/mako09?ref=process-one.net), updated the Japanese translation
- [Silvério Santos](https://github.com/SantosSi?ref=process-one.net), updated the Portuguese translation
- [Олександр Кревський](https://github.com/KPEBA?ref=process-one.net), updated the Ukrainian translation

And also to all the people contributing in the ejabberd chatroom, issue tracker…

## Improvements in ejabberd Business Edition

Customers of the [ejabberd Business Edition](https://www.process-one.net/en/ejabberd/), in addition to all those improvements and bugfixes, also get:

### Push

- Fix clock issue when signing Apple push JWT tokens
- Share Apple push JWT tokens between nodes in cluster
- Increase allowed certificates chain depth in GCM requests
- Use `x:oob` data as source for image delivered in pushes
- Process only https urls in oob as images in pushes
- Fix jid in disable push iq generated by GCM and Webhook service
- Add better logging for `TooManyProviderTokenUpdated` error
- Make `get_push_logs` command generate better error if `mod_push_logger` not available
- Add command `get_push_logs` that can be used to retrieve info about recent pushes and errors reported by push services
- Add support for webpush protocol for sending pushes to safari/chrome/firefox browsers

### MAM

- Expand `mod_mam_http_access` API to also accept range of messages

### MUC

- Update `mod_muc_state_query` to fix `subject_author` room state field
- Fix encoding of config `xdata` in `mod_muc_state_query`

### PubSub

- Allow pubsub node owner to overwrite items published by other persons (p1db)

## ChangeLog

This is a more detailed list of changes in this ejabberd release:

### Core

- Added Matrix gateway in `mod_matrix_gw`
- Support SASL2 and Bind2
- Support tls-server-end-point channel binding and sasl2 codec
- Support tls-exporter channel binding
- Support XEP-0474: SASL SCRAM Downgrade Protection
- Fix presenting features and returning results of inline bind2 elements
- [disable\_sasl\_scram\_downgrade\_protection](https://docs.ejabberd.im/admin/configuration/toplevel/?ref=process-one.net#disable-sasl-scram-downgrade-protection): New option to disable XEP-0474
- [negotiation\_timeout](https://docs.ejabberd.im/admin/configuration/toplevel/?ref=process-one.net#negotiation-timeout): Increase default value from 30s to 2m
- mod\_carboncopy: Teach how to interact with bind2 inline requests

### Other

- ejabberdctl: Fix startup problem when having set `EJABBERD_OPTS` and logger options
- ejabberdctl: Set EJABBERD\_OPTS back to `""`, and use previous flags as example
- eldap: Change logic for `eldap tls_verify=soft` and `false`
- eldap: Don’t set `fail_if_no_peer_cert` for eldap ssl client connections
- Ignore hints when checking for chat states
- mod\_mam: Support XEP-0424 Message Retraction
- mod\_mam: Fix XEP-0425: Message Moderation with SQL storage
- mod\_ping: Support XEP-0198 pings when stream management is enabled
- mod\_pubsub: Normalize pubsub `max_items` node options on read
- mod\_pubsub: PEP nodetree: Fix reversed logic in node fixup function
- mod\_pubsub: Only care about PEP bookmarks options when creating node from scratch

### SQL

- MySQL: Support `sha256_password` auth plugin
- ejabberd\_sql\_schema: Use the first unique index as a primary key
- Update SQL schema files for MAM’s XEP-0424
- New option [sql\_flags](https://docs.ejabberd.im/admin/configuration/toplevel/?ref=process-one.net#sql-flags): right now only useful to enable `mysql_alternative_upsert`

### Installers and Container

- Container: Add ability to ignore failures in execution of `CTL_ON_*` commands
- Container: Update to Erlang/OTP 26.2, Elixir 1.16.1 and Alpine 3.19
- Container: Update this custom ejabberdctl to match the main one
- make-binaries: Bump OpenSSL 3.2.1, Erlang/OTP 26.2.2, Elixir 1.16.1
- make-binaries: Bump many dependency versions

### Commands API

- `print_sql_schema`: New command available in ejabberdctl command-line script
- ejabberdctl: Rework temporary node name generation
- ejabberdctl: Print argument description, examples and note in help
- ejabberdctl: Document exclusive ejabberdctl commands like all the others
- Commands: Add a new [muc\_sub](https://docs.ejabberd.im/developer/ejabberd-api/admin-tags/?ref=process-one.net#muc-sub) tag to all the relevant commands
- Commands: Improve syntax of many commands documentation
- Commands: Use list arguments in many commands that used separators
- Commands: [set\_presence](https://docs.ejabberd.im/developer/ejabberd-api/admin-api/?ref=process-one.net#set-presence): switch priority argument from string to integer
- ejabberd\_commands: Add the command API version as [a tag vX](https://docs.ejabberd.im/developer/ejabberd-api/admin-tags/?ref=process-one.net#v1)
- ejabberd\_ctl: Add support for list and tuple arguments
- ejabberd\_xmlrpc: Fix support for restuple error response
- mod\_http\_api: When no specific API version is requested, use the latest

### Compilation with Rebar3/Elixir/Mix

- Fix compilation with Erlang/OTP 27: don’t use the reserved word ‘maybe’
- configure: Fix explanation of `--enable-group` option ([#4135](https://github.com/processone/ejabberd/issues/4135?ref=process-one.net))
- Add observer and runtime\_tools in releases when `--enable-tools`
- Update “make translations” to reduce build requirements
- Use Luerl 1.0 for Erlang 20, 1.1.1 for 21-26, and temporary fork for 27
- Makefile: Add `install-rel` and `uninstall-rel`
- Makefile: Rename `make rel` to `make prod`
- Makefile: Update `make edoc` to use ExDoc, requires mix
- Makefile: No need to use `escript` to run rebar|rebar3|mix
- configure: If `--with-rebar=rebar3` but rebar3 not system-installed, use local one
- configure: Use Mix or Rebar3 by default instead of Rebar2 to compile ejabberd
- ejabberdctl: Detect problem running iex or etop and show explanation
- Rebar3: Include Elixir files when making a release
- Rebar3: Workaround to fix protocol consolidation
- Rebar3: Add support to compile Elixir dependencies
- Rebar3: Compile explicitly our Elixir files when `--enable-elixir`
- Rebar3: Provide proper path to `iex`
- Rebar/Rebar3: Update binaries to work with Erlang/OTP 24-27
- Rebar/Rebar3: Remove Elixir as a rebar dependency
- Rebar3/Mix: If `dev` profile/environment, enable tools automatically
- Elixir: Fix compiling ejabberd as a dependency ([#4128](https://github.com/processone/ejabberd/issues/4128?ref=process-one.net))
- Elixir: Fix ejabberdctl start/live when installed
- Elixir: Fix: `FORMATTER ERROR: bad return value` ([#4087](https://github.com/processone/ejabberd/issues/4087?ref=process-one.net))
- Elixir: Fix: Couldn’t find file `Elixir Hex API`
- Mix: Enable stun by default when `vars.config` not found
- Mix: New option `vars_config_path` to set path to `vars.config` ([#4128](https://github.com/processone/ejabberd/issues/4128?ref=process-one.net))
- Mix: Fix ejabberdctl iexlive problem locating iex in an OTP release

### Full Changelog

[https://github.com/processone/ejabberd/compare/23.10…24.02](https://github.com/processone/ejabberd/compare/23.10...24.02?ref=process-one.net)

## ejabberd 24.02 download & feedback

As usual, the release is tagged in the Git source code repository on [GitHub](https://github.com/processone/ejabberd?ref=process-one.net).

The source package and installers are available in [ejabberd Downloads](https://www.process-one.net/en/ejabberd/downloads/) page. To check the `*.asc` signature files, see [How to verify ProcessOne downloads integrity](https://www.process-one.net/blog/verifying%5Fprocess%5Fone%5Fdownloads%5Fintegrity/).

For convenience, there are alternative download locations like the [ejabberd DEB/RPM Packages Repository](https://repo.process-one.net/?ref=process-one.net) and the [GitHub Release / Tags](https://github.com/processone/ejabberd/tags?ref=process-one.net).

The `ecs` container image is available in [docker.io/ejabberd/ecs](https://hub.docker.com/r/ejabberd/ecs/?ref=process-one.net) and [ghcr.io/processone/ecs](https://github.com/processone/docker-ejabberd/pkgs/container/ecs?ref=process-one.net). The alternative `ejabberd` container image is available in [ghcr.io/processone/ejabberd](https://github.com/processone/ejabberd/pkgs/container/ejabberd?ref=process-one.net).

If you consider that you’ve found a bug, please search or fill a bug report on [GitHub Issues](https://github.com/processone/ejabberd/issues?ref=process-one.net).