# Is it possible to set default number of replicas in elasticsearch

**URL:** https://discuss.elastic.co/t/is-it-possible-to-set-default-number-of-replicas-in-elasticsearch/281215
**Category:** Elasticsearch
**Created:** [August 12, 2021, 2:21pm UTC](https://discuss.elastic.co/t/is-it-possible-to-set-default-number-of-replicas-in-elasticsearch/281215 "2021-08-12T14:21:47Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![robertknutzen](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@robertknutzen](https://discuss.elastic.co/u/robertknutzen)
#### Post date: [August 12, 2021, 8:44pm UTC](https://discuss.elastic.co/t/is-it-possible-to-set-default-number-of-replicas-in-elasticsearch/281215/2 "2021-08-12T20:44:19Z")

</div>

I haven't run into this problem in quite a while but I also haven't played with a single node in quite a while either.  
I think you should set your discovery type to single node.  
`discovery.type: single-node # configure as single-node cluster`

If you're still having problems you can use an index template and set it to apply to \* (all indices)

you can do that in kibana under management or do this in the console

```auto
PUT _template/no-replicas
{
  "index_patterns": [
    "*"
  ],
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}

```

Then any index you create will default to 1 shard and 0 zero replicas

---

_[View the full topic](https://discuss.elastic.co/t/is-it-possible-to-set-default-number-of-replicas-in-elasticsearch/281215)._
