Ejabberd setup on debian squeeze

Installation (trivial):

# apt-get install ejabberd

Now the daemon runs, but you do want to tweak the configuration:

# vim /etc/ejabberd/ejabberd.cfg

You need to modify it in some places, and leave the rest as it is. I'll give you the modifications in unified diff formats: lines prefixed by "-" are deletions, "+" are additions. No prefix is just context.

First, the admin and the hosts

 @@ -55,10 +55,10 @@
  %% Options which are set by Debconf and managed by ucf

  %% Admin user
 -{acl, admin, {user, "", "localhost"}}.
 +{acl, admin, {user, "god", mydomain.org"}}.

  %% Hostname
 -{hosts, ["localhost"]}.
 +{hosts, ["mydomain.org", "another.domain.org", "another.org"]}.

Restart the server:

 # invoke-rc.d ejabberd restart

Register the admin user

 # ejabberdctl register god mydomain.org P4ssW0rd

A note about the password. You can change this later, and you are encouraged to do so, as the password set at the command line will stick in the history. Also, weird characters will be interpolated by the shell, so pick a simple one and change it later with your XMPP client, or on the web interface.

Some additional settings for free registration (but with notification to the admin).

 @@ -493,7 +493,7 @@
  % (note that if you remove mod_register from modules list then users will not
  % be able to change their password as well as register).
  % This setting is default because it's more safe.
 -{access, register, [{deny, all}]}.
 +{access, register, [{allow, all}]}.

  %% By default frequency of account registrations from the same IP
  %% is limited to 1 account every 10 minutes. To disable put: infinity


 @@ -611,7 +610,7 @@
          %% When a user registers, send a notification to
          %% these Jabber accounts.
          %%
 -        %%{registration_watchers, ["admin1@example.org"]},
 +        {registration_watchers, [god@mydomain.org"]},

          {access, register}
         ]},

Restart the server:

 # invoke-rc.d ejabberd restart

You're done.

The admin web console is at http://mydomain.org:5280/admin