mod_webpresence - Presence on the Web

Name: mod_webpresence
Purpose: Presence on the Web
Author: Badlop
Type: Module
Requirements: ejabberd SVN
Download: ejabberd-modules

This module is the successor of Igor Goryachev's mod_presence.

Features for admin

  • No need to install an additional web server, database, libraries, or programs: it uses ejabberd's embedded http service and Erlang's internal database.
  • Page in Web Admin that lists registered users and their options.
  • Page in Web Admin with usage statistics: options, and icon themes. Includes raw number and percentages.
  • Customizable port and URL base path.
  • Possibility to restrict usage to only some users.
  • Easy to add more icon themes: just copy the files to the proper directory.
  • Fully translatable both the admin and the user messages.
  • Support for virtual hosts and clustering.
  • Highly scalable: each registered user is a register in the table. Other solutions based on bots are limited to only a few hundreds or thousands of registered users.
  • Published under the GPL license: you can inspect the source code, modify and compile. It's Open Source and Free Sofware.

Features for user

  • Easy registration and unregistration with any powerful Jabber client.
  • After registration, you receive a message with instructions and example URLs.
  • Specify your account using your real Jabber ID or a Random ID.
  • Get a reminder of your Random ID if you forget it.
  • Request a new Random ID if you don't want to use the old one.
  • Publish the avatar that you stored in your vCard.
  • Publish an XML that lists resources and their priority, presence, and status text.
  • Publish the status text of your presence.
  • Publish and image that reflects your current presence.
  • Many different icon themes, by different authors and sources.
  • You can define the default icon theme you want to use, or specify a specific one in the URL.
  • You can publish the image or status text of a specific resource.
  • Public page that shows all the existing icon themes.
  • You can unregister by disabling the options, and you receive a message.


Go to Screenshots of Web Presence

Additional Icon Themes

TO DO: If not all themes are included in the released version, there will be a zip file with all the themes.

Feature Requests

  • User Mood and User tune from PEP output: waiting for PEP to be integrated in ejabberd.

Related Links

Alternative solutions

If this programs doesn't suit your needs, there are other programs and services to publish Jabber presence in the web:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


I've set status to "invisible" and mod_webpresence displays me as "online". How can it be set to display "offline" instead?

> I've set status to

> I've set status to "invisible". How can it be set to display "offline" instead?

Not possible. When you refer to become invisible, your client may be using one of those protocols:

  • XEP-0018 is a rejected protocol
  • XEP-0126 uses privacy lists to hide presence, so mod_webpresence doesn't support it
  • XEP-0186 is experimental, not supported in ejabberd or mod_webpresence.

Usable with Apache

Some phpbb forums don't want to shop [img][/img], while they show [img][/img].
So I putted "cd ~www; wget ''" into cron and use apache's hosted image on forums.
Any other ways?

mod_webpresence jQuery plugin

I've worked up a simple jQuery plugin that can display and dynamically update a webpresence badge using mod_webpresence. It is capable of parsing the XML endpoint, knows about jid/rid stuff, avatars, and image themes. It also provides a hook for doing arbitrary stuff on status changes, if you want something fancier to happen than the default. Full documentation is provided in the script.

direct link

Problem grabbing information from mod_webpresence service


another thing I noticed: ( is the server I'm maintaining) is shown grey in this list:

I had a little chat with the maintainer of that list. He told me that it is grey because the bot cannot grab information from the service. It gets a 403 error.

Is this because the default access rule, which I'm running, is "local" and external users cannot use (and maybe not even access for some information) this service?

He suggests that you open the service for information but disable registration from external users.

Is this maybe also the problem why I don't see a proper webpresence service when pointing to on of our virtual host domains like with my user, as described here?


Specify who can register in the webpresence service.
Don't bother to specify 'all' because this module can only show presence of
local users.
Default value: local

Explanation of mod_webpresence in multiple vhosts

Roi wrote:

I don't see a proper webpresence service when pointing to on of our virtual host domains like with my user,

What you describe is not a bug or misconfiguration, it is done on purpose.

mod_webpresence provides two things:

  1. A Jabber service where users of the local vhost can register. Nobody else than local users are interested in that service, as the service only works correctly for local users.
  2. A web page where everybody can see the presence of local users that have previously registered in the corresponding Jabber service.

mod_webpresence is heavily tied inside ejabberd, so this module is restricted to provide service only to users of the vhost where it runs.

With this setup, mod_webpresence will run for "localhost", and will run for "":

{hosts, ["localhost", ""]}.
{modules, [
 {mod_webpresence, []},

The result is that:

  • The instance of mod_webpresence that runs for "localhost" is available to users of localhost in the JID webpresence.localhost.
    Anybody can access the page http://localhost:5280/presence/
  • The instance of mod_webpresence that runs for "" is available to users of in the JID
    Anybody can access the page

mod_webpresence issue with virtual hosts


I set up the latest mod_webpresence for ejabberd 2.0.x from SVN for my ejabberd 2.0.3 server (I run a Debian system and no 2.1.x packages are available for Debian at the moment).


Support for virtual hosts and clustering.

Everything seems to work ok on the primary jabber domain but secondary virtual hosts have a problem with mod_webpresence. First of all the icon shown in Miranda isn't the icon usually show for this service and also the service is shown as faulty.

I did not set the hostname for the service, so the hostname for every domain is webpresence.jabberdomain.tld, which I don't really like because all services just have one hostname (taken from the primary domain name) on my server. When I set the domain name to a fixed value the service seems not to run anyhow.

Does somebody have an idea what the problem might be? Maybe the same like here:


mod_webpresence and ejabberd 2.0.2

I am testing mod_webpresence with ejabberd 2.0.2 in Centos 5.2 x86_64 and does not working. In the "Web presence" admin page I get "not found".

In ejabberd.log:

=ERROR REPORT==== 2008-10-29 13:45:29 ===
E(<0.755.0>:ejabberd_hooks:205) : {aborted,

With ejabberd 2.0.1 it works OK.

Does anyone have tried and it works?


For ejabberd 2.0.x get mod_webpresence/branches/ejabberd-2.0.x

ppcharli wrote:

I am testing mod_webpresence with ejabberd 2.0.2 in Centos 5.2 x86_64 and does not working. In the "Web presence" admin page I get "not found".

Until now you downloaded mod_webpresence/trunk, right? Since October 2008, that version requires ejabberd trunk SVN (which will become ejabberd 2.1 when released).

If you want to use mod_webpresence with any version ejabberd 2.0.x, please get mod_webpresence/branches/ejabberd-2.0.x. I tried this with ejabberd 2.0.2 and the WebAdmin page works correctly.

ejabberd-2.0.3 no success using branches/ejabberd-2.0.x

I've been trying to get mod_webpresence working under ejabberd-2.0.3, with no success.

I do see mnesia tables, but the module doesn't show up in the admin interface, and accessing a presence URL never returns any data, the listener always returns a Not Found result.

It's possible I didn't quite get the configuration file changes into ejabberd.cfg correctly, but I don't receive any errors from ejabberd when I restart

The modules statement is:

        {access, webpresence_auto, [{allow, local}]}

Check documentation about ejabberd's Access rules

You messed how ejabberd's Access rules work. See the ejabberd Guide and ejabberd.cfg for examples.

In your case, it seems what you want to put is:

{access, webpresence_auto, [{allow, local}]}.

{modules, [
        {access, webpresence_auto}


Thank you very much badlop, you are right

Issues with priority 'undefined'

I've recently gone about patching this module to query an entire vhost for statuses and found a bug. If a priority for a resource is undefined e.g :


The module will error out and return a 'Not Found'. I suppose if every resource requires a priority by definition then it's not the fault of the module but some exception handling would be nice. Right now my patch gathers the online users by querying the session table so I'll do some scrubbing before passing the data onward.
In regards to my patch I'm not sure if it's worth offering up since it only returns XML and ignores the ACL restrictions so it's somewhat tailored for my needs. I'll make it available to anyone interested though.

Bug in mod_webpresence, try new SVN

tlaramie wrote:

If a priority for a resource is undefined ... The module will error out and return a 'Not Found'.
I suppose if every resource requires a priority by definition then it's not the fault of the module but some exception handling would be nice.

I think ejabberd is correct, and the problem is in mod_webpresence, that must handle an undefined priority:

RFC3921bis-06 wrote:

After completing the preconditions described in [XMPP‑CORE] and requesting the roster (RECOMMENDED), a client signals its availability for communication by sending INITIAL PRESENCE to its server...
The initial presence stanza MAY contain the <priority/> element...

So, the priority is only set when sending initial presence. Some Jabber clients may not send initial presence at all, for example bots.

I've updated mod_webpresence in SVN: only sessions that have presence (and priority) set will be returned. I didn't test the change.

Thanks but...

Because it could cause confusion and given that clients are bound to complain, I revised the changes you committed to the SVN to run a case .. of to check for undefined. If true it returns a -1 and false returns the priority. -1 is a valid value but generally the jabber client connecting is one of our own design, which users preset priority values (making it easier to filter for).
Thanks for the clarification though.

another alternative solution

another alternative solution :

jobble wrote:

Right now, all our efforts are focused on Jabber Users Map - a fully automated, GoogleMaps-based map for every Jabber user.

Syndicate content