# Installing two OneAgents on the same server

**URL:** <https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582>\
**Category:** Open Q&A\
**Tags:** installation, oneagent\
**Created:** [January 11, 2024, 10:04pm UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582 "2024-01-11T22:04:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DAVID\_MTZ](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@DAVID\_MTZ](https://community.dynatrace.com/u/DAVID_MTZ)\
**Post date:** [January 11, 2024, 10:04pm UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582/1 "2024-01-11T22:04:10Z")

</div>

Hi

I have a question, i have two Dynatrace tenant, one for production and other for pre-production, is possible that one server has installed two oneagent,&nbsp;one that aims to production tenant and the other that aims to pre-production tenant.

---

<div class="post-metadata">

**Author:** ![Romanenkov\_Al3x](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/romanenkov_al3x/32/36257_2.png) [@Romanenkov\_Al3x](https://community.dynatrace.com/u/Romanenkov_Al3x)\
**Post date:** [January 12, 2024, 5:37am UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582/2 "2024-01-12T05:37:18Z")

</div>

Hello.

In general: it is not possible to put two agents on the same server.

Perhaps only if you have for example a docker host and two containers. Adding an agent to the image for different environments and runing on same docker host - you will achive situation that you have two different containers/process and monitoring data in two different environments.

Regards,

Alex Romanenkov

---

<div class="post-metadata">

**Author:** ![fstekelenburg](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fstekelenburg/32/22029_2.png) [@fstekelenburg](https://community.dynatrace.com/u/fstekelenburg)\
**Post date:** [January 12, 2024, 9:30am UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582/3 "2024-01-12T09:30:57Z")

</div>

So you are saying that a host can be both in Production, and Pre-Productions phase?

More than one OneAgent is not supported. (Though technically, if you reconfigure the port assignments, you might get somewhere).

I recommend you to consider to [connect your environments](https://docs.dynatrace.com/docs/get-started/monitoring-environment/set-up-multiple-monitoring-environments) and use the cross-environment facility:

- To trace calls between services monitored in different Dynatrace environments, you can configure cross-environment tracing. For details, see&nbsp;[Cross-environment tracing](https://docs.dynatrace.com/docs/observe-and-explore/purepath-distributed-traces/purepath-connect-environments).
- To display metrics from remote environments on your local environment’s dashboards, you can set up cross-environment dashboard tiles. For details, see&nbsp;[Create remote/multi-environment Dynatrace dashboards](https://docs.dynatrace.com/docs/observe-and-explore/dashboards-classic/dashboards/dashboards-multi-environment).

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 12, 2024, 9:39am UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582/4 "2024-01-12T09:39:46Z")

</div>

Actually, both&nbsp;[@fstekelenburg](https://community.dynatrace.com/user/21639)&nbsp; and&nbsp;[@Romanenkov\_Al3x](https://community.dynatrace.com/user/51881)&nbsp; are valid, however depending on your particular use case I’d also recommend thinking about using PaaS OneAgent versions. So if you are deploying to a host (e.g. not Kubernetes or other application platforms), you can combine full OneAgent from one environment and a PaaS version from another one. Then you will have the full OneAgent reporting to one environment and just a process / processes with manually injected PaaS OneAgent to another environment.

- You have to configure injection rules or disable injection for the particular paas oneagent monitored processes on the environment where the full OneAgent is reporting to.
- PaaS OneAgent has to be updated manually (there is no support for auto-update of PaaS OneAgent versions.
- You won’t see metrics of other processes from the host in the environment where the PaaS OneAgent is reporting. Still, you will see basic OS metrics + all the process metrics of the monitored process.
- You will get proper tracing support. Cross-environment tracing recommended by&nbsp; [@fstekelenburg](https://community.dynatrace.com/user/21639)&nbsp; is also a valid approach but has its limits.

---

<div class="post-metadata">

**Author:** ![fstekelenburg](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fstekelenburg/32/22029_2.png) [@fstekelenburg](https://community.dynatrace.com/u/fstekelenburg)\
**Post date:** [January 12, 2024, 9:48am UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582/5 "2024-01-12T09:48:19Z")

</div>

The same applies to the use of [Agentless RUM](https://docs.dynatrace.com/docs/platform-modules/digital-experience/web-applications/alternative-setup/set-up-agentless-real-user-monitoring), when you have different web sites/services on a host that are in different phases, and explicitly need to be split, right&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)? Assuming you’re not meaning the same 😉

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 12, 2024, 9:50am UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582/6 "2024-01-12T09:50:45Z")

</div>

No, I mean just OneAgents. Agentless RUM is not related to this at all.

---

<div class="post-metadata">

**Author:** ![fstekelenburg](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fstekelenburg/32/22029_2.png) [@fstekelenburg](https://community.dynatrace.com/u/fstekelenburg)\
**Post date:** [January 12, 2024, 9:54am UTC](https://community.dynatrace.com/t/installing-two-oneagents-on-the-same-server/43582/7 "2024-01-12T09:54:51Z")

</div>

Right, but could be the goal, which I forgot to ask. So&nbsp;[@DAVID\_MTZ](https://community.dynatrace.com/user/70237)&nbsp;what is it exactly that you are trying to achieve?
