Note: This post is for programmers like the folks who build Roo Kids. Parents and everyday users of Roo Kids app can skip this post.
Roo Kids uses eJabberd XMPP Server running on Ubuntu on AWS ec2 machine. XMPP powers more app than you may realise. Here is list of all apps that use XMPP – http://xmpp.org/xmpp-software/clients/
Here are some notes on how to install eJabberd XMPP Server:
Step 1: Get install files
Get the installation file from http://www.process-one.net/en/ejabberd/downloads. Or:
wget http://www.process-one.net/downloads/ejabberd/13.12/ejabberd-13.12-linux-x86-installer.run
Step 2: Install
chmod +x ejabberd-13.12-linux-x86-installer.run sudo ./ejabberd-13.12-linux-x86-installer.run cd /opt/ejabberd-13.12/
By default ejabberd is installed in /opt/ejabberd-13.12/
Step 3: Configure SSL (optional)
The following step assumes that you have SSL certificates that you are already using in your Apache:
sudo -i cd /opt/ejabberd-13.12/ cat /etc/apache2/ssl/crt/yoursite.crt > server.pem cat /etc/apache2/ssl/key/yoursite.key >> server.pem chmod o-r server.pem
This allows all XMPP stanza’s to be shared over safe SSL layer.
Step 4: Starting Up
sudo -i cd /opt/ejabberd-13.12/bin ./start
The logs files are placed in
/opt/ejabberd-13.12/logs
by default.
ejabberd.cfg
Here some some things we need to configure properly in the configuration file
%% Admin user {acl, admin, {user, "adminname", "yoursite.com"}}.
%% Hostname {hosts, ["yoursite.com"]}.
ejabberd Web Console
1. To access the console, make sure the port is configured in ejabberd.cfg
{5280, ejabberd_http, [ %%{request_handlers, %% [ %% {["pub", "archive"], mod_http_fileserver} %% ]}, %%captcha, http_bind, http_poll, web_admin ]}
2. Then visit this URL to access the webconsole
http://yoursite.com:5280/admin
3. The username to be used should include the domain name
adminname@yoursite.com
The password is what you would have entered while installing ejabberd. Forgot ejabberd webconsole’s admin password?
AWS EC2 Security Group & Firewalls
Please ensure that port 5280 is enabled. Below is suggested configuration.
Type | Protocol | Port Range | Source |
Custom TCP Rule | TCP | 5280 | 0.0.0.0/0 |
Forgot ejabberd Webconsole’s Admin Password?
There is no direct way to retrieve or reset it. We suggest you create a new user using ejabberctl, add that user as admin and then access Webconsole using this new user.
1. Create new user
sudo -i cd /opt/ejabberd-13.12/bin ./ejabberdctl register newadmin yoursite password
2. Update ejabberd.cfg
%% The 'admin' ACL grants administrative privileges to Jabber accounts. %% You can put as many accounts as you want. {acl, admin, {user, "newadmin", "yoursite"}}.
3. Restart ejabberd
sudo -i cd /opt/ejabberd-13.12/bin ./stop ./start