# How do I setup APM all on one machine?

**URL:** <https://discuss.elastic.co/t/how-do-i-setup-apm-all-on-one-machine/324922>\
**Category:** Elastic Observability\
**Created:** [February 7, 2023, 4:47pm UTC](https://discuss.elastic.co/t/how-do-i-setup-apm-all-on-one-machine/324922 "2023-02-07T16:47:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fnbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fnbk/32/116886_2.png) [@fnbk](https://discuss.elastic.co/u/fnbk)\
**Post date:** [February 7, 2023, 4:47pm UTC](https://discuss.elastic.co/t/how-do-i-setup-apm-all-on-one-machine/324922/1 "2023-02-07T16:47:17Z")

</div>

I would like to have my application and the observability tools (logging, tracing, monitoring) installed all on one machine.

But with the current ELK stack (8.6.1) with APM integration does not seem to support this. Is that right?

I have successfully setup Elasticsearch, Kibana and now I am stuck setting up Elastic APM.

The documenation says that I have to setup a "Fleet Server" and then register an "Elastic Agent".

After setting up the "Fleet Server" (Elastic Integration), I now cannot install a regular "Elastic Agent" on the machine.

> Error: already installed at: C:\Program Files\Elastic\Agent

Is it possible to have the complete observability stack installed all on one machine?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 7, 2023, 5:01pm UTC](https://discuss.elastic.co/t/how-do-i-setup-apm-all-on-one-machine/324922/2 "2023-02-07T17:01:06Z")

</div>

Hi @fnbk Welcome to the community.

Yeah, it can be a bit confusing...

So you have the Fleet Server up and Running correct?

You should add the APM integration to the Same Agent Policy that has the Fleet Server integration. It is just another integration with the same agent. Add it to the same policy.

 ![Screen Shot 2023-02-07 at 8.57.09 AM](https://us1.discourse-cdn.com/elastic/original/3X/0/1/01171a6043b43e670745a3dc747ff9795419641e.png)

See the diagrams here:

> **[Components and documentation | APM User Guide \[8.6\] | Elastic](https://www.elastic.co/guide/en/apm/guide/current/apm-components.html)**

---

<div class="post-metadata">

**Author:** ![fnbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fnbk/32/116886_2.png) [@fnbk](https://discuss.elastic.co/u/fnbk)\
**Post date:** [February 8, 2023, 8:36pm UTC](https://discuss.elastic.co/t/how-do-i-setup-apm-all-on-one-machine/324922/3 "2023-02-08T20:36:51Z")

</div>

Thanks @stephenb. I managed to assign the APM integration to the Fleet Server Policy.

But the next problem arises: The agent cannot connect to elasticsearch because it does not use the right url -\> [Failed to connect to backoff(elasticsearch(http://localhost:9200))](https://discuss.elastic.co/t/failed-to-connect-to-backoff-elasticsearch-http-localhost-9200/325065)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 8, 2023, 9:13pm UTC](https://discuss.elastic.co/t/how-do-i-setup-apm-all-on-one-machine/324922/4 "2023-02-08T21:13:51Z")

</div>

Did you set up and use the correct outputs?

 ![Screen Shot 2023-02-08 at 1.10.03 PM](https://us1.discourse-cdn.com/elastic/original/3X/f/1/f1938e611bf5be1cfe9fcbecdd1ca5e2c581e39d.png)

 ![Screen Shot 2023-02-08 at 1.12.31 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/b/eb30f9faefcccb6e0e8e4fcab4b51d764b7b9fd4.png)

---

<div class="post-metadata">

**Author:** ![fnbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fnbk/32/116886_2.png) [@fnbk](https://discuss.elastic.co/u/fnbk)\
**Post date:** [February 8, 2023, 9:26pm UTC](https://discuss.elastic.co/t/how-do-i-setup-apm-all-on-one-machine/324922/5 "2023-02-08T21:26:48Z")

</div>

Yes, that was the missing link 🙂 Now I got it working. Thanks
