Set up Jabber on Debian Wheezy


Jabber is a chat system that allows you to chat and send files to other users, all without data mining done by the large commercial businesses. You can easily set up a basic system on your own server without requiring a lot of extra resources.

Jabber uses XMPP (https://en.wikipedia.org/wiki/XMPP, official site at http://xmpp.org/ ) protocol, which is the standard for many online chat groups. Setting it up in Debian Wheezy is not intuitive, but is simple once you know a few tricks.

There are many versions of jabber software. I chose ejabberd on the advice of my friend Michael, who also thoughtfully provided me with his configuration for his installation and many other hints. Michael runs a much larger jabber install, providing chat for the IPFire firewall/router project (http://www.ipfire.org).

Install and Configure
apt-get install ejabberd

That is all there is to it. Unfortunately, it installs some defaults that I could not rapidly find the values of, such as the password for the administrative account it created. Also, I was not quite sure how to set up the domain name for the service without looking at Michaels configuration. So, I did the old tried and true

dpkg-reconfigure ejabberd

When this is excuted, you now have the option of creating your administrative user and setting up your domain name.

Being lazy, I wanted to use the web interface to access the server and configure it, but could not figure out the proper URL. Finally, by going through the config file, I figured out it would be on port 5280 of a default install, and the administrator page is at /admin, so the correct url is

http://server.example.com:5280/admin

Again, the configuration is fairly primitive but I think it is mainly for people like me who really don't want to spend a lot of time trying to figure things out.

Note: the full documentation for your version of ejabberd is found at /usr/share/doc/ejabberd/guide.html. I recommend you not use the one at http://www.process-one.net/docs/ejabberd/guide_en.html as that is for the current version of ejabberd, and anyone who knows anything about Debian knows it is never the current version of anything. Debian works for stability, not bleeding edge (well, until the recent systemd crap).

Other notes
  1. ejabberd is designed for multiple virtual domains. So, you could have server.example.com, server2.example.com and mydomain.org all on the same machine. Remember this when adding users, or configuring things. For example, all users must be added as username@domainname.
  2. The Debian install is very basic, appearantly without some of the modules (such as voice/video, etc...). That does not mean ejabberd can not handle them, it just means the Debian maintainers are doing their job, setting up a base system you can then configure. I have not done any of this yet as out of the package it allows me to chat and exchange files privately.
  3. The Debian install uses the built in authentication. If you want to use a real database like Postfix or MySQL, RTFM.
  4. ejabberd makes it easy to add domains to a single install, logically separating clients. Again, RTFM for that, but basically, you take the line in /etc/ejabberd/ejabberd.cfg which reads
    {hosts, ["example.com"]}.
    
    and add additional domains such as
    {hosts, ["example.com","example2.com"]}.
    note the period at the end is required
  5. Newer versions of ejabberd use a YAML format for the configuration file instead of the Erlang definition of the older one. Thus, my suggestion not to read the latest configuration guides, relying on the ones which come with the system.
  6. ejabberd uses very low resources, as far as I can tell so far. I have not seen it even touch the processor, and its memory is very low also. I have it on a server that provides web, email and database, and it is not bothering anything.
Use

First, create an account. There are several ways to do this, but I'm lazy and just went to the web interface and logged in as the administrator. To to Virtual Hosts, then select the host (only on there), then Users. Here you can create a username and password.

When you are ready to connect, you need an IM (chat) client. I like Pidgin (https://pidgin.im/) since it is a package available for Windows and Linux, and they point you to a good external package for OSX. They also have a lot of nice plugins, and it works with many other IM protocols (I've used it in the past with Yahoo and Skype, but I'm not sure if that still works).

Add your account via Accounts | Add and choose XMPP as your protocol. Your username is the part before the @, and your domain is the part after. On the second tab (Advanced), enter the DNS resolvable server name under Connect Server and ensure the Connection security is Require encryption. That is all there is to it.

There are several XMPP clients for Android, but I don't know enough to choose one yet.

 

Last update:
2015-08-26 07:56
Author:
Rod
Revision:
1.1
Average rating: 5 (1 Vote)

You can comment this FAQ

Chuck Norris has counted to infinity. Twice.