# Encrypt Password In Filebeat Yml

**URL:** https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743
**Category:** Elasticsearch
**Created:** [June 19, 2024, 2:24pm UTC](https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743 "2024-06-19T14:24:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Debasis\_Mallick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debasis_mallick/32/123723_2.png) [@Debasis\_Mallick](https://discuss.elastic.co/u/Debasis_Mallick)
#### Post date: [June 19, 2024, 2:24pm UTC](https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743/1 "2024-06-19T14:24:07Z")

</div>

Hi Team,

Could you please help me how we can encrypt the plain text password which we are mentioning in filebeat.yml file.

Thanks,  
Debasis

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 19, 2024, 2:26pm UTC](https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743/2 "2024-06-19T14:26:13Z")

</div>

> [@Debasis\_Mallick](#):
>
> Could you please help me how we can encrypt the plain text password which we are mentioning in filebeat.yml file.

You can use a keystore as mentioned in the [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/keystore.html).

---

<div class="post-metadata">

### Author: ![Debasis\_Mallick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debasis_mallick/32/123723_2.png) [@Debasis\_Mallick](https://discuss.elastic.co/u/Debasis_Mallick)
#### Post date: [June 27, 2024, 10:20am UTC](https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743/3 "2024-06-27T10:20:40Z")

</div>

@leandrojmp Is this option works if we are using basic licensing ELK stack.

Thanks,  
Debasis

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [June 30, 2024, 3:17pm UTC](https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743/4 "2024-06-30T15:17:24Z")

</div>

@Debasis_Mallick Yes keystore is available in Basic license

---

<div class="post-metadata">

### Author: ![Debasis\_Mallick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debasis_mallick/32/123723_2.png) [@Debasis\_Mallick](https://discuss.elastic.co/u/Debasis_Mallick)
#### Post date: [July 2, 2024, 5:31am UTC](https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743/5 "2024-07-02T05:31:40Z")

</div>

@stephenb I had executed the key store command as below but it did not create any key store in `paths.data` folder which is mentioned in filebeat.yml.

```auto
[root@cb-4 ~]# filebeat keystore create
Created filebeat keystore

```

Below is the snippet from filebeat.yml file.

```auto
type: log
  enabled: true
  paths:
   - /cbdata/elastic/cb4lv1/cb4transv4/*.csv # path to your CSV file
  exclude_lines: ['^\"\"'] # header line
  pipeline: parse_elastic_data_v2
  harvestor_buffer_size: 40960000
  close_eof: true
  close_inactive: 10s

```

Below is the location of `paths.data` folder.

```auto
[root@cb-4 cb4transv4]# pwd
/cbdata/elastic/cb4lv1/cb4transv4
[root@cb-4 cb4transv4]# ls -ltr
total 4
-rw-r--r-- 1 root root 957 Jun 26 17:20 2023-07-09_17118023455.csv
[root@cb-4 cb4transv4]#

```

Please suggest if I am missing anything.

Thanks,  
Debasis

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 2, 2024, 3:37pm UTC](https://discuss.elastic.co/t/encrypt-password-in-filebeat-yml/361743/6 "2024-07-02T15:37:13Z")

</div>

> [@Debasis\_Mallick](#):
>
> `/cbdata/elastic/cb4lv1/cb4transv4`

That is not the `path.data` unless you made changes  
`path.data` is not where your source logs are it is where filebeat keeps state data and other items

See Here:

> **[Directory layout | Filebeat Reference \[8.14\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/directory-layout.html)**

If you installed with package

`/var/lib/filebeat`
