eJabberd is an XMPP server built with Erlang, it provides loads of useful features and is quite robust.

Installing

~ # emerge -pv ejabberd

[ebuild  N    ] net-im/jabber-base-0.01  0 kB
[ebuild  N    ] dev-lang/erlang-13.2.4  USE="-doc -emacs -hipe -java -kpoll -odbc -sctp smp ssl -tk -wxwidgets" 58,686 kB
[ebuild  N    ] net-im/ejabberd-2.1.6  USE="-captcha -debug ldap mod_irc mod_muc -mod_proxy65 -mod_pubsub -mod_statsdx -odbc pam ssl web zlib" 2,808 kB

When finished this message is displayed.

 * For configuration instructions, please see
 * /usr/share/doc/ejabberd-2.1.6/html/guide.html, or the online version at
 * http://www.process-one.net/en/ejabberd/docs/guide_en/
 * 
 * ====================================================================
 * Quick Start Guide:
 * 1) Add output of `hostname -f` to /etc/jabber/ejabberd.cfg line 91
 *    {hosts, ["localhost", "thehost"]}.
 * 2) Add an admin user to /etc/jabber/ejabberd.cfg line 360
 *    {acl, admin, {user, "theadmin", "thehost"}}.
 * 3) Start the server
 *    # /etc/init.d/ejabberd start
 * 4) Register the admin user
 *    # /usr/sbin/ejabberdctl register theadmin thehost thepassword
 * 5) Log in with your favourite jabber client or using the web admin

Basic Configuration

Once ejabberd is installed it's configuration must be updated, this example below shows some highlights. In the example, $host represents your hostname, $user is your user

% Host Names
{hosts, ["$host", "example.com", "other-virtual-host.com"]}.

% Admin User ACL
{acl, admin, {user, "$user", "$host"}}.

Now ejabberd can be started and this user can be registered in the system.

~ # /etc/init.d/ejabberd start
~ # ejabberdctl register $user $host $password

Configure Service (SRV) Records

There will need to exist three records in the DNS for the XMPP infrastructure to auto-detect the thin. Substitue your values for $domain and $host, the dot's are important! Of course, if s2s is not enabled you can leave out

_xmpp-client._tcp.edoceo.com. 3601 IN	SRV	1 1 5222 phosphorus.edoceo.com.
_xmpp-server._tcp.edoceo.com. 3601 IN	SRV	1 1 5269 phosphorus.edoceo.com.
# This is only necessary for older stuff
# _jabber._tcp.edoceo.       IN SRV   0 0 5269   phosphorus.edoceo.com.

See Also