Ejabberd is a Jabber/XMPP server written in Erlang, with very high performance and great scalability. Besides that, it has a web-based management interface that makes administration pretty easy. So here are the steps to install and configure Ejabberd on your server:
1. How to install Ejabberd
You need to install Ejabberd by running the next command:
apt-get install ejabberd
Editing the Configuration File
Now that you have installed the server, you will have to set this up by editing the Ejabberd configuration file, which you can find in this location: /etc/ejabberd/ejabberd.cfg
.
Set Host Name
Configure your server to be available with a custom hostname instead of just localhost. You will need to add the following line for this purpose:
Original:
{hosts, ["localhost"]} .
Modified:
{hosts, ["localhost","servername.com"]} .
Change the "servername.com" part to your hostname.
**Create admin user
Configure Server Administrator To this end, add or update the following line in your configuration file to set an administrator for the server:
Original:
{acl, admin, {user, "", "localhost"}}.
Modified:
{acl, admin, {user, "admin-name", "servername.com"}}.
Replace "admin-name"
by the admin username you would like to use, and "servername.com"
by the hostname of your server.
3. Restart the Ejabberd Service
After these changes, it is necessary to restart the Ejabberd service so that the new settings can take effect:
service ejabberd restart
4. Set the Admin Password
Next, configure the admin user you created with a password using the following command:
ejabberdctl register admin-name servername.com password
Substitute "admin-name"
, "servername.com"
, and "password"
with your admin username, the server hostname, and a strong password, respectively.
5. Access the Web-Based Management Panel
Now that everything is configured, you can administer your Ejabberd server through its web-based interface. Open up your browser and visit:
http://servername.com:5280/admin
Log in with your admin username and password.
This version is more compact, hence much clearer to help the reader through the installation and configuration steps.