Docker Community Forums

Share and learn in the Docker community.

Access API for swarm control (use unix socket or cluster managment port 2377 ?)

(Revollat) #1

When a swarm is started, port 2377 is listening for “cluster management communications” (as the doc says).
So should I still use /var/run/docker.sock for exemple to control the swarm trough the API, let says generate a new worker token ? or should I use port 2377 to connect to the API to control the swarm ?

(Nathan Le Claire) #2

Yes. You should not be connecting to :2377 to do administrative work. It’s an internal-use port for the cluster management features. Administrate using normal docker / Docker API on a manager node.