bootstrap docker swarm¶
i like using docker swarm for home labs
assumes you installed docker like this
Initialize Swarm on first docker node (management node)¶
it will produced output something like this make sure you copy and keep this command as you will run it on all your other nodes (the IP address should match the IP of this management node, if it doesn't you need to troubleshoot networking).Initialize worker nodes¶
On each worker node run the command from the last step
the IP is the IP of the management node and doesn't need to be changed as you run this on each node.Update as of 2026.09.24: all three of my nodes are managers now. the keepalived checks run docker node ls, and a worker refuses it. to promote the other two, run this on docker01:
thats it you should now have a fully functioning swarm
This page started as a gist: the original, with its comments