How To Install ejabberd on Amazon Linux 2023

In this blog post we will show you how to install ejabberd on Amazon Linux 2023. ejabberd is an open-source, distributed and fault-tolerant solution that enables you to create large-scale instant messaging applications. The ejabberd server is capable of reliably supporting thousands of simultaneous users on a single node without failure.

Some of the key features provided by ejabberd are:

  • Cross-platform: ejabberd runs on Unix-derived systems such as Linux, FreeBSD, NetBSD and Windows systems.
  • Fault-tolerant: Ejabberd can be deployed across a number of machines with replication to ensure there is high availability.
  • Distributed Architecture: You can run ejabberd on a cluster of machines and all of them will serve the same XMPP domain(s). Additional nodes can be added on the fly.
  • Administrator-friendly: The solution is ready to run out of the box without a need for external database or web server.
  • Internationalized: It is translated to 25 languages and has support for IDNA.
  • Open Standards: ejabberd is an open-source XMPP server that fully comply with the XMPP standard
  • Modularity: Load only the modules you want and extend its functions with your own custom modules
  • Authentication: Provides Internal authentication and well as integration to PAM, LDAP and ODBC.

When compiling ejabberd from source code you’ll need:

  • GNU Make.
  • GCC.
  • Libexpat ≥ 1.95.
  • Libyaml ≥ 0.1.4.
  • Erlang/OTP ≥ 19.3.
  • OpenSSL ≥ 1.0.0.
  • Zlib ≥ 1.2.3, for Stream Compression support (XEP-0138). Optional.
  • PAM library. Optional. For Pluggable Authentication Modules (PAM).
  • ImageMagick’s Convert program and Ghostscript fonts. Optional. For CAPTCHA challenges

Step 1: Update System

Ensure the packages in your system are updated. We love working on upgraded system.

sudo yum -y update

Once updated perform a reboot.

sudo reboot

Step 2: Download ejabberd RPM Package

Install Development tools on Amazon Linux 2023 server:

sudo yum groupinstall -y "Development Tools"

Ejabberd package is provided from RPM based Linux operating systems. When installing from the package it will check dependencies and performs basic configuration tasks like creating the initial administrator account.

EJ_VERSION=25.04
wget https://static.process-one.net/ejabberd/downloads/${EJ_VERSION}/ejabberd-${EJ_VERSION}-1.x86_64.rpm

Step 3: Install ejabberd on Amazon Linux 2023

Now that the package has been downloaded let’s install it using the following commands:

sudo yum localinstall ejabberd-${EJ_VERSION}-1.x86_64.rpm

Accept installation prompt:

The init script is placed in /etc/init.d directory:

$ ls /etc/init.d/ejabberd
/etc/init.d/ejabberd

Ejabberd application directory is:

$ ls /opt/ejabberd
conf  database  logs

Step 4: Start ejabberd systemd service

Copy systemd unit file of ejabberd to /etc/systemd/system directory:

sudo cp $(sudo find / -name ejabberd.service) /etc/systemd/system

Reload systemd:

sudo systemctl daemon-reload

Start the service and enable it to start on boot:

sudo systemctl start ejabberd
sudo systemctl enable ejabberd

Check to confirm the service was started successfully.

Step 5: Add ejabberdctl command to your PATH

Locate ejabberdctl binary file:

$ sudo find / -name ejabberdctl
/usr/sbin/ejabberdctl
/opt/ejabberd-25.04/bin/ejabberdctl

Add the path of to your ~/.bashrc file.

sudo vim ~/.bashrc

Update PATH:

export PATH=$PATH:/opt/ejabberd-25.04/bin/ejabberdctl

Source your bashrc file to update settings.

source ~/.bashrc

Step 6: Add an Admin user to Ejabberd

Once Ejabberd is installed and configured you’ll need to add an initial admin user for administrative purposes.

# ejabberdctl register myadmin "Amazon-Linux-2023.local" "StrongAdminPassword"

Where:

  • myadmin – Is the name of the admin user to be created
  • StrongAdminPassword is the password for the myadmin user created.
  • Amazon-Linux-2023.local is the hostname of the server, replace it with your own.

Expected command execution output:

You can now edit the ejabberd configuration file and give the user we just added administration rights to the XMPP account.

The user syntax is:

"username@servername"

Get your machine hostname:

$ hostname
Amazon-Linux-2023.local

Edit ejabberd configuration acl section:

sudo vi /opt/ejabberd/conf/ejabberd.yml

Restart the ejabberd service after making the changes:

sudo systemctl restart ejabberd

Step 7: Access ejabberd Web Admin

Ejabberd admin console can be accessed on below URL:

http://[server_ip_address_or_hostname]:5280/admin/

Login with the username and password as created earlier.

  • Username: username@server_hostname
  • Password: your_password

On successful authentication you’ll be presented with Ejabberd admin console.

Read through Ejabberd documentation to get detailed how-to guides which are fit for both newbies and experienced XMPP users.

More articles on Amazon Linux:

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Unlock the Right Solutions with Confidence

At CloudSpinx, we don’t just offer services - we deliver clarity, direction, and results. Whether you're navigating cloud adoption, scaling infrastructure, or solving DevOps challenges, our seasoned experts help you make smart, strategic decisions with total confidence. Let us turn complexity into opportunity and bring your vision to life.

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

MongoDB is an open-source document-oriented cross-platform database system. It stores data in JSON-like documents which offers high flexibility and dynamism […]

Get ready to ace the AWS Certified Solutions Architect Professional exam with this extensive training bundle. Basing the content off […]

Rocky Linux still stands out as the preferred enterprise-grade Linux distribution for RHEL compatibility without paying for licensing charges. Now, […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.