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

# Install Multi-Tenant with Elasticsearch

Install Cortex XSOAR 6.15 for multi-tenant deployments 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" %}
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.15/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.15/cortex-xsoar-installation-guide/single-server-installation/install-cortex-xsoar-with-elasticsearch/elasticsearch-installation.md#UUID-2ea9136d-92b6-723f-5374-82ff08d71121).

1. Download the server package you received from Cortex Gateway.
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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xsoar-6-installation-guides/6.15/cortex-xsoar-installation-guide/multi-tenant-installation/install-multi-tenant-with-elasticsearch.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
