Naming Your Elixir Node

To make clustering easier, we want our Elixir nodes to be named using our Fly application name and the IPv6 address assigned to the node. Then later, our cluster can form up using DNS settings based on this naming scheme.

Naming the Node

In your Elixir application, run this command:

mix release.init

Then edit the generated rel/ file and add the following lines:

ip=$(grep fly-local-6pn /etc/hosts | cut -f 1)

This names our Elixir node using the Fly application name and the internal IPv6 address. Make sure to deploy after making this change!

fly deploy

What's Next?

Nice! Our application is ready for clustering!

Next up, Clustering!