.nh
.TH "DOCKER" "1" "Jun 2026" "Docker Community" "Docker User Manuals"

.SH NAME
docker-swarm-init - Initialize a swarm


.SH SYNOPSIS
\fBdocker swarm init [OPTIONS]\fP


.SH DESCRIPTION
Initialize a swarm


.SH OPTIONS
\fB--advertise-addr\fP=""
	Advertised address (format: "[:port]")

.PP
\fB--autolock\fP[=false]
	Enable manager autolocking (requiring an unlock key to start a stopped manager)

.PP
\fB--availability\fP="active"
	Availability of the node ("active", "pause", "drain")

.PP
\fB--cert-expiry\fP=2160h0m0s
	Validity period for node certificates (ns|us|ms|s|m|h)

.PP
\fB--data-path-addr\fP=""
	Address or interface to use for data path traffic (format: "")

.PP
\fB--data-path-port\fP=0
	Port number to use for data path traffic (1024 - 49151). If no value is set or is set to 0, the default port (4789) is used.

.PP
\fB--default-addr-pool\fP=[]
	default address pool in CIDR format

.PP
\fB--default-addr-pool-mask-length\fP=24
	default address pool subnet mask length

.PP
\fB--dispatcher-heartbeat\fP=5s
	Dispatcher heartbeat period (ns|us|ms|s|m|h)

.PP
\fB--external-ca\fP=
	Specifications of one or more certificate signing endpoints

.PP
\fB--force-new-cluster\fP[=false]
	Force create a new cluster from current state

.PP
\fB--listen-addr\fP=0.0.0.0:2377
	Listen address (format: "[:port]")

.PP
\fB--max-snapshots\fP=0
	Number of additional Raft snapshots to retain

.PP
\fB--snapshot-interval\fP=10000
	Number of log entries between Raft snapshots

.PP
\fB--task-history-limit\fP=5
	Task history retention limit


.SH SEE ALSO
\fBdocker-swarm(1)\fP
