# Node roles -\> for node coordinator

**URL:** <https://discuss.elastic.co/t/node-roles-for-node-coordinator/298587>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Tags:** docker\
**Created:** [March 2, 2022, 7:54am UTC](https://discuss.elastic.co/t/node-roles-for-node-coordinator/298587 "2022-03-02T07:54:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![INS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ins/32/92827_2.png) [@INS](https://discuss.elastic.co/u/INS)\
**Post date:** [March 2, 2022, 7:54am UTC](https://discuss.elastic.co/t/node-roles-for-node-coordinator/298587/1 "2022-03-02T07:54:35Z")

</div>

Hi I need to be sure how should I define in docker compose node roles as I need to create one coordinator node per host.  
According to guide from elastic page I should leave empty space for ` node.roles=` for coordinating node? [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#coordinating-only-node](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#coordinating-only-node)

for example

```auto
 es04:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0
    container_name: es04
    environment:
      - node.name=es04
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es02,es03
      - cluster.initial_master_nodes=es01,es02,es03,es04
      - node.roles=master,data_frozen

```

```auto
es02:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0
    container_name: es02
    environment:
      - node.name=es02
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=es01,es03,es04
      - cluster.initial_master_nodes=es01,es02,es03,es04
      - node.roles=
      - path.repo=/usr/share/elasticsearch/snapshots
      #- bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    mem_limit: 1Gb
    volumes:
      - warm_data:/usr/share/elasticsearch/data
      - snapshots:/usr/share/elasticsearch/snapshots
    networks:
      - elastic

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 30, 2022, 7:55am UTC](https://discuss.elastic.co/t/node-roles-for-node-coordinator/298587/2 "2022-03-30T07:55:06Z")

</div>

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