FREEBSD PORT - Quick start

This guide assumes that you have already added ejabberd_enable="YES" to your /etc/rc.conf file and are still having trouble with getting the ejabberd server running....

In order to add the first admin and enable access for clients you need to do the following:

Step 1:- Using the tool ejabberdctl

NOTE: This will only get you on to the ADMIN Console, it will not allow you to connect to the server with a client

** login as root via console or su **
# su - ejabberd
% ejabberdctl ejabberd@[yourhostname] register [newadminname] [yourhostname] [newpassword]
% exit
#

For example I used this:
% ejabberdctl ejabberd@nessy register admin nessy thisworks1234

Step 2 :- In-band registration and client connectivity with tls/ssl

In band registration will not work until you fix the tls/ssl certs first, do this as follows:

# cd /var/spool/ejabberd
# openssl req -newkey rsa:1024 -x509 -nodes -out jabber.pem -keyout jabber.pem -days 365
[answer the questions however you wish]

create a config file if it doesn't already exist:
# cd /usr/local/etc/ejabberd
# cp ejabberd.cfg.example ejabberd.cfg

edit ejabberd.cfg [you'll need to know this cause I'm not going to write a guide about using vi]
Find the following two lines:

starttls, {certfile, "./ssl.pem"}]},
tls, {certfile, "./ssl.pem"}]},

Change the "./ssl.pem" statements to point to your new certificates at "/var/spool/ejabberd/jabber.pem":

starttls, {certfile, "/var/spool/ejabberd/jabber.pem"}]},
tls, {certfile, "/var/spool/ejabberd/jabber.pem"}]},

Step 3 :- Add the new admin to the config file

Edit the configuration file to promote the account created in the previous step to an account with administrator rights. Note that if you want to add more administrators, a seperate acl entry is needed for each administrator.

Remove the % from the beginning of "override_acls." line and add the acl for your new admin user.
format is as follows: {acl, [groupname], {user, "[newadminname]", "[yourhostname]"}}.

override_acls.
{acl, admin, {user, "admin", "nessy"}}.

Step 4 :- Restart ejabberd to load the new configuration.

# /usr/local/etc/rc.d/ejabberd.sh restart

Step 5 :- Start Admin Page

Open the web interface (http://[yourhostaddress]:5280/admin/) in your favourite browser.
Make sure to enter the full JID as username in this example: admin@nessy

PLEASE NOTE:
1. I am not aware of any security implications of where I have placed the certificate files. Use at your own risk.
2. I have used the term [yourhostname] to simplify writing this document. [yourhostname] == [domain] when logging in with a client and is used as a reference point to access multiple virtual jabber hosts on the one machine.
3. These instructions have been tested on FreeBSD 5.3 port install of ejabberd v1.1.2
4. This posting is a butchered version of section 6 of the "Ejabberd 1.1.2 Installation and Operation Guide" as written by Alexey Shchepin

Syndicate content