# .../config/certs/ca/ca.crt : file does not exist

**URL:** https://discuss.elastic.co/t/config-certs-ca-ca-crt-file-does-not-exist/389678
**Category:** Elastic Security
**Created:** [August 15, 2026, 9:55pm UTC](https://discuss.elastic.co/t/config-certs-ca-ca-crt-file-does-not-exist/389678 "2026-08-15T21:55:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rik/32/147516_2.png) [@rik](https://discuss.elastic.co/u/rik)
#### Post date: [August 15, 2026, 9:55pm UTC](https://discuss.elastic.co/t/config-certs-ca-ca-crt-file-does-not-exist/389678/1 "2026-08-15T21:55:07Z")

</div>

I think I've followed the instructions here [Install Elasticsearch with Docker | Elastic Docs](https://www.elastic.co/docs/deploy-manage/deploy/self-managed/install-elasticsearch-with-docker) and produced a docker-compose.yml file (attached below) that's right. But when I try `docker compose up` i get these errors:

`{"@timestamp":"2026-08-14T23:29:56.334Z","log.level":"ERROR","message":"fatal exception while booting Elasticsearch", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.bootstrap.Elasticsearch","elasticsearch.node.name":"es01","elasticsearch.cluster.name":"docker-cluster","error.type":"org.elasticsearch.ElasticsearchSecurityException","error.message":"failed to load SSL configuration [xpack.security.http.ssl] - cannot read configured PEM certificate_authorities [/usr/share/elasticsearch/config/certs/ca/ca.crt] because the file does not exist","error.stack_trace":"org.elasticsearch.ElasticsearchSecurityException: failed to load SSL configuration [xpack.security.http.ssl] - cannot read configured PEM certificate_authorities [/usr/share/elasticsearch/config/certs/ca/ca.crt] because the file does not exist`

```auto
at org.elasticsearch.xcore@9.3.8/org.elasticsearch.xpack.core.ssl.SSLService.lambda$loadSslConfigurations$15(SSLService.java:591)
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
at org.elasticsearch.xcore@9.3.8/org.elasticsearch.xpack.core.ssl.SSLService.loadSslConfigurations(SSLService.java:583)
at org.elasticsearch.xcore@9.3.8/org.elasticsearch.xpack.core.ssl.SSLService.<init>(SSLService.java:205)
at org.elasticsearch.xcore@9.3.8/org.elasticsearch.xpack.core.XPackPlugin.createSSLService(XPackPlugin.java:487)
at org.elasticsearch.xcore@9.3.8/org.elasticsearch.xpack.core.XPackPlugin.createComponents(XPackPlugin.java:312)
at org.elasticsearch.server@9.3.8/org.elasticsearch.node.NodeConstruction.lambda$construct$21(NodeConstruction.java:1059)
at org.elasticsearch.server@9.3.8/org.elasticsearch.plugins.PluginsService.lambda$flatMap$0(PluginsService.java:185)
at java.base/java.util.stream.ReferencePipeline$7$1FlatMap.accept(ReferencePipeline.java:288)

```

Any ideas what's up?

docker-compose.yml:

```auto
name: ocd4oak

volumes:
certs:
driver: local
node_modules:
driver: local
postgres_data:
driver: local
es_data:
driver: local
kibana_data:
driver: local

networks:
default:
name: oaknet
external: false

services:
setup:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}
volumes:
- certs:/usr/share/elasticsearch/config/certs
user: "0"
command: >
bash -c '
if [x${ES_PASSWORD} == x]; then
echo "Set the ES_PASSWORD environment variable in the .env file";
exit 1;
elif [x${KIBANA_PASSWORD} == x]; then
echo "Set the KIBANA_PASSWORD environment variable in the .env file";
exit 1;
fi;
if [! -f config/certs/ca.zip]; then
echo "Creating CA";
bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip;
unzip config/certs/ca.zip -d config/certs;
fi;
if [! -f config/certs/certs.zip]; then
echo "Creating certs";
echo -ne 
"instances:\n"
" - name: es01\n"
" dns:\n"
" - es01\n"
" - localhost\n"
" ip:\n"
" - 127.0.0.1\n"
" - name: kibana\n"
" dns:\n"
" - kibana\n"
" - localhost\n"
" ip:\n"
" - 127.0.0.1\n"
> config/certs/instances.yml;
bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key;
unzip config/certs/certs.zip -d config/certs;
fi;
echo "Setting file permissions"
chown -R root:root config/certs;
find . -type d -exec chmod 750 {} ;;
find . -type f -exec chmod 640 {} ;;
echo "Waiting for Elasticsearch availability";
until curl -s --cacert config/certs/ca/ca.crt https://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done;
echo "Setting kibana_system password";
until curl -s -X POST --cacert config/certs/ca/ca.crt -u "elastic:${ES_PASSWORD}" -H "Content-Type: application/json" https://es01:9200/_security/user/kibana_system/_password -d "{"password":"${KIBANA_PASSWORD}"}" | grep -q "^{}"; do sleep 10; done;
echo "All done!";
'
healthcheck:
test: ["CMD-SHELL", "[-f config/certs/es01/es01.crt]"]
interval: 1s
timeout: 5s
retries: 120

es01:
depends_on:
setup:
condition: service_healthy
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}
container_name: elasticsearch
ports:
- ${ES_PORT}:9200
environment:
- node.name=es01
- cluster.name=${ES_CLUSTER_NAME}
- discovery.type=single-node
- ELASTIC_PASSWORD=${ES_PASSWORD}
- bootstrap.memory_lock=true
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=true
- xpack.security.http.ssl.key=certs/es01/es01.key
- xpack.security.http.ssl.certificate=certs/es01/es01.crt
- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt
- xpack.security.transport.ssl.enabled=true
- xpack.security.transport.ssl.key=certs/es01/es01.key
- xpack.security.transport.ssl.certificate=certs/es01/es01.crt
- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
- xpack.security.transport.ssl.verification_mode=certificate
- xpack.license.self_generated.type=${ES_LICENSE}
mem_limit: ${ES_MEM_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
"CMD-SHELL",
"curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",
]
interval: 10s
timeout: 10s
retries: 120

kibana:
depends_on:
es01:
condition: service_healthy
image: docker.elastic.co/kibana/kibana:${ES_VERSION}
container_name: ${KIBANA_CONTAINER_NAME}
volumes:
- certs:/usr/share/kibana/config/certs
- kibana_data:/usr/share/kibana/data
ports:
- 127.0.0.1:${KIBANA_PORT}:5601
extra_hosts:
- host.docker.internal:host-gateway
- model-runner.docker.internal:host-gateway
environment:
- SERVER_NAME=kibana
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}
- ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=config/certs/ca/ca.crt
# - XPACK_SECURITY_ENCRYPTIONKEY=${ENCRYPTION_KEY}
# - XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY=${ENCRYPTION_KEY}
# - XPACK_REPORTING_ENCRYPTIONKEY=${ENCRYPTION_KEY}
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -I http://kibana:5601 | grep -q 'HTTP/1.1 302 Found'",
]
interval: 10s
timeout: 10s
retries: 30

```

---

<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: [August 15, 2026, 11:35pm UTC](https://discuss.elastic.co/t/config-certs-ca-ca-crt-file-does-not-exist/389678/2 "2026-08-15T23:35:00Z")

</div>

From your docker compose you are not mounting the `certs` volume in the `es01` service.

---

<div class="post-metadata">

### Author: ![rik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rik/32/147516_2.png) [@rik](https://discuss.elastic.co/u/rik)
#### Post date: [August 16, 2026, 5:37pm UTC](https://discuss.elastic.co/t/config-certs-ca-ca-crt-file-does-not-exist/389678/3 "2026-08-16T17:37:39Z")

</div>

Wow, exactly right @leandrojmp ! thanks so much for your spotting my volumes omission!
