---
title: Starting and stopping PingGateway
description: When you start PingGateway, specify the configuration directory where PingGateway looks for configuration files.
component: pinggateway
version: 2025.9
page_id: pinggateway:installation-guide:start-stop
canonical_url: https://docs.pingidentity.com/pinggateway/2026/installation-guide/start-stop.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
superseded_by: https://docs.pingidentity.com/pinggateway/2026/installation-guide/start-stop.html
section_ids:
  starting-default: Start PingGateway with default settings
  starting-options: Start PingGateway with custom settings
  pidFileMode: Allow startup when there is an existing PID file
  stopping: Stop PingGateway
  graceful-shutdown: Graceful shutdown
---

# Starting and stopping PingGateway

## Start PingGateway with default settings

When you start PingGateway, specify the configuration directory where PingGateway looks for configuration files.

1. Start PingGateway:

   * Linux

     `/path/to/identity-gateway-2025.9.0/bin/start.sh`

   * Windows

     `C:\path\to\identity-gateway-2025.9.0\bin\start.bat`

   By default, PingGateway configuration files are located under `$HOME/.openig` on Linux, `%appdata%\OpenIG` on Windows. Learn how to use a different location in [Configuration location](../configure/configure.html#configuration-location).

2. Check that PingGateway is running in one of the following ways:

   * Check the PingGateway endpoint at `http://ig.example.com:8085/health/startup` to make sure PingGateway it returns `HTTP 200 OK`.

     If PingGateway hasn't finished starting up or is shutting down, the endpoint returns `HTTP 503 Service Unavailable`.

   * Display the product version and build information at `http://ig.example.com:8085/api/info`.

## Start PingGateway with custom settings

By default, PingGateway runs on HTTP, on port `8080`, from the instance directory `$HOME/.openig`.

To start PingGateway with custom settings, add the configuration file `admin.json` with the following properties, and restart PingGateway:

* `vertx`: Finely tune Vert.x instances.

* `connectors`: Customize server port, TLS, and Vert.x-specific configurations. Each `connectors` object represents the configuration of an individual port.

The following example starts PingGateway on non-default ports, and configures Vert.x-specific options for the connection on port 9091:

```json
{
  "connectors": [{
    "port": 9090
  },
  {
    "port": 9091,
    "vertx": {
      "maxWebSocketFrameSize": 128000,
      "maxWebSocketMessageSize": 256000,
      "compressionLevel": 4
    }
  }]
}
```

For more information, refer to [AdminHttpApplication (`admin.json`)](../reference/AdminHttpApplication.html).

## Allow startup when there is an existing PID file

By default, if there is an existing PID file during startup the startup fails. Use one of the following ways to allow startup when there is an existing PID file. PingGateway then removes the existing PID file and creates a new one during startup.

1. Add the following configuration to `admin.json` and restart PingGateway:

   ```json
   {
     "pidFileMode": "override"
   }
   ```

   Source: [admin-pidfilemode.json](../_attachments/config/admin-pidfilemode.json)

2. Define an environment variable for the configuration token `ig.pid.file.mode`, and then start PingGateway in the same terminal:

   * Linux

   * Windows

   ```console
   $ IG_PID_FILE_MODE=override /path/to/identity-gateway-2025.9.0/bin/start.sh
   ```

   ```none
   C:\IG_PID_FILE_MODE=override
   C:\path\to\identity-gateway-2025.9.0\bin\start.bat %appdata%\OpenIG
   ```

3. Define a system property for the configuration token `ig.pid.file.mode` when you start PingGateway:

   * Linux

     `$HOME/.openig/env.sh`

   * Windows

     `%appdata%\OpenIG\env.sh`

   ```shell
   export "IG_OPTS=-Dig.pid.file.mode=override"
   ```

## Stop PingGateway

Use the `stop.sh` script to stop an instance of PingGateway, specifying the instance directory as an argument.

If the instance directory isn't specified, PingGateway uses the default instance directory as in these examples:

* Linux

  `/path/to/identity-gateway-2025.9.0/bin/stop.sh $HOME/.openig`

* Windows

  `C:\path\to\identity-gateway-2025.9.0\bin\stop.bat %appdata%\OpenIG`

### Graceful shutdown

By default, the `stop.sh` or `stop.bat` script waits up to 2.5 seconds before forcing the PingGateway process to terminate. Technically, the script sleeps 500 milliseconds up to five times.

To give PingGateway more time to shut down gracefully, specify the sleep time in milliseconds and the number of intervals after the instance directory argument. The following examples cause the script to wait up to 10 seconds before forcing termination:

* Linux

  `/path/to/identity-gateway-2025.9.0/bin/stop.sh $HOME/.openig 1000 10`

* Windows

  `C:\path\to\identity-gateway-2025.9.0\bin\stop.bat %appdata%\OpenIG 1000 10`

When you specify the sleep time in milliseconds without the number of intervals, the number of intervals defaults to five.
