New Relic's Node.js agent is publicly available on the Node Package Manager (npm) repository as well as on New Relic's Github repo for Node.js. Before you install the Node.js agent, make sure your application meets New Relic's system requirements.
View installation video
Before installing New Relic, you may want to view the video tutorials available through New Relic University.
Install the Node.js agent
As explained in this section, be sure to add
require('newrelic'); as the first line of your app's main module.
To install the Node.js agent for New Relic:
- Ensure you meet the Node.js system requirements. In particualr, ensure you are using a supported version of Node.
- Use the command
npm install newrelic --savefor each application you want to monitor.
- From node_modules/newrelic, copy
newrelic.jsinto the root directory of your app.
require('newrelic');as the first line of your app's main module.
- Optional: Install the
@newrelic/native-metricspackage, as described on our Node VM Measurements page, for additional Node runtime-level metrics.
Check your app's performance
Keep your Node.js agent up-to-date
For more help
Additional documentation resources include: