# What's the advantage and disadvantage of running traefik with \`swarmMode = true\`?

**URL:** <https://community.traefik.io/t/whats-the-advantage-and-disadvantage-of-running-traefik-with-swarmmode-true/10862>\
**Category:** Traefik v2\
**Tags:** docker-swarm\
**Created:** [June 7, 2021, 11:16am UTC](https://community.traefik.io/t/whats-the-advantage-and-disadvantage-of-running-traefik-with-swarmmode-true/10862 "2021-06-07T11:16:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregsifr](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/gregsifr/32/3859_2.png) [@gregsifr](https://community.traefik.io/u/gregsifr)\
**Post date:** [June 7, 2021, 11:16am UTC](https://community.traefik.io/t/whats-the-advantage-and-disadvantage-of-running-traefik-with-swarmmode-true/10862/1 "2021-06-07T11:16:21Z")

</div>

The documentation does not make it clear when or why `swarmMode = true` should be used (when deploying using `docker stack deploy`). This is confusing as Traefik can still be deployed using docker stack deploy when `swarmMode = false`.

Since there is additional setup required when swarm mode is set,such as having to specify the ports and placing labels under the service (`deploy`) and not container, what are the advantages or disadvantages of using `swarmMode = true`?

---

<div class="post-metadata">

**Author:** ![daniel.tomcej](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/daniel.tomcej/32/262_2.png) [@daniel.tomcej](https://community.traefik.io/u/daniel.tomcej)\
**Post date:** [June 7, 2021, 9:51pm UTC](https://community.traefik.io/t/whats-the-advantage-and-disadvantage-of-running-traefik-with-swarmmode-true/10862/2 "2021-06-07T21:51:26Z")

</div>

Hello @gregsifr,

Docker swarm mode is used to configure a cluster of docker hosts, and to allow services to be scheduled on the swarm: ([Swarm mode overview | Docker Documentation](https://docs.docker.com/engine/swarm/))

If you are not using swarm mode, then you are only able to route to containers that exist on the docker host Traefik is running on.

If you are running swarm only on a single node, you may choose to use either method.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [June 13, 2021, 4:31am UTC](https://community.traefik.io/t/whats-the-advantage-and-disadvantage-of-running-traefik-with-swarmmode-true/10862/3 "2021-06-13T04:31:29Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
