> 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-installation-guides/6.13/cortex-xsoar-installation-guide/multi-tenant-installation/install-multi-tenant-with-elasticsearch.md).

# Install Multi-Tenant with Elasticsearch

Ensure the following:

* Run all commands as the root user.
* If you are installing on an Oracle Linux operating system, manually [Install Docker](/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/docker/docker-installation.md).

{% hint style="info" %}

### Note

Multi-tenant deployments are only intended for MSSPs and certain enterprise use cases. If you are not an MSSP and want to deploy a multi-tenant environment, you must first consult with the Cortex XSOAR product management team. If you deploy a multi-tenant environment without approval from the product management team, Cortex XSOAR will not support the deployment.
{% endhint %}

**Installation File Structure**

For information about the default installation file structure, see [Installation File Structure](/cortex-xsoar-6-installation-guides/6.13/cortex-xsoar-installation-guide/single-server-installation/install-cortex-xsoar-with-bolt-database.md).

**Installer Flags**

For the list of supported installer flags, see [Elasticsearch Installer Flags](/cortex-xsoar-6-installation-guides/6.13/cortex-xsoar-installation-guide/single-server-installation/install-cortex-xsoar-with-elasticsearch/elasticsearch-installation.md#UUID-e77b11a2-d762-6f7e-c5df-d98a264b9da4).

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 refers 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 Multi-tenant.                                                                                                                                                                                            |
   | `-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.                                                                                                                                                          |


---

# 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-installation-guides/6.13/cortex-xsoar-installation-guide/multi-tenant-installation/install-multi-tenant-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.
