# Enable x-pack on a Docker-Compose elasticsearch cluster

**URL:** https://discuss.elastic.co/t/enable-x-pack-on-a-docker-compose-elasticsearch-cluster/214102
**Category:** Elasticsearch
**Tags:** docker
**Created:** [January 7, 2020, 4:41pm UTC](https://discuss.elastic.co/t/enable-x-pack-on-a-docker-compose-elasticsearch-cluster/214102 "2020-01-07T16:41:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![decal](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@decal](https://discuss.elastic.co/u/decal)
#### Post date: [January 7, 2020, 4:41pm UTC](https://discuss.elastic.co/t/enable-x-pack-on-a-docker-compose-elasticsearch-cluster/214102/1 "2020-01-07T16:41:41Z")

</div>

Hi, I have a 3 node cluster in docker, and I want to use xpack security, this is my actual environment config inside the docker compose, but im not able to enable xpack security

```
environment:
  - node.name=es01
  - cluster.name=cluster
  - discovery.seed_hosts=es02,es03
  - cluster.initial_master_nodes=es01,es02,es03
  - bootstrap.memory_lock=true
    #- xpack.security.audit.enabled=true
  - xpack.security.enabled=true

```

what other lines I mus ad to enable x.pack ?

---

<div class="post-metadata">

### Author: ![MiTschMR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mitschmr/32/48254_2.png) [@MiTschMR](https://discuss.elastic.co/u/MiTschMR)
#### Post date: [January 7, 2020, 4:50pm UTC](https://discuss.elastic.co/t/enable-x-pack-on-a-docker-compose-elasticsearch-cluster/214102/2 "2020-01-07T16:50:13Z")

</div>

Hi @decal

To use the xpack security features, you must secure the connection in your cluster on the transport layer with TLS/SSL. You can find an example of how to use it on the following page:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls-docker.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls-docker.html)  
Note that this guide also secures the HTTP layer.

Hope this helps.

---

<div class="post-metadata">

### Author: ![decal](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@decal](https://discuss.elastic.co/u/decal)
#### Post date: [January 7, 2020, 5:02pm UTC](https://discuss.elastic.co/t/enable-x-pack-on-a-docker-compose-elasticsearch-cluster/214102/3 "2020-01-07T17:02:19Z")

</div>

Tanks MiT, but the first thing that I read in your link is this "Unless you are using a trial license" and Im gonna use the trial license for 30 days, thats mean that I dont need that configuration?

---

<div class="post-metadata">

### Author: ![MiTschMR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mitschmr/32/48254_2.png) [@MiTschMR](https://discuss.elastic.co/u/MiTschMR)
#### Post date: [January 7, 2020, 5:42pm UTC](https://discuss.elastic.co/t/enable-x-pack-on-a-docker-compose-elasticsearch-cluster/214102/4 "2020-01-07T17:42:30Z")

</div>

Looks like that is true (I haven't known that). But you need to be aware of the following:

> Clusters that do not have encryption enabled send all data in plain text including passwords. If the Elasticsearch security features are enabled, unless you have a trial license, you must configure SSL/TLS for internode-communication.

If you intend to use the basic version of the elastic stack in the future, you have to secure your communications for the transport layer network. Well, you now have 30 days to try it 😅

---

<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: [February 4, 2020, 5:42pm UTC](https://discuss.elastic.co/t/enable-x-pack-on-a-docker-compose-elasticsearch-cluster/214102/5 "2020-02-04T17:42:49Z")

</div>

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