Installing buddycloud on ejabberd

From buddycloud wiki

Jump to: navigation, search

The xmpp section sets up a component connection. For ejabberd the listener configuration should look like this:

{5347, ejabberd_service, [{hosts, ["buddycloud.example.com"], [{password, "secret"}]}]}

In addition, you will need to tell mod_disco to advertise your component:

% Used modules:
{modules,
 [
  ...
  {mod_disco,      [{extra_domains, ["buddycloud.example.com"]}]},
  ...
}

To enable anonymous users to browse channels, you should configure a new virtual host:

{hosts, ["example.com", "anon.example.com"]}.

And configure it to accept SASL Anonymous authentication:

{host_config, "anon.example.com", [{auth_method, anonymous},
                                     {allow_multiple_connections, false},
                                     {anonymous_protocol, sasl_anon}]}.

Add a topic domain

Pick a domain name (eg. topics.example.com) and add the _xmpp-server._tcp SRV or the plain A record to your DNS zone.

Next, add the domain to your hosts like:

{hosts, ["example.com", "anon.example.com", "topics.example.com"]}.

Configure the virtual host to disallow authentication and to make the buddycloud-server component show up in discovery:

{host_config, "topics.example.com", [
    {auth_method, internal},
    {{add, modules}, [
        {mod_register, [{ip_access, [{deny, "0.0.0.0/0"}]}]},
        {mod_disco, [{extra_domains, ["buddycloud.example.com"]}]}
    ]}
]}.