Enabling third-party lua modules

Hi. I’ve been desperately trying to integrate token_moderation module into a docker jitsi infrastructure. I’ve done everything written in an installation guide on a github page, but turned out that it’s all in vain. I’m getting the following error

prosody    | modulemanager                                                error	Unable to load module 'token_moderation': /usr/lib/prosody/modules/mod_token_moderation.lua: No such file or directory

Where do these modules come from?
Any help concerning a setup of lua modules in docker environment is appreciated.

UPD: I’ve already set XMPP_MUC_MODULES in .env to its respective value, i.e token_moderation

That module is not coming with the default jitsi-meet installation, you need to include it in your image.

@damencho, thank you for a quick reply. Could you please elaborate on that?

You need to make sure that this file jitsi-token-moderation-plugin/mod_token_moderation.lua at master · nvonahsen/jitsi-token-moderation-plugin · GitHub is available in /usr/share/jitsi-meet/prosody-plugins

I don’t even have such folder

I have no idea how to do that with docker, but you have it in your web image

First of all, I would recommend you to use this module instead of token_moderation.

Second, follow below steps

  1. Clone docker-jitsi repo.
  2. Put the above lua file in prosody/rootfs/defaults directory.
  3. Add COPY rootfs/defaults/mod_token_affiliation.lua /prosody-plugins line after COPY rootfs/ / in prosody Dockerfile which is present in prosody/rootfs directory.
  4. Create your own prosody docker image.
  5. change jitsi/prosody:latest to you own prosody image in docker-compose.yaml file.


Use bind-mounts in docker. mount the token_affiliation.lua file to /prosody-plugins

1 Like

@metadata, thank you very much for a detailed guide. How would you justify your decision of preferring token_affiliation to token_moderation? Does the latter contain some horrible bugs?

UPD I’ve just built an image, and it turned out that it works! @metadata @damencho , thank you very much for help

token_affiliation is the updated version of token_moderation created by @emrah. token_affiliation allow you to grant moderator rights to other participants as well. There is no bug in token_moderation but I like token_affiliation more. :slight_smile:

Well, that’s reasonable. Will stick to token_affiliation then. Thank you!