configuring ejabberd for multi-user chat?
It would be best to see your actual configuration, but MUCs normally have to be enabled as services. The service discovery is indeed the way to discover the MUC service and browse chat rooms, but the client should be able to bookmark them or put them on the roster for use next time.
Anyway, in /etc/ejabberd/ejabberd.cfg
have you enabled mod_muc
? If so, could you paste the settings. On my ejabberd server I use:
{mod_muc, [
%%{host, "conference.@HOST@"},
{access, muc},
{access_create, muc},
{access_persistent, muc},
{access_admin, muc_admin},
{history_size, 50},
{max_users, 500},
{default_room_options,
[
{allow_change_subj, true},
{allow_private_messages, true},
{allow_user_invites, true},
{anonymous, true},
{logging, true},
{members_by_default, true},
{persistent, true},
{public, true},
{public_list, false}
]}
]},
{mod_muc_log, [
{access_log, muc},
{dirtype, plain},
{dirname, room_jid},
{outdir, "/var/www/muclogs"},
{timezone, universal},
{spam_prevention, true}
]},
In your access rules you should also include:
%% Admins of this server are also admins of MUC service:
{access, muc_admin, [{allow, admin}]}.
%% All users are allowed to use MUC service:
{access, muc, [{allow, all}]}.
It works perfectly fine for me this way. Of course you may not want the log files or so, just adjust the respective settings. The ejabberd homepage has a thorough documentation of the available options.
Related videos on Youtube
Admin
Updated on September 17, 2022Comments
-
Admin almost 2 years
I'm trying to configure multi-user chat for ejabberd on Centos 5. I just can't get it working.
I can use Psi to create a group chat room, but don't seem able to join it from another account.
I installed ejabberd from an rpm and have basically just configured the host name.
User-to-user instant messaging works, but not MUC. I've open ports 5222 and 5223 for SSL. Does MUC run over a different port or something?
Also, when I create the chat room on one client, I have to use service discovery in another client, and try specific nodes 1 through to 5. This is only going to be used for a small corporate messaging system, so is there anyway to get ejabberd to only create 1 node?
-
Hunt over 12 yearscan please tell me hat what would the value of room_jid , does it <roomname>@example.com ?
-
0xC0000022L over 12 years@Hunt: to my knowledge it's a placeholder for the JID (Jabber ID) of the MUC, i.e. the room name. Form would be something like
[email protected]
in the above example. -
redV about 10 years@0xC0000022L How can I set
history_size
value tolast login time
of the member by the default?. Your answer is very helpful to me. Thanks -
Richard Żak over 9 yearsCan't get it to work. Pidgin reports "503: Service Unavailable" when trying to deal with rooms, despite my server having the same configuration with the muc module.