> 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/cortex-xsoar-6-multi-tenant-guides/6.13/onboard-multi-tenant/multi-tenant-deployment-installation/install-cortex-xsoar-for-a-multi-tenant-deployment-with-elasticsearch.md).

# Install Cortex XSOAR for a Multi-Tenant Deployment with Elasticsearch

Ensure you run all commands as root user.

The following files and folders created during the multi-tenant installation.

| File/Folder   | Path                                                                                        |
| ------------- | ------------------------------------------------------------------------------------------- |
| Binaries      | **`/usr/local/demisto`**                                                                    |
| Data          | **`/var/lib/demisto`**                                                                      |
| Logs          | **`/var/log/demisto`**                                                                      |
| Configuration | **`/etc/demisto.conf (this is not created if defaults are selected during installation).`** |

1. Download the server package you received from Cortex XSOAR support.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><h3>Note</h3><p>When you receive a link to download, ensure that the <strong><code>downloadLink</code></strong> link points to <strong><code>https://download.demisto.com</code></strong> and not <strong><code>https://download.demisto.works</code></strong>.</p><p>For example, <strong><code>wget -O demisto.sh “https://download.demisto.com/download-params?token=xabcedef&#x26;email=user@paloaltonetworks.com&#x26;eula=accept”</code></strong></p><p>To download the latest vendor affirmed FIPS version, append <strong><code>&#x26;downloadName=fips</code></strong>. For example, <strong><code>wget -O demisto.sh “https://download.demisto.com/download-params?token=xabcedef&#x26;email=user@paloaltonetworks.com&#x26;eula=accept&#x26;downloadName=fips”</code></strong></p></div>
2. Run the **`chmod +x demisto.sh`** to make the server package executable.
3. To install the app server with Elasticsearch, run one of the following commands:

   * If using username and password authentication: **`sudo ./demisto.sh -- -multi-tenant -elasticsearch-url=<elastic search url address> -elasticsearch-username=<the elasticsearch user name> -elasticsearch-password=<the elasticsearch password>`**
   * If using API key authentication: **`sudo ./demisto.sh -- -multi-tenant -elasticsearch-url=<elastic search url address> -elasticsearch-api-key=<the elasticsearch API key>`**

   | Flag                      | Type    | Description                                                                                                                                                                                                                                     |
   | ------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | `-multi-tenant`           | String  | Indicates that the installation is for a Multi-tenant deployment.                                                                                                                                                                               |
   | `-elasticsearch-url`      | String  | Elasticsearch URL addresses (comma-separated). For example, `http://test1:9200,http://test2:9200`                                                                                                                                               |
   | `-elasticsearch-api-key`  | String  | <p>The Elasticsearch API key, which should be used in licensed versions.</p><p><strong>Note:</strong> If you use this flag, you do not need to use the <code>-elasticsearch-username</code> and <code>-elasticsearch-password</code> flags.</p> |
   | `-elasticsearch-username` | String  | <p>The Elasticsearch username. This flag is used with the <code>-elasticsearch-password</code> flag.</p><p><strong>Note:</strong> If you use this flag, you do not need to use the <code>-elasticsearch-api-key</code> flag.</p>                |
   | `-elasticsearch-password` | String  | <p>The Elasticsearch password. This flag is used with the <code>-elasticsearch-username</code> flag.</p><p><strong>Note:</strong> If you use this flag, you do not need to use the <code>-elasticsearch-api-key</code> flag.</p>                |
   | `-elasticsearch-proxy`    | Boolean | Whether to use a proxy when communicating with Elasticsearch. Can be **`true`** or **`false`**. Default is **`false`**.                                                                                                                         |
   | `-elasticsearch-insecure` | Boolean | Whether to trust any certificate when communicating with Elasticsearch. Can be **`true`** or **`false`**. Default is **`true`**.                                                                                                                |
   | `-elasticsearch-timeout`  | Integer | The amount of time (in seconds) before Elasticsearch times out. Default is 20 seconds.                                                                                                                                                          |

   To continue with a high availability configuration, you must [install an additional app server](/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/high-availability/install-additional-app-servers.md).


---

# 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/cortex-xsoar-6-multi-tenant-guides/6.13/onboard-multi-tenant/multi-tenant-deployment-installation/install-cortex-xsoar-for-a-multi-tenant-deployment-with-elasticsearch.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.
