Install Java agent


Installing Sqreen Java agent enables you to monitor your application security and block attacks in real-time. Installing Sqreen in your Java application takes less than a minute:

  • Sign up to Sqreen to create your account
  • Pick up your first application name and Java language. The application name can be a repository name, or anything that will help you identify app in your Sqreen dashboard
  • Follow the procedure detailed below

Standard Java Application

Java agent installation only requires to change JVM settings.

Download Agent

curl -o sqreen.jar

Add those parameters to JVM startup command, may be stored in a configuration file.

-javaagent:/path/to/sqreen.jar -Dsqreen.token=<your Sqreen token>

Then start the application as usual.

Install the agent on multiple environments

You will probably install the Sqreen Java agent on your production environment. You can also create several applications for each of your environment (development, staging, production). For each, a unique Sqreen token will be provided for each of your applications.

Basic configuration

Instead of using a system property value (-D parameter), you can also use SQREEN_TOKEN environment variable to set up your token:

export SQREEN_TOKEN=my_secret_token

Sqreen Java agent provides additional configuration settings. Refer to Configuration of the Java agent for more detailed information.

Uninstall Agent

To uninstall Sqreen Agent, simply remove -javaagent parameter from the JVM command.


Use Sqreen throughout the development cycle

Sqreen can protect your application from your local environment to your production through your staging. Simply create an application per environment in dashboard and setup the token accordingly.