# Fleet Server 8.0 w/Docker Compose

**URL:** <https://discuss.elastic.co/t/fleet-server-8-0-w-docker-compose/298077>\
**Category:** Beats\
**Tags:** docker, elastic-agent\
**Created:** [February 23, 2022, 7:38pm UTC](https://discuss.elastic.co/t/fleet-server-8-0-w-docker-compose/298077 "2022-02-23T19:38:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![variable](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/variable/32/118277_2.png) [@variable](https://discuss.elastic.co/u/variable)\
**Post date:** [February 23, 2022, 7:38pm UTC](https://discuss.elastic.co/t/fleet-server-8-0-w-docker-compose/298077/1 "2022-02-23T19:38:13Z")

</div>

Pre `8.0`, you could set an Elastic Agent container as a Fleet Server with Docker environment variables:

```auto
docker run ...
    -e "KIBANA_FLEET_SETUP=1" \
    -e "FLEET_ENROLL=1" \
    -e "FLEET_SERVER_INSECURE_HTTP=1" \
    -e "FLEET_SERVER_ENABLE=true" \
    -e "FLEET_SERVER_ELASTICSEARCH_HOST=${ELASTICSEARCH_URL}" \
    -e "FLEET_URL=${FLEET_URL}" \
docker.elastic.co/beats/elastic-agent:7.17.0

```

With `8.x`, [it looks like](https://www.elastic.co/guide/en/fleet/current/elastic-agent-container.html#agent-in-container-docker) you need to provide enrollment and service tokens

```auto
...
environment:
      - FLEET_ENROLLMENT_TOKEN={enrollment-token}
      - FLEET_ENROLL=1
      - FLEET_URL={fleet-server-url}
      - FLEET_SERVER_ENABLE=true
      - FLEET_SERVER_ELASTICSEARCH_HOST={elasticsearch-host}
      - FLEET_SERVER_SERVICE_TOKEN={service-token}
...

```

**Question:** Is there a way to use Docker Compose to bring up an entire Elasticsearch, Kibana, and Fleet stack or do you need to go into Kibana and manually generate and collect these tokens?

---

<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 23, 2022, 9:38pm UTC](https://discuss.elastic.co/t/fleet-server-8-0-w-docker-compose/298077/2 "2022-03-23T21:38:22Z")

</div>

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