> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.12/onboard-cortex-xsoar/onboarding-in-cortex-xsoar/high-availability/install-additional-app-servers.md).

# Install Additional App Servers

To implement a full high availability configuration, you should install a load balancer, configure a shared directory, and install additional app servers.

**Install a Load Balancer**

Cortex XSOAR recommends using a load balancer or round-robin DNS server to ensure proper high availability and to avoid having a single point of failure for certain components, such as engines, communication tasks, and usage of the API.

{% hint style="info" %}

### Note

When connecting through the load balancer, you can validate the app server you are connected to by adding the **`/remoteServer/appID`** to the URL **`https://<load balancer url>/remoteServer/app`**.
{% endhint %}

1. In Cortex XSOAR, navigate to Settings → About → **Troubleshooting**.
2. In the Server Configuration section, enter the external host name in the External Host Name configuration key. This is the Cortex XSOAR address registered in the load balancer or DNS.
3. [Update engines](/xsoar-6-administrator-guide/6.12/onboard-cortex-xsoar/onboarding-in-cortex-xsoar/high-availability/deploy-engines-in-a-high-availability-environment.md) to connect through the load balancer.

**Configure a Shared Directory**

Configure a shared directory, using the network file sharing solution of your choice, on each Cortex XSOAR app server. Migrate the **`/var/lib/demisto`** directory to the shared file system before installing additional application servers.

{% hint style="info" %}

### Note

If you are using a location that is different from the default **`/var/lib/demisto`**, you must install the additional app servers using the **`-data-dir`** flag.
{% endhint %}

1. Stop the service on the first Cortex XSOAR application server.
2. Migrate the **`/var/lib/demisto`** directory, without the **`/var/lib/demisto/temp`** subdirectory, to the shared file system.
   1. [Move data folders](/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/manage-data/move-data-folders-to-another-location-on-the-server.md).
   2. Copy the **`demisto.lic`** file from **`/usr/local/demisto`** to the shared directory.

      **`cp /usr/local/demisto/demisto.lic /<share>/var/lib/demisto`**
3. Modify **`/etc/demisto.conf`** to reference the shared file system, using the example below.
   1. The **`folders.lib`** key must point to the location of the shared file system.
   2. The **`folders.temp`** key must be local to the individual app server and not shared. To change the location of the temp directory, edit the **`folders.temp`** key in the \*\*`demisto.conf` \*\*file.

      ( Multi-tenant) - For a multi-tenant deployment, the **`folders.temp`** conf key must be updated per tenant on each host. The tenant conf file can be found at **` /usr/local/demisto/tenants/acc_{`` `` `*****`tenant_name`*****`}/server.conf`**
   3. Add or modify the license key at the end of **`/etc/demisto.conf`**.

      ```screen
        "folders": {
                     "lib": "/<share>/var/lib/demisto",
                     "temp": "/var/lib/demisto/temp"
             },
             "license": {
                     "file": {
                             "path": "/<shared>/var/lib/demisto"
                     }
             },
          
          
          
      ```
4. Start the service on the first Cortex XSOAR app server.
5. Verify that you see the shared folder **`/<share>/var/lib/demisto`**

   **`ls -lh /<share>/var/lib/demisto`**

**Validate Additional App Servers**

After adding application servers to your high availability deployment, we recommend verifying that each application server has the correct configuration.

1. Verify the shared file system was created and is owned by demisto user.

   **`sudo ls -lh /<shared>/var/lib/demisto`**

   Modify path as needed if you mounted the shared filed system at another location.

   Confirm you see folders for artifacts, images, systemTools, etc.
2. Verify that the temp folder on the new application server contains folders for tempSystemContent, script directories, etc.

   **`ls -lh /var/lib/demisto/temp`**

   Modify path as needed if you choose a different temp folder location.

   Temp folder must be owned by **`demisto:demisto`**
3. Verify that the Cortex XSOAR license file is in the shared file system folder. If not, upload the file.

   Applies only to first application server.
4. Validate the **`/etc/demisto.conf`** files are the same across all application servers.

   Only the **`AppID`** and **`InClusterHostName`** keys should be different per application server.
5. Log in to the new Cortex XSOAR app server **`https://<`*****`app server`*****`>`**.
6. Install the [Elasticsearch Monitoring](https://xsoar.pan.dev/marketplace/details/ElasticsearchMonitoring) content pack and validate you can view the **Elasticsearch Monitoring** dashboard to check Elasticsearch indexes for shards, replicas, and cluster status.

   Applies only to first application server.
7. Go to Settings → Advanced → **App Servers**.

   Confirm that two or more application servers are showing online.
8. Create a new incident and verify you can view the incident across all application servers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.12/onboard-cortex-xsoar/onboarding-in-cortex-xsoar/high-availability/install-additional-app-servers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
