ES_TMPDIR not setting all temporary files

Hi all,

I am currently trying to set up elasticsearch with a read-only config directory within a docker based on the elasticsearch image. After thoroughly reading the docs, the only related Option I found was the ES_TMPDIR environment variable. I know that the environment variable is accepted elasticsearch since it crashes whenever I set it to something it is not allowed to write to.

Sadly, ES_TMPDIR does not capture the


This means that the container crashes with a

java.nio.file.FileSystemException: /usr/share/elasticsearch/config/elasticsearch.keystore.tmp: Read-only file system

This is true, but is there any way I can configure elasticsearch to use another path for all temporary files? I'd love to put it on /dev/shm.

Thanks in advance, don't hesitate to tell me how I can further provide help or can research on my own. I am just currently pretty lost.

Best Regards

Hi @lquenti and welcome!

This error indicates that Elasticsearch needs to adjust the keystore contents, which means it needs write access to the config directory. It can't use a temporary directory for this. If you do not want Elasticsearch to have write access to its config directory then you must manually make these adjustments to the keystore yourself before running Elasticsearch, using the elasticsearch-keystore command.

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