Join a node to an existing swarm.

Section: Swarm Basics

Join a swarm

bash
bash
docker swarm join --token <token> 10.0.0.10:2377
Explanation

Run this on a worker or manager being added to the cluster.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Swarm Basics
Initialize swarm
Initialize the current engine as a swarm manager.
OpenIn sheetbashsame section
Initialize swarm with advertise address
Initialize swarm and advertise a specific manager IP.
OpenIn sheetbashsame section
Leave the swarm
Leave the current swarm.
OpenIn sheetbashsame section
Show worker join token
Show or rotate the worker join token.
OpenIn sheetbashsame section
Show manager join token
Show or rotate the manager join token.
OpenIn sheetbashsame section
List swarm nodes
List nodes in the swarm.
OpenIn sheetbashsame section