---
title: Find root directory of New Relic agents
source: https://docs.newrelic.com/docs/new-relic-solutions/solve-common-issues/troubleshooting/find-agent-root-directory
---

Some [New Relic solutions](https://newrelic.com/instant-observability/) require installation of an agent. The agent root directory is the main folder that holds the files for the agent. Typically, the agent root directory is the directory where the agent install process places the agent configuration file.

You may need to find the agent root directory for several reasons:

-   To customize your [configuration file](https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/configure-agent).
-   To run [New Relic Diagnostics](https://docs.newrelic.com/docs/agents/manage-apm-agents/troubleshooting/new-relic-diagnostics).
-   To [install](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/install-agent), [update](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/update-new-relic-agent), or [uninstall](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/uninstall-agent) the agent.
-   To troubleshoot if [no data appears](https://docs.newrelic.com/docs/agents/manage-apm-agents/troubleshooting/not-seeing-data) in the New Relic UI.

> #### 💡 TIP
>
> These strategies for finding the root directory are applicable if you followed the default [install procedure](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/install-agent). If you installed to a different directory, this information might not apply.

## APM agents

The agent root directory depends on the agent you're using:

**Go agent**

The Go agent root directory is the root directory of your app, where you imported the `go-agent` package when you [installed the Go agent](https://docs.newrelic.com/docs/agents/go-agent/installation/install-new-relic-go).

**Java agent**

The Java agent root directory is called `newrelic`, which you created in your app server's root directory when you [installed the Java agent](https://docs.newrelic.com/docs/agents/java-agent/installation/install-java-agent).

**.NET Core 2.0 agent**

The location of the .NET Core 2.0 agent root directory depends on your system:

| System  | Location of the agent root directory                                                                                                                                                                                                                                                                                                           |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Windows | Look in the [`CORECLR_NEWRELIC_HOME` environment variable](https://docs.newrelic.com/docs/agents/net-agent/configuration/net-agent-configuration#environment-variables) for your application to find the location of the agent root directory.                                                                                                 |
| Linux   | The location of the agent root directory is `/usr/local/newrelic-netcore20-agent`. You can also look in the [`CORECLR_NEWRELIC_HOME` environment variable](https://docs.newrelic.com/docs/agents/net-agent/configuration/net-agent-configuration#environment-variables) for your application to find the location of the agent root directory. |
| Docker  | In the root directory for your app, look for the agent root directory called `NewRelic`, which you created when you [installed the Core 2.0 agent with Docker](https://docs.newrelic.com/docs/agents/net-agent/installation/install-net-core-20-agent-docker#windows-prep).                                                                    |

**.NET Framework agent**

The location of the .NET Framework agent root directory is `C:\Program Files\New Relic\.NET Agent`.

**Node.js agent**

The Node.js agent root directory is the root directory of your app, where you copied `newrelic.js` when you [installed the Node.js agent](https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/install-nodejs-agent).

**PHP agent**

The location of the PHP agent root directory depends on how you installed the agent:

| Installation method                              | Root directory location                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| With a package manager or tar archive            | Use [`phpinfo()`](https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration#inivar-background) and look in the sections called **Scan this dir for additional .ini files** or **Additional .ini files parsed** for the location of the `newrelic.ini` file. This file will be in the agent root directory, which is called `newrelic-php5`. > #### 💡 TIP > > The PHP agent root directory is called `newrelic-php5` for all supported PHP versions, including PHP 7. |
| With a configuration system, like Puppet or Chef | To find all of the locations where the PHP agent was installed, check the [`NR_INSTALL_PHPLIST` environment variable](https://docs.newrelic.com/docs/agents/php-agent/advanced-installation/silent-mode-install-script-advanced#NR_INSTALL_PHPLIST) for a list of agent root directories.                                                                                                                                                                                                         |

**Python agent**

You can install the Python agent anywhere on your host system and then supply a path to it through the `NEW_RELIC_CONFIG_FILE` environment variable or the `newrelic.agent.initialize()` API call.

To find the location of the agent config file, look in the [`NEW_RELIC_CONFIG_FILE` environment variable or the `newrelic.agent.initialize()` call](https://docs.newrelic.com/docs/agents/python-agent/configuration/python-agent-configuration#agent-configuration-file) for the path to the agent root directory.

**Ruby agent**

The location of the Ruby agent root directory depends on how you installed the agent:

| Installation method         | Root directory location                                                                                                                                                                                                                                                                  |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| With the `newrelic_rpm` gem | The Ruby agent root directory is in the root directory of your app in a directory called `config`.                                                                                                                                                                                       |
| Without the gem             | Look in the `NEW_RELIC_CONFIG_PATH` environment variable for the path to the agent root directory. If there isn't a path in that environment variable, check the following directories to find the one that contains the `newrelic.yml` file: - `config` - `$HOME/.newrelic/` - `$HOME/` |

## Mobile agent [#mobile]

The mobile agent root directory is the root directory of your app.

## Infrastructure agent [#infrastructure]

The location of the infrastructure agent root directory depends on your system:

**Infrastructure agent**

| System                               | Root directory location                      |
| ------------------------------------ | -------------------------------------------- |
| Windows                              | `C:\Program Files\New Relic\newrelic-infra\` |
| Linux, Docker, and Elastic Beanstalk | `/etc`                                       |

**On-host integrations**

The location of the root directory for on-host integrations is `/etc`.

**Cloud integrations**

Because cloud integrations are not installed but are connected to our infrastructure monitoring through your cloud service provider, there is not a root directory specific to cloud integrations.

## Directory info for other tools [#other]

For learning about directories for other tools not listed here, see the [documentation for a specific solution](https://newrelic.com/instant-observability/) .
