# Elastic Agent - Fleet Server Configuration yml

**URL:** <https://discuss.elastic.co/t/elastic-agent-fleet-server-configuration-yml/365360>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [August 22, 2024, 9:44am UTC](https://discuss.elastic.co/t/elastic-agent-fleet-server-configuration-yml/365360 "2024-08-22T09:44:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo3](https://avatars.discourse-cdn.com/v4/letter/l/b9e5f3/32.png) [@Leo3](https://discuss.elastic.co/u/Leo3)\
**Post date:** [August 22, 2024, 9:44am UTC](https://discuss.elastic.co/t/elastic-agent-fleet-server-configuration-yml/365360/1 "2024-08-22T09:44:09Z")

</div>

Hello.

I was able to spin up Elastic, Kibana and Fleet server in docker based on the official [docker-compose.yml](https://github.com/elastic/elasticsearch/blob/8.14/docs/reference/setup/install/docker/docker-compose.yml) and this [repo](https://github.com/michaelhyatt/elastic-stack-fleet-docker-compose). My setup is not intended for production use. It is used purely for my personal experiments and testing.

I wanted to keep Elastic and Kibana configuration in their respective configuration files, i.e., elasticsearch.yml and kibana.yml, instead of passing the configuration as environment variables. With the help of the documentation, I was able to achieve this.

However, I'm somewhat struggling with the Fleet server. The aforementioned repo uses `FLEET_SERVER_ENABLE=true`, and other flags, to enable the server. Just as described in the [documentation](https://www.elastic.co/guide/en/fleet/master/elastic-agent-container.html#_docker_compose).  
I'd like to avoid using these environment variables and configure the server via configuration files, just like Elastic and Kibana.  
I'm looking at the reference [elastic-agent.yml](https://github.com/elastic/elastic-agent/blob/main/elastic-agent.reference.yml), [fleet-server.yml](https://github.com/elastic/fleet-server/blob/main/fleet-server.reference.yml) and Elastic agent's config structure docs but, unfortunately, can't understand if something like that is even possible.  
The question therefore is: can I actually configure elastic-agent.yml / fleet-server.yml, and pass it to the elastic-agent container so that it runs Fleet Server as well?

Thank you.
