Skip to main content
  1. Posts/

Install personal Jabber Server on CentOS using ejabberd

·207 words·1 min· loading · loading · ·
Marco Mornati
Author
Marco Mornati
I build, self-host and sometimes break software in production — writing about AI tooling, coding agents and infrastructure.

Here’s a quick guide to install a jabber server on CentOS machine.

eJabberd Installation
#

On your server type, as root user:

yum -y install ejabberd

Create an admin user for your server using the cli interface:

ejabberdctl register admin localhost yourpassword

Grant the created user admin privileges. To do this modify the /etc/ejabberd/ejabberd.cfg

%% Admin user
{acl, admin, {user, "admin", "localhost"}}.

%% Hostname
{hosts, ["localhost"]}.

Now you can start the server:

/etc/init.d/ejabberd start

Create a user
#

You can perform all configuration via the web interface, but I prefer the command line. So, to add a new user via CLI, you can execute:

ejabberdctl register username yourdomain userpassword

replacing username, userpassword, and yourdomain with what you prefer.

By now you can connect using a jabber client to the configured server. By default the configured server port is 5222.

Configure DNS
#

If you want to expose your server using an host/dns name, you should configure your dns server adding:

Doc DNS:

_xmpp-client._tcp.example.net. TTL IN SRV priority weight port target
_xmpp-server._tcp.example.net. TTL IN SRV priority weight port target
_xmpp-client._tcp.example.net. 86400 IN SRV 5 0 5222 example.net. 
_xmpp-server._tcp.example.net. 86400 IN SRV 5 0 5269 example.net.

Now you have an xmpp-server identified for your example.net domain.

Via: Source, DNS