How to Install MongooseIM on Debian Latest

MongooseIM is an open-source instant messaging platform built on the Erlang language. In this tutorial, we will explain how to install MongooseIM on Debian Latest.

Prerequisites

Before you start the installation process, make sure that you have the following prerequisites:

Step 1: Update the system

In Debian, it's always important to update your system to the latest packages to avoid problems that can come with outdated packages. You can update your system by running the following command.

sudo apt-get update
sudo apt-get upgrade -y

Step 2: Install dependencies

MongooseIM requires some dependencies to function properly. You can install them by running the following command.

sudo apt-get install -y build-essential git zlib1g-dev libncurses5-dev libssl-dev unixodbc-dev

Step 3: Install Erlang/OTP

MongooseIM is built on the Erlang language, so we need to install Erlang/OTP. You can install it by following these steps.

Step 3.1: Add the Erlang Solutions repository to your system.

wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt-get update

Step 3.2: Install the Erlang OTP package.

sudo apt-get install -y esl-erlang=1:22.3.4

Make sure to specify the specific version of Erlang OTP you want to install. In this case, we'll use version 22.3.4.

Step 3.3: Add the Erlang binary directory to the PATH environment variable.

export PATH=$PATH:/usr/lib/erlang/bin

Step 4: Install MongooseIM

We can now install MongooseIM by running the following commands.

Step 4.1: Clone the MongooseIM git repository.

git clone https://github.com/esl/MongooseIM.git

Step 4.2: Go to the MongooseIM directory.

cd MongooseIM/

Step 4.3: Build and install MongooseIM.

make rel
make rel-dev

Step 5: Start and verify MongooseIM

We can now start MongooseIM by running the following command.

./_build/default/rel/mongooseim/bin/mongooseim start

You can verify that MongooseIM is running by checking its status.

./_build/default/rel/mongooseim/bin/mongooseimctl status

You should see the following output:

Node: mongooseim@localhost is started with status: started.

Conclusion

MongooseIM is now installed and ready to use. You can connect to it using a client that supports the XMPP protocol.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!