# How can I configure number\_of\_replicas at 0 by default when ElasticSearch Docker container start?

**URL:** https://discuss.elastic.co/t/how-can-i-configure-number-of-replicas-at-0-by-default-when-elasticsearch-docker-container-start/77233
**Category:** Elasticsearch
**Created:** [March 2, 2017, 11:24pm UTC](https://discuss.elastic.co/t/how-can-i-configure-number-of-replicas-at-0-by-default-when-elasticsearch-docker-container-start/77233 "2017-03-02T23:24:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![klein\_stephane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/klein_stephane/32/11364_2.png) [@klein\_stephane](https://discuss.elastic.co/u/klein_stephane)
#### Post date: [March 2, 2017, 11:24pm UTC](https://discuss.elastic.co/t/how-can-i-configure-number-of-replicas-at-0-by-default-when-elasticsearch-docker-container-start/77233/1 "2017-03-02T23:24:24Z")

</div>

HI,

I would like create docker-compose to install and configure ES for only 1 node.

Question: how can I configure ES to set `number_of_replicas` at 0 by default.

I see that: [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html) but how can I configure template at first ES container startup?

Best regards,  
Stéphane

---

<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, 2017, 11:24pm UTC](https://discuss.elastic.co/t/how-can-i-configure-number-of-replicas-at-0-by-default-when-elasticsearch-docker-container-start/77233/2 "2017-03-30T23:24:27Z")

</div>

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