Prosody Module for delivering information about logged in and registered users
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


... in favor of



Prosody module for delivering information about logged in and registered users

mod_userstats gives you information about the number of registered and online users on your Prosody XMPP Server. There are two ways to grab the user counts:


  • (Optional) Specify the path to your module directory in Prosody:

    plugin_paths = { "/opt/prosody-modules" }
  • Download the latest Release of this module as an archive

  • Extract the archive to your module directory and rename the new directory to "mod_userstats"

  • Make sure Prosody can access the new directory (chmod -R prosody:prosody /opt/prosody-modules/mod_userstats)

  • Enable mod_userstats in your Prosody configuration:

    modules_enabled = {
  • Restart Prosody

Display user counts with PHP and CURL

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'https://yourserver.tld:5281/userstats');
$result = curl_exec($ch);

$obj = json_decode($result);

$onlineusers = $obj->online;
$registeredusers = $obj->registered;

// Now use $onlineusers and $registeredusers ...


Known issues

  • This module does not work with exotic auth mechanisms like "cyrus_sasl".