Force Organisators to set Room-Passwords

Hey all,
We would like to add a prosody module to our self-hosted (Debian) jitsi-meet instance that forces the organizer of the room to set a password for the created room. I have found an approach in a similar topic (Persistent Passwords on Self Hosted Rooms) but I can’t get the approach to work. I’m creating a new post, because the discussion in the original thread has taken a different direction. This is my current status:

My module in /usr/share/jitsi-meet/prosody-plugins/mod_force_room_password.lua

module:hook("muc-room-pre-create", function(event)
        local pass = http.query.for.password for this;;

In /etc/prosody/conf.d/domain.cfg.lua i added:

-- we need bosh
        modules_enabled = {
            "ping"; -- Enable mod_ping

The /var/log/prosody/prosody.err log says:

modulemanager error Unable to load module ‘force_room_password’: …e/jitsi-meet/prosody-plugins/mod_force_room_password.lua:2: expected near ‘for’

Im running jitsi-meet on Debian 10 with secured domain.

I’d appreciate any thoughts you might have. Thanks!

1 Like

If you still have this in your code, then the module will not load.
You need to replace the http.query … part with your own logic to generate a password.

At least use a static value for the pwd.

local pass = „passw0rd“

Oh, the editor in this forum screws up the parentheses.

Thanks for your reply.

As you recommended I tried to set a static value for the room password and the error in the log disappeared.
My module in /usr/share/jitsi-meet/prosody-plugins/mod_force_room_password.lua is now:

module:hook("muc-room-pre-create", function(event)
        local pass = "secret";;

When I create a room now the password is unfortunately not set. Do you have any idea what other things there might be to try?

1 Like

In etc/prosody/conf.d/domain.cfg.lua, you have to invoke the module in the Component conference. … instead of the virtual host.


Hi, @fellow12312

after hooking the module, jicofo is blocked. Failed to join the room

I don’t think this will work with a prosody module. If you set a password in the prosody backend automatically this will not even allow the organizer to change the password after joining the conference.

Instead, you will probably need GUI changes in the web-frontend such as an automatic pop-up prompting the organizer to set a password.

Hey, the module now loads.

Now I get another Error when creating the room.

In the web console the following error occurs:
2020-05-12T09:14:18.605Z [conference.js] <_onConferenceFailed>: CONFERENCE FAILED: conference.authenticationRequired

Could this be the same error @shooding noticed?

Hey. I’m new to jitsi and prosody so I tried an approach I noticed in Persistent Passwords on Self Hosted Rooms .
I also like to try out other approaches. Where can I implement such a GUI change. Do you have experience with changes in jitsi’s web-frontend?

Thanks for your reply!

I think we need to modify middleware.js
similar to the feature “requireDisplayName”

if (requireDisplayName
&& !getLocalParticipant(getState)?.name
&& !conference.isHidden()) {

and write another function like openSetPasswordPrompt() in action.js

i will install on your server with your logo icon and your branding at just 60$ .
If any one needed complete installation with customization and server at cheap price ping me.
ping me on skype my skype id is shashank.singh451. you can whatsapp me at +919953026723

You should post on websites like
not here

My module now works. I changed the hook to “muc-room-created”.
Now I have a default password for all rooms that can be changed by the moderator.
Thanks for your input!
If anyone still has suggestions for improvement, let me know :slight_smile:

1 Like

Thanks for your explanations till here. I secured my server, too, so only authorized users can create a conference (

I saw @eknori comment and used the conference section for the call though I am not sure where to put it there and whether the order of the modules plays a role.

Although you write that you use that, too, it crashes here, the authentication fails when “force_room_password” is added to conf.d of prosody.

Could you please describe which changes you made in which configuration file?


In /usr/share/jitsi-meet/prosody-plugins/mod_force_room_password.lua

module:hook("muc-room-created", function(event)
        local pass = "secret";;


I added the module to my conference component,



Thanks, I tried it again and when logging in with one of the authorized accounts (I am the moderator), I get a "GET_SESSION_ID_ERROR) when trying to join the conference.

When I remove the module from the domain cfg.lua in prosody, it does work as before (but without preset room password of course).

Is the order of the modules relevant in the domain cfg.lua for prosody?

you need to do a bit more than just adding the code for the default pwd.

Take a look at Persistent Passwords on Self Hosted Rooms

But check your Prosody version first. If you are still on Prosody 0.10.x, it will not work


Thanks for this hint, then my version is fairly outdated, it’s a 0.9.x. Guess I should do a clean install.
At least I updated prosody from its main website and now the module works. Thanks for pointing me to that.

Later… I tried to upgrade to Prosody 0.11 on two different way, directly and by an OS upgrade of the VM to Buster. In both cases, I end up with problems with lua modules (cjson, luajwtjitsi, …) and following all matching threads here, at the very end the moderation of Jitsi rooms does not work anymore and there seems to be yet no solution.

Thanks, on muc-room-created event, worked fine.