---
title: Starting and stopping the API Publish Service
description: Start and stop the API Publish Service.
component: pingintelligence
version: 5.2
page_id: pingintelligence:installing_pingintelligence_for_apis:pingintelligence_start_stop_api_publish_service
canonical_url: https://docs.pingidentity.com/pingintelligence/5.2/installing_pingintelligence_for_apis/pingintelligence_start_stop_api_publish_service.html
revdate: April 3, 2024
section_ids:
  before-you-begin: Before you begin
  about-this-task: About this task
  steps: Steps
  choose-from: Choose from:
  choose-from-2: Choose from:
---

# Starting and stopping the API Publish Service

Start and stop the API Publish Service.

## Before you begin

For the API Publish Service to start, the `apipublish_master.key` must be present in the `apipublish/config` directory. If you have moved the master key to a secured location for security reasons, copy it to the `config` directory before starting the service.

## About this task

You can start the API Publish Service in one of the following two ways:

* Using a service script available in the `bin` directory

* Using the `start.sh` script available in the `bin` directory

## Steps

1. Start API Publish.

   ### Choose from:

   * To start API Publish as a service:

     1. Navigate to the `bin` directory and run the following command to install API Publish as a service:

        ```
        #sudo ./install-systemctl-service.sh pi-apipublish
        ```

     2. Start the service by entering the following command:

        ```
        systemctl start pi-apipublish.service
        ```

   * To start API Publish using the `start.sh` script:

     1. Run the `start.sh` script located in the `/pingidentity/apipublish/bin` directory:

        ```shell
        $ ../bin/start.sh
        ```

2. Stop API Publish.

   ### Choose from:

   * To stop API Publish using a service script:

     1. Run the following command to stop the API Publish Service:

        ```
        systemctl stop pi-apipublish.service
        ```

   * To stop API Publish using the `stop.sh` script:

     1. Run the `stop.sh` script available in the `bin` directory:

        ```
        # ../bin/stop.sh
        ```
