How to set password for built-in user kibana_system through environment variable for docker container

I have no problem set password for elastic user through ELASTIC_PASSWORD. I hope I can also set password for built-in users like kibana_system. I tried KIBANA_SYSTEM_PASSWORD but it doesn't work. I have not found useful info online yet.

Hi @ACoder ,

Check here please: Set up minimal security for Elasticsearch | Elasticsearch Guide [8.14] | Elastic

Thank you. It only teaches you how to set it up through a utility command. Will environment variables for all built-in users be supported in the future? especially KIBANA_SYSTEM_PASSWORD since it's used pretty often in container environment.

I don't know about future updates, but what if you create a script that sets the password for the kibana_system user using the Elasticsearch API and the environment variable KIBANA_SYSTEM_PASSWORD, and then update the docker-compose.yml file to include the custom initialization script?