> For the complete documentation index, see [llms.txt](https://docs.create-magento-app.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.create-magento-app.com/usage-guide/configuring-newrelic.md).

# Configuring NewRelic

{% hint style="warning" %}
Available only on Linux. WSL is not supported.
{% endhint %}

NewRelic will allow monitoring performance during development, hopefully allowing to spot performance regressions before going to prod.

You will need an infrastructure container running for the NewRelic daemon.

### 1. Retrieve your NR license key.

<https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/>

### 2. Run the following command

It will spin up a NewRelic infra container (Note that it will run in [privileged mode](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities)):

<pre class="language-bash"><code class="lang-bash">docker run \
    -d \
<strong>    --name newrelic-infra \
</strong>    --network=host \
    --cap-add=SYS_PTRACE \
    --privileged \
    --pid=host \
    -v "/:/host:ro" \
    -v "/var/run/docker.sock:/var/run/docker.sock" \
    -e NRIA_LICENSE_KEY=&#x3C;LICENSE_KEY> \
    newrelic/infrastructure:latest
</code></pre>

Replace `<LICENSE_KEY>` with your license key

### 3. Add the following configuration to your `cma.js`

```javascript
module.exports = {
	... // other configurations
    configuration: {
        newRelic: {
            enabled: true,
            licenseKey: '<LICENSE_KEY>'
        }
    }
};
```

### 4. Run the `start` command without the `-s` option
