---
source: https://iinventedlight.com/library/notes/docker-swarm-manage-nodes.md
title: "Docker Swarm nodes: inspect, drain, label, promote, and demote"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache License 2.0 (Docker, Inc.); Apache License 2.0 (Docker, Inc.); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Manage nodes in a swarm; Docker, Inc., Manage nodes in a swarm (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-26
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-26
as_of: 2026-11-26
confidence: medium
untested: "Not reproduced (2026-11-26). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker-swarm-manage-nodes"
tags: [docker, swarm, nodes, drain, promote]
client: Librarian
sources:
  - id: S1
    title: "Manage nodes in a swarm"
    publisher: Docker, Inc.
    url: https://docs.docker.com/engine/swarm/manage-nodes/
    accessed: 2026-11-26
    license: "Apache License 2.0"
  - id: S2
    title: "Manage nodes in a swarm (source)"
    publisher: Docker, Inc.
    url: https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/swarm/manage-nodes.md
    accessed: 2026-11-26
    license: "Apache License 2.0"
---
# Docker Swarm nodes: inspect, drain, label, promote, and demote
**Answer:** On a manager, you can inspect swarm nodes, change availability, add labels, and promote or demote roles.

## Availability and manager status

Under Pause, existing tasks remain running, and the scheduler does not assign new tasks to the node.

Drain means the scheduler does not assign new tasks, and it shuts down existing tasks and schedules them on an available node.

Leader marks the primary manager that makes orchestration decisions.

Reachable means the node is a manager node participating in the Raft consensus quorum.

## Labels, promote, and demote

Node labels can appear in service constraints that limit where tasks land.

docker node update --label-add sets label metadata; the flag takes a key or a key=value pair.

These node labels are not the same as dockerd engine labels.

You can promote a worker to manager or demote a manager to worker, but you must keep a manager quorum.

## See also

- [docker-swarm](https://iinventedlight.com/library/notes/docker-swarm/)
- [docker-swarm-admin](https://iinventedlight.com/library/notes/docker-swarm-admin/)
- [docker-swarm-networking](https://iinventedlight.com/library/notes/docker-swarm-networking/)

## Claims

- id: C1
  claim: A paused node keeps running tasks but takes no new ones.
  source: S1
  evidence: "Pause a node so it can't receive new tasks."

- id: C2
  claim: Node labels can be used in service constraints.
  source: S1
  evidence: "You can also use node labels in service constraints."

- id: C3
  claim: A leader is the primary manager for orchestration decisions.
  source: S2
  evidence: "the node is the primary manager node"

- id: C4
  claim: A manager quorum must be maintained.
  source: S2
  evidence: "you must always maintain a quorum of manager nodes"

## Sources

- [S1] Manage nodes in a swarm. Docker, Inc.. https://docs.docker.com/engine/swarm/manage-nodes/ . License: Apache License 2.0. Accessed 2026-11-26.

- [S2] Manage nodes in a swarm (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/swarm/manage-nodes.md . License: Apache License 2.0. Accessed 2026-11-26.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Manage nodes in a swarm; Docker, Inc., Manage nodes in a swarm (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
