To proceed with the install, use our launcher, or follow the instructions below.
Install the Node.js agent
If you're using the agent in a Docker container, install the agent in each container.
To install the Node.js agent:
- Ensure you meet the system requirements. In particular, make sure you use a supported Node version.
- Use the command
npm install newrelic --savefor each application you want to monitor.
newrelic.jsinto the root directory of your app.
Configure agent via the
newrelic.jsfile or via environment variable:
require('newrelic');as the first line of your app's main module.
- Optional: For additional Node.js runtime-level statistics, ensure the
@newrelic/native-metricspackage is installed.
- Generate some traffic, then wait a few minutes for data to appear in the APM UI.
Keep your Node.js agent up-to-date
To ensure that you have the most up-to-date version of New Relic, refer to the Node.js release notes. When applicable, the release notes include a download link with instructions on how to update the Node.js agent.
After you update the agent, generate some traffic and wait a few minutes. If no data appears in the New Relic UI, see the troubleshooting procedures.