How to change docker engine name

When used in a swarm, the docker engine uses the default vm name in the cluster.

As the name is “moby”, I get several engine with the same name in my cluster and things are not working properly (host unreachable in overlay network…).
I need to specify a different name for the VM, or at least be able to change the docker engine name.

Is this possible ?

I think that name is the hostname of the machine.
Updating the /etc/hostname and /etc/hosts files to use a name other than moby, should fix it.

Thanks, I was able to change it that way.
Is there a way to make it permanent through machine reboot ?

I’m having the same issue. Is there any way to make persistent changes to the VM? Like not using the hostname “moby” for every instance?