Who's Online Plugin (discourse-whos-online)

Summary: discourse-whos-online displays a list of users currently active on the site

:link: GitHub: https://github.com/discourse/discourse-whos-online
:arrow_right: Install: Follow the plugin installation guide.


:information_source: Think carefully before installing this plugin. Discourse is designed for asynchronous discussion, and a list of online users can be harmful for some communities

It can also optionally display a user’s online status on their avatar. Either with a “ring”, “glow”, or with a “flair” icon in the top left.
45 39 10

The plugin uses the MessageBus to keep up-to-date, so user status is reflected in real-time. Users which have enabled the “hide profile and presence” setting will not be displayed. You can customize a number of things using the available site settings and language strings:


These are available in the “plugins” section of the admin settings panel.

  • whos_online_active_timeago: maximum “last seen” for which users are considered online (minutes)
  • whos_online_collapse_threshold: number of users before the avatars overlap each other (see gif above). Set very high to disable this feature
  • whos_online_maximum_display: the maximum number of avatars to display. The numeric counter will still count higher than this. The choice of who gets displayed is currently inconsistent
  • whos_online minimum_display: the minimum number of avatars to display. Below this, a “no users online” message is displayed
  • whos_online_hide_below_minimum_display: if enabled, the widget will be entirely hidden when the number of users is less than minimum_display
  • whos_online_display_public: should the plugin be displayed to people who aren’t logged in? Defaults to true.
  • whos_online_display_min_trust_level: the minimum trust level that this plugin is displayed to. Defaults to 0
  • whos_online_avatar_indicator: choose how to display online status on user avatars. Defaults to “ring”
  • whos_online_avatar_indicator_topic_lists: display avatar indicators in mobile topic lists, and the “Categories & Latest” view. Defaults to off.
  • whos_online_count_only: when enabled, only the count will be displayed. Online user identities will not be revealed

:speech_balloon: Frontend Language Strings

These are available in the admin panel under CustomizeText Content (search for whos_online)

  • js.whos_online.no_users | “No users currently online”:The message displayed when the number of users < whos online minimum display setting.
  • js.whos_online.title | “Online ({{count}})”: The text displayed before the list of avatars. {{count}} is the number of users online.
  • js.whos_online.tooltip | “Users seen in the last 5 minutes”: the text displayed on mouseover of the text.

At the moment, I’d recommend staying away from this plugin if you have more than ~50 concurrent users. That said, there are reports of people who have it working with many more users, and people who report issues with fewer users.

We are hoping to rewrite some parts of this plugin in the next few weeks/months so that it scales better, and we can remove the #experimental tag.


Hi, so this plugin made my forum actually usable. It was a tiny change but now people are actually using the chat and having real convos on the boards. This should seriously be added as a default option to Discourse. Thank you!


I hate to be annoying, but any update on this? I’m talking to the owners of a discourse forum I am active on about adding this and their requirement is that the plugin must be removed from the experimental phase before it is added.

Would you consider the plugin experimental for forums with <40 users per day? The forum I’m on has fairly low load.


We like this plugin, but on just updating to the latest discourse version I got this error which broke the main discourse pages (although not the admin page)

Unhandled Promise Rejection: Error: Could not find module `ember` imported from `discourse/plugins/discourse-whos-online/discourse/components/whos-online

This was in latest Safari on a Mac, using 2.8.0.beta6
Disabling the whos-online plugin and rebuilding everything solves the error. Would love to be able to reenable soon though.


Did you update the plugin at the same time? Old versions of the plugin are not compatible with the latest version of Discourse (fixes were made in this commit). But if you have the latest version of the plugin, things should be working ok.


I have a question about this please:

What’s the expensive code / work here?

Is the number of people online the issue? Or the number of people that could see this plugin?

Eg. If a busy forum used this but only 4x staff users had access to it, would it still be an expensive plugin?

I also note this was started in 2016, yet in 2021 it’s still experimental. I’m guessing that’s not likely to ever change now? :thinking:

1 Like

The problem is primarily with the number of concurrently ‘online’ people.

Good news though: I’ve been working on a re-write of this plugin, and it’s very nearly ready to merge. If anyone is keen to try it out, the work is on the ‘v2’ branch on GitHub (and the PR can be found here). The changes are mostly behind-the-scenes, so nothing too exciting. But it should scale much better on larger sites.

We’re testing this internally, and hoping to merge in the next couple of weeks. I’ll post here, and update the OP, when that’s done.


Hi, @david any news or ETA? :slight_smile: Thank you.


The change is now merged, and I’ve removed the #experimental tag from this topic.

Let us know if you have any feedback on the change!


We’ve put the plugin back in our forum and it has performed well so far, even with some heavy traffic sometimes.

Is the plugin now open to new/improved features? :grin: (or at least in the near future)


Great - glad to hear it’s performing well!

I can’t guarantee whether we’ll be able to implement them, but always open to suggestions!


Love this plugin. Noticed that on mobile the flair dot is misaligned.


But they are aligned correctly on the “current”’page.


Are you using a custom theme? The first screenshot doesn’t look like out-the-box Discourse


Using the Material Design theme.


Does the README.md need updating on the repo @david ? :thinking:

(ref: This plugin was originally designed for a small discourse community, and has not been optimized for large sites)


Of course, no problem, I’ve suggested it before:

  • include a “who’s viewing what” option, meaning when 100 users are online and 70 of them are reading a certain topic then it could be mentioned like “70 viewing” right after the topic title (similar behavior in category view, but for the whole category)… with or without threshold (so that just topics above a certain amount of users reading it get the notice).

This is a feature we had back in the days with the old SMF that was particularly useful for users to get what people were reading… it’s basically a measure of popularity for the topic, and sometimes more useful than total amount of replies or total reads.

Another feature I would suggest is to place the list of avatars somewhere else not to take the focus out of the topic list, but I understand that with discourse not having a “fixed footer” (at least as long the topic list just keeps rolling) it will be kind of hard, so I won’t suggest this for now. :sweat_smile:


Unfortunately we’re finding it’s still using unacceptable levels of CPU with more than about 35 users online. We really like the plugin otherwise, and I’m happy to provide more metrics if it helps.

8 GB RAM, 2 vCPUs, 160 GB SSD, at AWS, $40/month. Not exactly a tiny droplet.

Plugin is up-to-date except for the latest commit which just updated the README. My app.yml is still pointed to @david’s old repo but it’s actually pulling from the new discourse repo, so I guess you’ve done some magic to handle that.

Using ‘top’, with fewer than ~20 users online, there are four ruby processes at ~2-5% CPU each. With ~35 users online, each of the four processes runs ~40% CPU.

From the Lightsail dashboard, you can see where we disabled the icons and switched to whos_online_count_only. That option does give good performance, but we like the avatars :frowning: . This is just one example, but we’ve enabled and disabled enough times to be certain it’s due to this plugin.


When the CPU usage is high, we get a lot of 429 errors and other slowness.

I suppose the performance would fall off as the square of the number of users- if you have 2X the users, each pulling 2X the avatars (or whatever the bottleneck is), it would fall off sharply at some point, for example at 35 users.

Again, happy to collect metrics if it helps. Tell me what to do.


Super interesting, thanks @Mark_Schmucker. Could you share a little more about your site?

  • Is it open to the public? (i.e. are anonymous users looking at the list of online users)

  • If so, would you be happy share a URL (either here, or via PM)?

  • Any idea how many concurrent anonymous users would be viewing the site?

  • Do you have any logging/graphinh of request URLs which might help us work out which requests are causing the problem? (no worries if not, I realise this isn’t normally part of a Discourse install)