---
title: "Erlang - How to join Ejabberd cluster ??"  
description: "Erlang - How to join Ejabberd cluster ??"  
author: "Tarun Kumar"  
published: 2016-04-28  
updated: 2016-04-30  
canonical: https://www.mindstick.com/forum/34117/erlang-how-to-join-ejabberd-cluster  
category: "erlang"  
tags: ["erlang"]  
reading_time: 1 minute  

---

# Erlang - How to join Ejabberd cluster ??

I have two [nodes](https://www.mindstick.com/news/2242/on-thursday-google-cloud-announced-the-debut-of-its-own-node-hosting-service-for-web3-developers) like ejabberd_node1 and ejabberd_node2.[Please tell me](https://www.mindstick.com/forum/33900/please-tell-me-what-are-the-technique-to-content-optimization) how can I [join](https://www.mindstick.com/articles/1487/join-sleep-and-interrupt-methods-in-c-sharp-threading) Ejabberd [clusters](https://www.mindstick.com/interview/1930/define-clusters) between both nodes.\
Thanks!

## Replies

### Reply by Sunil Singh

## configration setp for ejabberd clustering-

1-ejabberd have enabled these four modules-

\
router,

\
local router,

\
session manager,

\
s2s manager.

\
2- All ejabberd node must have the same magic cookie (so set it).

\
3-ejabberdctl.cfg change the following line-

#INET_DIST_INTERFACE=127.0.0.1 to

\
INET_DIST_INTERFACE=104.10.120.122 (whatever your host public ip)

\

4- enter the following command on erlang console-

net_adm:ping('ejabberd@ejabberd1').

if it will return pong now you can do cluster between ejabberd nodes.

5- run the following command to make cluster-

ejabberdctl join_cluster 'ejabberd@ejabberd1'

check this link for detail configuration- https://docs.ejabberd.im/admin/guide/clustering/\

\


---

Original Source: https://www.mindstick.com/forum/34117/erlang-how-to-join-ejabberd-cluster

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
