Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Stable / Latest php_agent Download URI?


Is there a ‘stable’ or ‘latest’ download URI for php_agent tarballs? The deletion of old versions and changing filename with new versions often breaks our build processes. Thanks!


Hey @jsanford

How are you doing it currently. That context might help us understand the barrier you’re hitting.

The latest PHP agent can always be found here.


Hi @acuffe,

That works well if you are a human, however my concern lies in not having a persistent URI available for Docker or other automated builds to reference php_agent. As an example:

will some day change to:

This wouldn’t be a terrible issue, however, each NewRelic release seems to include a step that deletes the previous version. As a result, any automated builds, Docker containers, Chef recipes, Ansible playbooks etc. 404 trying to download the php_agent as soon as you release a new version.

This problem is often mitigated by other upstream providers by offering a ‘stable’ or ‘latest’ file - generally a symlink to the latest version. E.g.:

That would be ideal for the php_agent as well!




Hey @jsanford

Is it Docker you’re trying to ensure that deploying new containers contains the latest agent?

This is a sample Dockerfile to achieve such.

RUN apt-get install -y wget
RUN echo deb newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
RUN wget -O- | apt-key add -
ENV NR_INSTALL_KEY your_licenseKey_number
RUN apt-get update
RUN apt-get install -y newrelic-php5 
RUN newrelic-install install

Does this help you in any way? In this way when the Dockerfile is built and executed it’s installing the latest agent from a repository. Perhaps there’s a more specific use case in your scenario, if so if you can detail something specific I can investigate that and if it’s something we currently don’t have an option for, I can feed this back to our PHP Agent developers to consider such a solution going forward.


Hi @acuffe

Thanks for the quick reply! We are currently using Alpine linux based containers, so Debian packages aren’t unfortunately of use. This is why we’re using the agent direct download URI. I would appreciate passing it on!




It seems this issue (ticket?) has been resolved but the latest/stable ‘tag’ is still not available from
We are also using Alpine container images and would really like to see such a tag instead of the hackisch work-a-round of grepping html.
@acuffe is this still on your roadmap if getting solved? It would seem a small trivial change to me.


@daniel.kraaij the musl release should work for Alpine linux as Alpine works on a version of C called MUSL C which mean if you download and use the version in the latest release folder you have referenced and take down the musl option you should be successful.

That release folder is always the latest/stable release and then you just need to choose the option which is relevant to your environment.


Hi @acuffe,

Thanks for you answer.

Perhaps i have explained myself wrong here :wink:
We have automatic container builds that pick up the NewRelic PHP agent from that directory.
At this moment we are doing a dirty work-a-round for getting the correct version of the musl file.

NEWRELIC_FILE=$(curl -s | grep -o ‘newrelic-php5-\(\d\+.\)+-linux-musl.tar.gz’ | head -n 1) || exit; \
curl -L${NEWRELIC_FILE} | tar -C /tmp -zx

This is obviously not the correct way of doing things.
We would rather do a

curl -L https://download/newrelic/com/php_agent/release/newrelic-php5-latest-linux-musl.tar.gz | tar -C /tmp -zx


Can i assume by the lack of response that a change request has been put in for this?


Hey @daniel.kraaij - Sorry we missed this thread - I’m looking into why that happened…

Anyway, you’re right, there is a feature request logged for this, and at the moment it looks like your workaround is the best available option.