eVAndrofisiCO
 

A Self-Hosted Whatswapp alternative

As it's popularity grows, more and more people and companies are using communication platforms such as Whatsapp as a de facto enterprise chat tool. As ubiquitous as it is, the absence of controls and auditing tools can make such uses a corporate security risk. How to provide the same level of ease to use and mobility, while ensuring the minimum security?

Enter XMPP and ejabberd

Every instant message platform is powered by some protocol. Probably the most popular is XMPP, which is at the heart of some of the most used chat tools in world, such as Google Hangouts and Whatsapp itself. It's an xml and extendable protocol, which makes it very easy to implement, adapt and transport over other protocols. Using the protocol in a self-hosted manner depends on running a xmpp server, that will be the heart of the IM solution. In this example, I'll be using ejabberd.

ejabberd, the unsung hero

Albeit you may have never heard about ejabberd and it's underlying technologies, it's a incredibly mature and scalable service. It's written in erlang, a language designed for high availability telecommunications services, and like XMPP itself is used on major communications services, such as Whatsapp (see a pattern here?), Riot Games and Grindr.

As an open source application, you can simply download the ejabberd server, configure it to your needs and done! Here, I'll cover some basic aspects of instaling and configuring ejabberd, and how to integrate it with some clients and infrastructure. Here, I presume the reader has familiarity with the Linux (esp Debian) ecosystem, a basic knowledge of installing and configuring php applications and programming in Javascript.

Installing ejabberd

On Debian GNU/Linux, there is a packaged ejabberd, but it's a quite old version. To use the latest, use the ejabberd official repository.

root@jabberserver:~# 

serv installing is straightforward as it gets.

^