To test what happens when you add a second node, you can start a new node in exactly the same way as you started the first one (see [running-elasticsearch]), and from the same directory. Multiple nodes can share the same directory.
When you run a second node on the same machine, it automatically discovers
and joins the cluster as long as it has the same cluster.name
as the first node.
However, for nodes running on different machines
to join the same cluster, you need to configure a list of unicast hosts the nodes can contact
to join the cluster. For more information, see Prefer Unicast over Multicast.