# Unable to store keystore password for elastic protocol in apm server configuraton

**URL:** <https://discuss.elastic.co/t/unable-to-store-keystore-password-for-elastic-protocol-in-apm-server-configuraton/263899>\
**Category:** APM\
**Tags:** elastic-stack-security, server\
**Created:** [February 10, 2021, 4:25pm UTC](https://discuss.elastic.co/t/unable-to-store-keystore-password-for-elastic-protocol-in-apm-server-configuraton/263899 "2021-02-10T16:25:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lnitin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lnitin/32/63896_2.png) [@lnitin](https://discuss.elastic.co/u/lnitin)\
**Post date:** [February 10, 2021, 4:25pm UTC](https://discuss.elastic.co/t/unable-to-store-keystore-password-for-elastic-protocol-in-apm-server-configuraton/263899/1 "2021-02-10T16:25:13Z")

</div>

Hi,  
I'm trying to store basic auth credentials in keystore, but i'm getting below error

# Optional protocol and basic auth credentials.

protocol: "https"  
username: "elastic"  
password: "abcdefg"

root@test1:/usr/share/apm-server/bin# ./apm-server keystore add  
error initializing beat: error loading config file: stat apm-server.yml: no such file or directory

Its giving same error for list, add, create, rm

Can someone please help.?

---

<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:** [February 11, 2021, 12:55am UTC](https://discuss.elastic.co/t/unable-to-store-keystore-password-for-elastic-protocol-in-apm-server-configuraton/263899/2 "2021-02-11T00:55:47Z")

</div>

can you try without the `./` just `apm-server keystore add` if you installed via package it should find 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:** [March 11, 2021, 12:56am UTC](https://discuss.elastic.co/t/unable-to-store-keystore-password-for-elastic-protocol-in-apm-server-configuraton/263899/3 "2021-03-11T00:56:12Z")

</div>

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