<p>By Docker Swarm design <strong>it is dencentralized</strong>, so you can <em>promote</em> any node to a manager. Normally, 3 managers are enough, for landscapes with thousands of nodes 5 are enough. </p>

<p><a href="https://docs.docker.com/engine/swarm/admin_guide/" rel="nofollow noreferrer">https://docs.docker.com/engine/swarm/admin_guide/</a></p>

CC BY-SA 3.0
2018-02-21T08:35:05.540Z
2018-02-21T08:35:05.540Z
Ta Mu
<ol>
<li>Every swarm manager is/has worker functionality by default (which can be changed). <br>
However, the number of functioning docker managers has a very important component when it comes to the ratio of the available
number of managers to the active number of managers known as <strong>&quot;the
quorum of managers&quot;</strong>. For more info on <strong>the administration of the
swarm</strong> and the quorum here :
<a href="https://docs.docker.com/engine/swarm/admin_guide/#maintain-the-quorum-of-managers" rel="nofollow noreferrer">https://docs.docker.com/engine/swarm/admin_guide/#maintain-the-quorum-of-managers</a></li>
<li>In your particular case, instead of using actual hardware machines (desktop workstation/laptop/server) you can use virtual machines where the docker can be installed. For their automated management, you can use vagrant. However, it is all about managing the available hardware resource of your entire system. You can also add to the &quot;docker swarm network&quot; any number of other workstations either areas docker hosts or the virtual-machine hosts.</li>
</ol>
<p><strong>Note</strong>: I suggest you consider looking at Podman as a substitute for Docker if your project is in its early stage of development.</p>
<p><strong>P.S.</strong> You might want to specify the idea of your project in order to get better advice than currently can be given.</p>
<p>Good luck and have a nice day.</p>

CC BY-SA 4.0
2022-03-25T08:55:18.797Z
2022-03-25T08:55:18.797Z
Vasil
<p>I want to run services in our office in containers. The problem I have is that we do not have a spare machine available to act as the dedicated host.</p>

<p>So I am considering creating a swarm using everyone's desktop workstations as the workers. But if the manager node (my computer) is shutdown then the entire swarm stops.</p>

<p>I envisioned a swarm where every worker can act as a manager if needed. When the manager dies, another worker assumes the role as manager and the service continues running uninterrupted.</p>

<p><em>Is it possible to create a <strong>decentralized</strong> swarm where any available node can assume the role as a manager as needed?</em></p>

CC BY-SA 3.0
2018-02-22T03:25:22.893Z
While Peter is correct, the idea you have about desktops in a dynamic swarm has lots of concerns and potential issues in its design. Swarm managers need to be an odd number and generally only 3-7 of them in a Swarm. Nodes must have well-connected networks to each other with a list of ports open and no NAT between them. Your idea sounds fun, but is not what Swarm was designed for unless your desktops are all Linux hosts that mostly stay up and managers are on fixed IP's.
Bret Fisher
<docker><docker-swarm>
Is a decentralized Docker swarm possible?
user2818782
# Is a decentralized Docker swarm possible?

(Asked by: username_0 on 2018-02-21)

I want to run services in our office in containers. The problem I have is that we do not have a spare machine available to act as the dedicated host.

So I am considering creating a swarm using everyone's desktop workstations as the workers. But if the manager node (my computer) is shutdown then the entire swarm stops.

I envisioned a swarm where every worker can act as a manager if needed. When the manager dies, another worker assumes the role as manager and the service continues running uninterrupted.

*Is it possible to create a **decentralized** swarm where any available node can assume the role as a manager as needed?*

**Tags:** docker, docker-swarm

> **Comments:**
> **username_1**: While Peter is correct, the idea you have about desktops in a dynamic swarm has lots of concerns and potential issues in its design. Swarm managers need to be an odd number and generally only 3-7 of them in a Swarm. Nodes must have well-connected networks to each other with a list of ports open and no NAT between them. Your idea sounds fun, but is not what Swarm was designed for unless your desktops are all Linux hosts that mostly stay up and managers are on fixed IP's.  

---

## 2 answers

### Answer by username_2 on 2018-02-21. Score: 2 | Accepted answer

By Docker Swarm design **it is dencentralized**, so you can *promote* any node to a manager. Normally, 3 managers are enough, for landscapes with thousands of nodes 5 are enough.

<https://docs.docker.com/engine/swarm/admin_guide/>


---

### Answer by username_3 on 2022-03-25. Score: 0

1. Every swarm manager is/has worker functionality by default (which can be changed).   
   However, the number of functioning docker managers has a very important component when it comes to the ratio of the available
   number of managers to the active number of managers known as **"the
   quorum of managers"**. For more info on **the administration of the
   swarm** and the quorum here :
   <https://docs.docker.com/engine/swarm/admin_guide/#maintain-the-quorum-of-managers>
2. In your particular case, instead of using actual hardware machines (desktop workstation/laptop/server) you can use virtual machines where the docker can be installed. For their automated management, you can use vagrant. However, it is all about managing the available hardware resource of your entire system. You can also add to the "docker swarm network" any number of other workstations either areas docker hosts or the virtual-machine hosts.

**Note**: I suggest you consider looking at Podman as a substitute for Docker if your project is in its early stage of development.

**P.S.** You might want to specify the idea of your project in order to get better advice than currently can be given.

Good luck and have a nice day.


---

