Allow site-wide moderators

Hi there,

is there a way for configuring Jitsi so that anyone can create rooms (like standard) but that moderator rights are still tied to user accounts (that you create with prosodyctl register…, like in the secured domain config)?

I.e., anyone can open a room, but if I jump into it later on, I can still enter username and password and become moderator?

Thanks and best wishes,


PS: Usecase - a school’s own, dedicated server, where rooms can be created, but when a teacher enters, they can always become moderator…

This is possible with JWT authentication (the jitsi-meet-tokens package).

  • guest can connect without token (allow_empty_token = true )

  • teachers connect using a token and become always moderator (the mod_token_affiliation module)

Dear emrah,

many thanks for getting back on this so quickly.

However, I’m a tiny bit lost. Could you give me a few more clues, as to how to implement this?

Or is there an alternative way, without JWT (which looks like quite a big extra thing for a novice like me).


There is an official document about the token authentication. If this is complicated for you, I can help you to install it.

After activating the JWT auth:

  • Students will use a link like this:
    They can’t gain the moderator rights in any conditions

  • Teachers will use a link like this:
    They became moderators in all circumstances

Hi there,

Thanks again for your help. I’ve dabbled a bit further. So JWT seems to work, somewhat, as I can set my username and avatar via appropriately generated tokens. However, if I use an incorrect secret in the token jitsi doesn’t seem to bother…? So something is still amiss

Anyway, I’ve also downloaded an enabled mod_token_affiliation, it seems to work as I see output in the debug log.


Here’s (parts of) my prosody conf, I hope this is sufficient:

VirtualHost ""
        authentication = "token"
        allow_empty_token = true
        ssl = {
                key = "/etc/prosody/certs/";
                certificate = "/etc/prosody/certs/";

        https_certificate = "/etc/prosody/certs/";
        https_key =  "/etc/prosody/certs/";

        speakerstats_component = ""
        conference_duration_component = ""
        -- we need bosh
        modules_enabled = {
            "ping"; -- Enable mod_ping
        c2s_require_encryption = false

Component "" "muc"
    storage = "memory"
    modules_enabled = {
VirtualHost ""
    authentication = "token"
    allow_empty_token = true
    --authentication = "anonymous"
    c2s_require_encryption = false
    modules_enabled = {
    lobby_muc = ""
    main_muc = ""

This is the /etc/jitsi/jicofo/ file:

Here’s the toke I used:

   "aud": "",
   "iss": "",
   "sub": "",
   "exp": 1925739151,
   "room": "*",
   "context": {
     "user": {
       "name": "bSmurf",
       "email": "",
       "affiliation": "owner",
       "avatar": ""

And in the log I get then:	debug	no occupant found for; creating new occupant object for	debug	pre join: MUC room ( <presence to='' xml:lang='en' from=''><x xmlns=''/><stats-id>Beulah-Isz</stats-id><videomuted xmlns=''>false</videomuted><c hash='sha-1' ver='cvjWXufsg4xT62Ec2mlATkFZ9lk=' xmlns='' node=''/><avatar-id>daa457b6ef2c1c114a3597031c89f12b</avatar-id><avatar-url></avatar-url><email></email><nick xmlns=''>bSmurf</nick><audiomuted xmlns=''>false</audiomuted><x xmlns='vcard-temp:x:update'><photo/></x><occupant-id xmlns='urn:xmpp:occupant-id:0' id='neNR48bEf1jmHYMyQwLZmWsxb7pB5Vv3XVhlwY8hWh4='/></presence>	debug	Session token: nil, session room: nil	debug	Will verify token for user:, room:	debug	Skipped room token verification - empty tokens are allowed	debug	allowed: to enter/create room:
...	debug	skip affiliation, no token

I wonder if the “Skipped room token verification - empty tokens are allowed” has anything to do with it?

But if I set allow_empty_token on the main virtualhost to false, it’s no longer “open” (and the jwt also doesn’t work…).

Thanks for any pointers! Feels like I’m close, but still no cigar :frowning:

Remove this virtualhost block. AFAIK the JWT authentication uses “allow_empty_token” to manage the guests.

What is the prosody version? It should be newer than 11.2

Hi emrah,

Prosody version is:

Jan 09 15:56:49 startup info    Hello and welcome to Prosody version trunk nightly build 1377 (2021-01-05, 919e7b962f0b)

Completely commenting out the guest vhost makes no difference either :frowning:

Any other pointers as to why it is stating “Skipped room token verification”? Feels like it never actually looks at the token contents (although, as I said, the token is still honoured for things like username and avatar…)?

When there is no token, the skipping token verification is normal (since allow_empty_token=true). But if it’s skipping while there is an invalid token, this is not normal.

Are you sure it’s skipping the verification while there is an invalid token (I don’t mean empty token)

How would I know that? Is there a way to debug the token-handling some more? As I said, I’m trying to send as “correct” tokens as I can (see post further up for structure). And it is getting parsed to some degree, as username and avatar-information is indeed drawn from it…

I can’t guess why. If it’s OK for you, I can connect through SSH and check the server.

Thanks for sharing useful post here.