Skip to content

Installing the JVM Agent

The Lightrun agent is at the core of the Lightrun platform. It's the component that enables you to add information at runtime, without redeployments or restarts.


If you haven't yet done so during the onboarding process, you can download the Lightrun JVM Agent from the Management Portal.

  1. Log into the Management Portal.

  2. Copy the installation script from the Install the Agent section:

    Get the Lightrun JVM Agent

  3. Open a terminal and change to the directory where your project folder is located.

  4. Enter the copied installation script. The video, below, shows what the installation process looks like:

    JVM Agent Installation process

After the agent has been installed, it must be added to your application.

!!! tip You can customize agent configurations at any time; for details, see agent/agent.config. To apply the changes, the agent must be restarted (see below).

  1. From the application server, open a terminal and change to the directory where your application is located.

  2. From your terminal, copy the displayed command script.

  3. Change the directory to where the agent is located.
  4. Enter to the copied command script (replace RestofArgumentsHere with the name of your application) and include any other relevant options. See the example in this video:

    Run your application with the Lightrun Agent

  5. Optional You can add the JAVA_OPTS environment variable to the server so that all launched Java processes launched automatically are attached to an agent. Copy and enter from the server terminal the following command (replace the agentpath value with path to the Lightrun agent where it was downloaded):

export JAVA_OPTS=-agentpath:/path/to/agent/

Last update: September 27, 2021