How to limit no of participant for meeting

When I check the code I saw
case JitsiConferenceErrors.CONFERENCE_MAX_USERS:
connection.disconnect();
APP.UI.notifyMaxUsersLimitReached();
break;
But I cant find any place to add max user limit
I have change muc_max_occupants in /doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example as below

muc_max_occupants=2
muc_access_whitelist = { “focus@auth.meeting.myurl.mytld” }

Component “conference.jitmeet.example.com” “muc”
storage = “memory”
modules_enabled = {
“muc_meeting_id”;
“muc_domain_mapper”;
“muc_max_occupants”;
– “token_verification”;
}
But still can add more than 2 participants.

Enable this https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_muc_max_occupants.lua

@Dushyantha_Kalansoor, there’s a good reply on this, here:

[quote="[Solved] Where to add the “muc_max_occupants” to limit participants in a meeting? Install & Config, post:2, topic:73968"]
/etc/prosody/conf.avail/meet.example.com.cfg.lua
[/quote]

@corby Thank you very much
But I can’t find /etc/prosody/conf.avail/meet.example.com.cfg.lua in my source

Hi @Dushyantha_Kalansoor.

Go into the directory /etc/prosody/conf.avail/

You should see a file in there that matches your host name for your Jitsi setup.

@mangopudding @corby @damencho When we install using docker we can’t find this file path. Is that any way to enable max value from .env file

@Dushyantha_Kalansoor
In Docker setups (docker-jitsi-meet) almost all config files are templated at image startup from /defaults directory in the image and outputed to /config. Try looking there, copy file from /defaults, make changes to it and then mount the modified version to the docker on startup.

I am also having the same problem when using docker.
How can I set a limit for the number of people in a meeting with docker?

@damencho Thank you for your response
I am using https://github.com/jitsi/jitsi-meet source .
I have change mod_muc_max_occupants.lua like as below

module:hook("muc-occupant-pre-join", check_for_max_occupants, 20);

I added 20 because I want to limit no of participants to 20
But not apply this limit
Is this the correct way or any other place I want to change

@Dushyantha_Kalansoor

No. That 20 is the priority and has nothing to do with the max number of occupaants.

See [Solved] Where to add the "muc_max_occupants" to limit participants in a meeting?

Also see @nosmo’s comment above

[quote="[Solved] Where to add the “muc_max_occupants” to limit participants in a meeting? Install & Config, post:2, topic:73968"]
/etc/prosody/conf.avail/meet.example.com.cfg.lua
[/quote]

Thank you @corby
Problem is there is no souse like /etc/prosody/conf.avail/meet.example.com.cfg.lua
I am using https://github.com/jitsi/jitsi-meet source
Can you help me to find correct source?

Hi! @Dushyantha_Kalansoor
After a while of research I figured out how to set a limit on the number of people involved in a docker meeting.

In the download docker package edit the file docker-jitsi-meet / prosody / rootfs / defaults / conf.d / jitsi-meet.cfg.lua into the following:

Component “{{ .Env.XMPP_MUC_DOMAIN }}” “muc”
storage = “memory”
muc_max_occupants = 2
modules_enabled = {
“muc_meeting_id”;
{{ if .Env.XMPP_MUC_MODULES }}
“{{ join “”;\n”" (splitList “,” .Env.XMPP_MUC_MODULES) }}";
{{ end }}
{{ if and $ENABLE_AUTH (eq $AUTH_TYPE “jwt”) }}
“{{ $JWT_TOKEN_AUTH_MODULE }}”;
{{ end }}
“muc_domain_mapper”;
“muc_max_occupants”;
– “token_verification”;
}
muc_access_whitelist = { “focus@auth.meet.jitsi” }
admins = { “focus@auth.meet.jitsi” }
muc_room_cache_size = 1000
muc_room_locking = false
muc_room_default_public_jids = true

Then rebuild your docker.

@Dushyantha_Kalansoor,

If this works for you, I can update the [how to] with @datdq’s docker instructions. Let us know. Sounds like it worked for @datdq. Note: there is a limit of 2 participants in this example.

@corby Not working.
After adding this can’t connect to the conference. Automatically reconnecting again an again