# Install Elastic APM Agent on Windows Server

**URL:** <https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914>\
**Category:** APM\
**Tags:** java\
**Created:** [July 18, 2022, 2:12pm UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914 "2022-07-18T14:12:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aji.shinde7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aji.shinde7/32/115498_2.png) [@aji.shinde7](https://discuss.elastic.co/u/aji.shinde7)\
**Post date:** [July 18, 2022, 2:12pm UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/1 "2022-07-18T14:12:07Z")

</div>

Hello Experts,

I am a beginner in Elasticsearch.

I am looking for Installing Elastic APM Agent on windows servers.

Followed Documentation but confused.

Can anyone share any article / video where process is bit clear.

Reply with main / broad steps would work too.

Thank you 🙏

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [July 18, 2022, 2:31pm UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/2 "2022-07-18T14:31:08Z")

</div>

Hi @aji.shinde7 ,  
please take a look at the [involved components](https://www.elastic.co/guide/en/apm/guide/current/apm-components.html) when setting up APM. Are you trying to install the Elastic Agent with the APM Server Integration on a windows server or are you stuck on how to add an APM agent (e.g. Java) to your service?

In case you are trying to install the Elastic Agent, please follow the [fleet managed Elastic Agent guidelines](https://www.elastic.co/guide/en/fleet/current/install-fleet-managed-elastic-agent.html) and the guide on how to [add an APM Server integration](https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html) to the Elastic Agent.  
For adding an APM agent to your service you can follow the documentation on the [specific apm agent](https://www.elastic.co/guide/en/apm/guide/current/apm-components.html#_apm_agents).

If you run into more concrete issues, feel free to share them.

---

<div class="post-metadata">

**Author:** ![aji.shinde7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aji.shinde7/32/115498_2.png) [@aji.shinde7](https://discuss.elastic.co/u/aji.shinde7)\
**Post date:** [July 18, 2022, 4:19pm UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/3 "2022-07-18T16:19:26Z")

</div>

Thank you for your reply.

I am stuck on how to add an APM agent (e.g. Java) to service on Windows.

I was able to add an APM agent (e.g. Java) to service on linux.

I followed below steps:

1. Added APM Agent code in setenv.sh file . Followed below guideline  

2. Import Elastic Certificate into cacert file. Followed below guideline.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/2/820fc044475b8d9159ca262b6ac5a47bcf739779.png)

1. Restart Service and Data started flowing in Elasticsearch cloud APM-\* Index.

I was trying to locate **setenv.bat.** in Windows but could not find so thought of asking help in discussion forum.

I will get back with some more information. Please see if you can suggest me something with this information, Please

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [July 19, 2022, 4:38pm UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/4 "2022-07-19T16:38:00Z")

</div>

That's not yet working on Windows, there's a bug (related to the Java version that the Admin user has I think). You'll need to [manually install the Java agent](https://www.elastic.co/guide/en/apm/agent/java/current/setup.html) on Windows. Sorry

---

<div class="post-metadata">

**Author:** ![aji.shinde7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aji.shinde7/32/115498_2.png) [@aji.shinde7](https://discuss.elastic.co/u/aji.shinde7)\
**Post date:** [July 20, 2022, 7:47am UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/5 "2022-07-20T07:47:26Z")

</div>

Hello Jack\_Shirazi , Thank you for your reply.

By manually , do you mean adding code in **bin/standalone.conf.bat**?  
as below

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/0/60c3061263da1692fbf830802e8bfb9cf6b528c1.png)

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [July 20, 2022, 12:26pm UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/6 "2022-07-20T12:26:46Z")

</div>

I just realized the earlier linux one was for tomcat. Is this a tomcat installation?

---

<div class="post-metadata">

**Author:** ![aji.shinde7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aji.shinde7/32/115498_2.png) [@aji.shinde7](https://discuss.elastic.co/u/aji.shinde7)\
**Post date:** [July 28, 2022, 1:35pm UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/7 "2022-07-28T13:35:59Z")

</div>

Yes, on Linux I installed APM to monitor tomcat services and was trying to install APM Agent on Windows to monitor Java Application.

But later I came to know that there are no Java Applications running only Java Batch Sripts are there.

Still I was able to install APM agent by adding windows code (below snap) in batch file and importing Elastic certificate in cacert file.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/0/60c3061263da1692fbf830802e8bfb9cf6b528c1.png)

there are no transactions happening as those are not applications so I can see data into JVMs section ONLY (in Kbana APM app)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d226cc28a4869737e9f4728e25fabdd844dea6eb.png)

---

<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:** [August 18, 2022, 9:36am UTC](https://discuss.elastic.co/t/install-elastic-apm-agent-on-windows-server/309914/8 "2022-08-18T09:36:27Z")

</div>

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