Leaving --listen-addron it, by default 0.0.0.0:2377 tells it to listen on all interfaces for requests. You can use this to restrict Swarm to only listen on certain interfaces if you have something like a management network that is separate from the public network on your nodes.
--advertise-addr is the address given to other nodes in Swarm to establish connections and should be an address that everyone can decide and reach.
Note that early RC 1.12 did not have --advertise-addr, so you can find some instructions indicating --listen-addr. I would ignore them and use them --advertise-addronly if you have a specific use case.
source
share