# Set up high availability

> Configure high availability for Cloud Management Platform

---

Site [llms.txt](/llms.txt)

---

Create the required number of Cloud Management Platform (CMP) instances. You can configure high availability **on-premises**, in **AWS**, or in **Azure**.

<div class="alert alert-info" role="alert"><div class="h4 alert-heading" role="heading">Recommendations</div>


Review the **[appliance reference architecture](/docs/cmp/system-architecture/)** before configuring high availability.

Start **small** and upgrade if required after monitoring usage.
</div>


## Configuration overview

**At a high level, the following tasks are required to configure high availability for CMP**.

1. Install CMP nodes as required.
1. License the nodes using the CMP web interface.
1. If required, upgrade all nodes using the CLI.
1. Database tasks:
   1. Deploy an external shared database.
   1. Disable the built-in database server.
   1. Update all nodes to reference the external database.
1. NFS tasks:
   1. Move node files to NFS.
   1. Delete local files from each node.
   1. Update all nodes to reference NFS.
1. Disable Web Server/Job Engine roles as necessary.
1. Configure the load balancer.

<div class="alert alert-info" role="alert">


Steps may vary depending on your cloud service provider.
</div>


## Web server

CMP uses the **Apache HTTP Server**, which runs as a `httpd` process on the appliance.

<div class="alert alert-info" role="alert"><div class="h4 alert-heading" role="heading">Load balancing</div>


If using multiple web servers, we recommend deploying them behind a **load balancer** to distribute traffic.

**Refer to the [reference architecture load balancer requirements](/docs/cmp/system-architecture/) for details.**
</div>


### Configure web servers

<div class="alert alert-info" role="alert">


CMP web servers do **not** need to run the job engine or database service.
</div>


To create a web server, clone an existing CMP web server, or run the CMP installer on a new VM.

Ensure each web server has access to the **required [shared directories, as described in the reference architecture](/docs/cmp/system-architecture/)**.

Then perform the following steps:

1. Disable the job engine service
1. Disable PostgreSQL
1. Configure connection to external database

#### 1: Disable job engine

The instance does not require the job engine services.

1. Open the job engine `supervisord` configuration file located at `/etc/supervisord.d/jobengine.conf` for editing.
1. Set `autostart` and `autorestart` to `false`, and save the file.
1. Run the following command to reload the configuration files.

   <div class="alert alert-info" role="alert">


   Use `sudo su -` before running `supervisorctl` to access elevated permissions.
   </div>


   ```bash
   supervisorctl reload
   ```

#### 2: Disable PostgreSQL {#disable-postgresql-web-server}

The instance does not require PostgreSQL.

Run the following command to stop PostgreSQL and prevent it from starting during instance reboot. The service is `postgresql-18` on nodes installed with CMP 2026.3.97 or later, and `postgresql-14` on older nodes.

```bash
systemctl stop postgresql-18 && systemctl disable postgresql-18
```

#### 3: Configure connection to external database {#configure-external-database-web-server}

Update the database settings to point to the external database.

1. Open `settings_local.py` and copy the **DATABASES** section.
1. Open `customer_settings.py` for editing, and paste the **DATABASES** section.
1. Update the **HOST**, **USER**, and **PASSWORD** values in the **DATABASES** section to align with your database:

   ```bash
   HOST: <database-ip-or-fqdn>
   USER: <database-username>
   PASSWORD: <database-password>
   ```

## Job engine

CMP runs its job engine through `supervisor`, which can be controlled through `supervisorctl` commands.

Manage job engine processes by editing the configuration file at `/etc/supervisord.d/jobengine.conf`.

1. Ensure there are no jobs running.
1. Stop all job engine processes.

   ```bash
   supervisorctl stop jobengine:*
   ```

### Configure job engine servers

<div class="alert alert-info" role="alert">


CMP job engine servers do **not** need to run the web service or database service.
</div>


To create a job engine server, clone an existing CMP job engine server, or run the CMP installer on a new VM.

Ensure each job engine has access to the **required [shared directories, as described in the reference architecture](/docs/cmp/system-architecture/)**.

Then perform the following steps:

1. Disable the web service
1. Disable PostgreSQL
1. Configure connection to external database
1. Disable orphaned job cleanup, if you run more than one job engine server

#### 1: Disable the web service

The instance does not require Apache.

Run the following command to stop the web server process and prevent it from starting during instance reboot.

```bash
systemctl stop httpd && systemctl disable httpd
```

#### 2: Disable PostgreSQL {#disable-postgresql-job-engine}

The instance does not require PostgreSQL.

Run the following command to stop PostgreSQL and prevent it from starting during instance reboot. The service is `postgresql-18` on nodes installed with CMP 2026.3.97 or later, and `postgresql-14` on older nodes.

```bash
systemctl stop postgresql-18 && systemctl disable postgresql-18
```

#### 3: Configure connection to external database {#configure-external-database-job-engine}

Update the database settings to point to the external database.

1. Open `settings_local.py` and copy the **DATABASES** section.
1. Open `customer_settings.py` for editing, and paste the **DATABASES** section.
1. Update the **HOST**, **USER**, and **PASSWORD** values in the **DATABASES** section to align with your database:

   ```bash
   HOST: <database-ip-or-fqdn>
   USER: <database-username>
   PASSWORD: <database-password>
   ```

#### 4: Disable orphaned job cleanup {#disable-orphaned-job-cleanup}

Do this only if you run more than one job engine server. With several engines, the orphaned job cleanup can cancel jobs that another engine is still running. With the cleanup disabled, a job whose worker has died stays running until someone cancels it.

1. Disable the feature. The setting is stored in the shared database, so run this once, from any node:

   ```bash
   /opt/cloudbolt/manage.py features --disable jobengine::cancel_orphan_jobs
   ```

1. So that an upgrade does not turn the cleanup back on, add the following to `customer_settings.py` on each job engine server and save the file:

   ```python
   from settings import FEATURE_REGISTRY

   FEATURE_REGISTRY["jobengine::cancel_orphan_jobs"] = False
   ```

1. Confirm the change. Job engine workers pick it up within about a minute.

   ```bash
   /opt/cloudbolt/manage.py features --list
   ```

<div class="alert alert-info" role="alert">


Refer to the **[job engine documentation](/docs/cmp/configure/administration/system/job-engine/)** for additional information.
</div>


## Database

You can set up a PostgreSQL cluster or replication topology as desired to support CMP. For example, PostgreSQL database servers can be configured to support one-way replication or configured as a redundant cluster.

Refer to the [PostgreSQL documentation](https://www.postgresql.org/docs/current/index.html) for more information on configuring replication. To upgrade a CMP-managed database from PostgreSQL 14, see [Upgrade to PostgreSQL 18](/docs/cmp/configure/administration/maintain/upgrade/postgresql-18/).

If you are unfamiliar with PostgreSQL administration, we recommend using a hosted PostgreSQL service.

---

Section pages:

- [Set up high availability in AWS](/docs/cmp/get-started/install/high-availability/aws/): Configure high availability for Cloud Management Platform in AWS
- [Set up high availability in Azure](/docs/cmp/get-started/install/high-availability/azure/): Configure high availability for Cloud Management Platform in Azure
