I am building my release using relx and I can not use the default -sname [email protected]
.
Instead I would like to do something like -sname someuser@`hostname -i` to define the node's public IP at boot time. Using -sname someuser@
hostname -i`` does not work because hostname -i
is not expanded to a real IP. I tried to use net_kernel:start(xxxxxxx) but it did not work.
Is there any way to get a dynamic -sname
in vm.args using relx ?
Thanks :)
As written in the documentation (and answered in the comments by @Soup d'Campbells), the
-sname
and-name
flags do not need the hostname, and will automatically fill theHost
part of the node's ID with the host'sid (short not fully qualified for -sname, FQDN for -name):If you plan to use a distributed node, and you do have DNS in your domain, use the
-name
flag, as it will also invoke all necessary network servers (just as written above).See for yourself: