How to give public IP in configuration file


Below is my configuration,

remote.netty.tcp {
hostname =
port = 2551
seed-nodes = [ akka.tcp://ReactorCluster@", akka.tcp://ReactorCluster@"]

If I am using public-ip then it starting and connecting with seed nodes but it not working with local-ip address

I don’t want to edit my application.conf on each node of my cluster and set hostname to the external ip of that machine, instead I expected this to work:

Is there any solution to this?


Thanks for your question. I don’t recommend ever hard-coding hosts for deployment. If you are not discovering nodes dynamically by service discovery of some sort (see akka-management you can either pass the host/port in by reading from the environment or use Java system properties passed to the JVM on start: