---
title: Start and stop API Publish service
description: For API Publish 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.
component: pingintelligence
version: 5.1
page_id: pingintelligence:pingintelligence_production_deployment:pingintelligence_start_stop_api_publish_service
canonical_url: https://docs.pingidentity.com/pingintelligence/5.1/pingintelligence_production_deployment/pingintelligence_start_stop_api_publish_service.html
revdate: March 25, 2024
section_ids:
  start-api-publish-as-a-service: Start API Publish as a service
  start-api-publish-using-start-sh-script: Start API Publish using start.sh script
  stop-api-publish-using-stop-sh-script: Stop API Publish using stop.sh script
  stop-api-publish-using-service-script: Stop API Publish using service script
---

# Start and stop API Publish service

For API Publish 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.

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

* Using service script available in the `bin` directory, or

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

## Start API Publish as a service

Complete the following steps 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
   ```

## Start API Publish using start.sh script

To start API Publish, run the `start.sh` script located in the `/pingidentity/apipublish/bin` directory.

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

## Stop API Publish using stop.sh script

To stop API Publish, run the `stop.sh` script available in the `bin` directory.

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

## Stop API Publish using service script

Run the following command to stop the API Publish service.

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