What if you could spot and fix critical errors in your PHP application before your users even notice?
If you manage a PHP application on a RunCloud server, integrating a powerful monitoring tool is the fastest way to identify performance bottlenecks and eliminate bugs. New Relic provides an all-in-one solution for both server and application monitoring that offers a single dashboard to view resource usage, analyze logs, and track application health.
In this step-by-step guide, we will show you exactly how to integrate New Relic with your server to begin monitoring your PHP applications, so you can spend less time debugging and more time building.
Let’s dive right in!
Steps to Integrate New Relic on Ubuntu Servers to Monitor PHP Applications
In this section, we will provide step-by-step instructions for RunCloud users to manage and monitor their server infrastructure, logs, and data using New Relic.
Prerequisite: Sign Up For a New Relic Account

Before we can install New Relic on your server, you’ll need to create a New Relic account. Don’t worry about any paid plans, the free plan is perfectly sufficient for the purposes of this tutorial.
Step 1: Select Monitoring Method
After logging in to your New Relic account and selecting “Integrations & Agents” > “Data source”, you will be prompted to choose your data collection method. To monitor your RunCloud servers, select the “On a host (tar archive)” button. This is a generic installation that is highly compatible with various server setups.

Step 2: Enter Your Credentials
You will need to provide your New Relic license key and user key. These keys link the monitoring agent to your account. Enter the required keys in the respective fields to proceed. If you don’t have the keys, click the “Create a new key” button.

Suggested read: How to monitor web app and CPU Usage
Step 3: Check Prerequisites
Before installation, verify your server’s installed PHP version, as New Relic supports multiple versions. Run the provided command to check your PHP installation and ensure compatibility. RunCloud servers support multiple PHP versions, and you can find the location of your PHP installation by reading the PHP Cheat Sheet.

Step 4: Download the Tar Distribution
Run the provided command in your SSH terminal to find the appropriate tar archive for your server’s operating system. The file should be named something like newrelic-php5-11.10.0.24-linux.tar.gz.
Enter the file’s name in the provided textbox, which will automatically generate a curl command that you can execute on your server to download the file.

Step 5: Install the PHP Agent
Once the download is complete, execute the provided command on the next page to perform the following steps:
- Decompress the downloaded tar archive.
- Change the directory to the newly created folder.
- Run the installation script with your New Relic credentials.

Step 6: Configure the PHP Agent
To properly link your application with New Relic, you must configure the agent:
- Name your application: Use the same name as your web application. This allows New Relic to automatically find the correct php-fpm process.
- Configure the agent: Run the provided newrelic-install script with your application name. This command will configure all PHP apps on your host to report to a single APM entity unless you configure them separately.

Step 7: Restart Your Application
You must restart your web server services for the configuration changes to take effect.
- Restart your services: Use the appropriate command for your server setup, for instance,
systemctl restart php82rc-fpm
for PHP 8.2 FPM. - Send data to New Relic: To manually initialize the agent and ensure it starts sending data, run the command
php -r 'phpinfo(INFO_GENERAL);'
.
Step 8: Optional – Connect Logs and Infrastructure
You can connect infrastructure metrics and logs to get a comprehensive view of your server. Run the provided curl command to install the necessary components. If you have already performed this step for another web application on the same server, you can skip it.
Step 9: Test the Connection
After completing the installation and configuration, test the connection to verify that your agents are reporting correctly to New Relic. The status for the PHP agent should show “Successful,” which indicates that the agent is installed correctly.

Reviewing New Relic Dashboard
And that’s it – you’re all set! Your New Relic account will now be collecting data and monitoring your server. You should be able to see your server metrics, along with any additional monitors that you have installed in the New Relic dashboard.
If you have a general purpose web application then you can track its metrics in the “APM & Services” section. There you can see error rates, logs and set alerts to notify you in case of a failure.

If you are running a website then you can take advantage of “Browser” monitoring functionality, which tracks your website’s Core Web Vitals.
And then, once you’ve successfully logged in – run the installation command provided in New Relic’s dashboard which will look something like this:

After Action Report
Using a server monitoring platform such as New Relic will allow you to quickly identify and resolve issues that affect your website’s performance. You can set up real-time monitoring and alerts to proactively assess potential problems that can cause downtime.
Integrating New Relic with RunCloud can provide you with invaluable insights into your server’s performance and help you optimize it for better speed and reliability. By following the above steps you can easily set up New Relic to monitor your server’s metrics, including CPU usage, memory consumption, and network traffic.
Not a fan of managing your own servers?
This is exactly why we built RunCloud.
Painless server configuration that automates all of this so you don’t need to spend hours figuring it out – get started with RunCloud today & get up and running in minutes.
Have any other questions, or already using New Relic to monitor your web applications? Let us know & join the conversation by leaving a comment below. 💬
New Relic and RunCloud FAQs
How do I restart the correct PHP-FPM service on my RunCloud server?
On a RunCloud server, PHP-FPM services are named according to their version, such as php82rc-fpm for PHP 8.2. To restart the correct service, use the command sudo systemctl restart phpXXrc-fpm, replacing XX with your specific PHP version number.
Where can I find my New Relic license and user keys?
Your New Relic license and user keys are provided during the guided installation process within your New Relic account. You can also find your license key under ‘API keys’ in your account settings.
Do I need to connect infrastructure and logs if I only want to monitor my application’s performance?
While not strictly required for application performance monitoring (APM), connecting your infrastructure and logs is highly recommended. Correlating your application’s performance with server metrics like CPU usage and memory provides a more complete picture, which helps in diagnosing issues more effectively.
How can I confirm that the New Relic agent installation was successful?
After completing all the installation steps, you can use the “Test connection” feature in the New Relic setup guide. The PHP agent’s “Successful” status confirms that it is properly configured and will report data to your account.
Why should I use New Relic to monitor my RunCloud server?
New Relic provides powerful performance monitoring and observability for your applications and server infrastructure. Integrating it with your RunCloud-managed server lets you gain deep insights into your PHP application’s performance, track down errors, and monitor server health to ensure optimal operation.