Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Debian and Ubuntu packaging for ejabberd snapshots.
Branch: master
Failed to load latest commit information.
po Initial import.
scripts Initial import.
README.Debian Initial import.
changelog Updated for new snapshot.
compat Initial import.
config Initial import.
control Initial import. Initial import.
copyright Initial import.
default Initial import.
dirs Initial import.
doc-base Initial import.
docs Initial import.
ejabberd.8 Initial import.
ejabberd.cfg Initial import.
ejabberdctl.8 Initial import.
examples Initial import.
inetrc Initial import.
init.d Initial import.
install Initial import.
logrotate Initial import.
manpages Initial import.
postinst Initial import.
postrm Initial import.
prerm Initial import.
rules Initial import.
templates Initial import.


The package always makes a backup of the ejabberd database if it's running
when it is upgraded or removed. The backup files are stored in
/var/backups/ejabberd-<timestamp>.* directory.

The package installs ejabberd Erlang headers into /usr/lib/ejabberd/include
directory. To build a module using these headers, as usual include them using
and compile the module using -pa option to add ejabberd path to a search list
    erlc -pa /usr/lib/ejabberd/ebin module.erl

Alternatively, include headers as
and add option -I /usr/lib/ejabberd/include to erlc command line.

The ejabberd daemon which is run in init.d script is owned by user ejabberd,
so it cannot bind to privileged ports (below 1024). The error message in
/var/log/ejabberd/ejabberd.log looks similar to the following:

                 Failed to open socket for {443,
                                                 c2s_shaper}]}: eacces

If you want ejabberd to listen for example port 443 you could redirect it to
port 5222 (the default XMPP port) by a firewall rule. For example:

iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 5222

The ejabberd daemon uses Erlang database Mnesia. Even if it's configured for
using ODBC it uses Mnesia for some data (privacy lists et.) and runtime tasks
(keeping routing table etc.). Mnesia is a multi-master database, and it tightly
bounds to a hostname where it's working. Therefore, if you change computer
hostname then ejabberd will stop working.

If you don't have a current database backup then run ejabberd (attached to the
terminal, otherwise you'll not be able to backup database and quit) by

/usr/sbin/ejabberd --node ejabberd@oldhostname

and in the Erlang shell prompt call

(ejabberd@oldhostname)1> mnesia:backup("/tmp/ejabberd_at_oldhostname.backup").

(note the trailing fullstop). Then stop ejabberd by typing

(ejabberd@oldhostname)1> q().

Now you have the latest Mnesia database backup.

After that run a new Erlang shell by

erl -pa /usr/lib/ejabberd/ebin

and convert the backup file to a new hostname:

1> mnesia_convert:change_node_name('ejabberd@oldhostname',

2> q().

Then use file /tmp/ejabberd_at_newhostname.backup to restore ejabberd database
as it is described in ejabberdctl manual page.

Torsten Werner <>,
Sergei Golovan <>      Fri, 15 Feb 2008 10:23:59 +0300
Something went wrong with that request. Please try again.