---
title: Set up environment variables and system properties
description: Configure environment variables and system properties as follows:
component: pinggateway
version: 2023.11
page_id: pinggateway:installation-guide:envvar-sysprop
canonical_url: https://docs.pingidentity.com/pinggateway/2026/installation-guide/envvar-sysprop.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2023-09-19T08:48:14Z
keywords: ["Install", "Configuration", "Certificates"]
superseded_by: https://docs.pingidentity.com/pinggateway/2026/installation-guide/envvar-sysprop.html
section_ids:
  start_ig_with_a_customized_router_scan_interval: Start IG with a customized router scan interval
  define_environment_variables_for_startup_runtime_and_stop: Define environment variables for startup, runtime, and stop
---

# Set up environment variables and system properties

Configure environment variables and system properties as follows:

* By adding environment variables on the command line when you start IG.

* By adding environment variables in `$HOME/.openig/bin/env.sh`, where `$HOME/.openig` is the instance directory. After changing `env.sh`, restart IG to load the new configuration.

## Start IG with a customized router scan interval

By default, IG scans every 10 seconds for changes to the route configuration files. Any changes to the files are automatically loaded into the configuration without restarting IG. For more information about the router scan interval, refer to [Router](../reference/Handlers.html#Router).

The following example overwrites the default value of the Router scan interval to two seconds when you start up IG:

* Linux

* Windows

```bash
$ IG_ROUTER_SCAN_INTERVAL='2 seconds' /path/to/identity-gateway-2023.11.2/bin/start.sh
```

```windows
C:\IG_ROUTER_SCAN_INTERVAL='2 seconds'
C:\start.bat %appdata%\OpenIG
```

## Define environment variables for startup, runtime, and stop

IG provides the following environment variables for Java runtime options:

* IG_OPTS

  (Optional) Java runtime options for IG and its startup process, such as JVM memory sizing options.

  Include all options that are not shared with the `stop` script.

  The following example specifies environment variables in the `env.sh` file to customize JVM options and keys:

  * Linux

  * Windows

  ```bash
  # Specify JVM options
  JVM_OPTS="-Xms256m -Xmx2048m"

  # Specify the DH key size for stronger ephemeral DH keys, and to protect against weak keys
  JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"

  # Wrap them up into the IG_OPTS environment variable
  export IG_OPTS="${IG_OPTS} ${JVM_OPTS} ${JSSE_OPTS}"
  ```

  ```
  C:\set "JVM_OPTS=-Xms256m -Xmx2048m"
  C:\set "JSSE_OPTS=-Djdk.tls.ephemeralDHKeySize=2048"
  C:\set "IG_OPTS=%IG_OPTS% %JVM_OPTS% %JSSE_OPTS%"
  ```

* JAVA_OPTS

  (Optional) Java runtime options for IG include all options that are shared by the `start` and `stop` script.
