> 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.12/cortex-xsoar-installation-guide/post-installation-checklist/add-a-license.md).

# Add a License

There are two methods for saving the license file. You can perform either one of the following methods. You can view and download your license from the [Cortex Gateway](https://cortex-gateway.paloaltonetworks.com/accounts).

#### Upload the License File using Cortex XSOAR

1. Save the license file you received.
2. Select Settings → About → **License** → **Upload license**.
3. (Optional) Refresh the browser.
4. Upload the license file using Cortex XSOAR.

   **Alternative Method**

   Save the license file on the server.
5. (Multi-Tenant) For multi-tenant environments, the server must be restarted in order to create tenants.

   `sudo service demisto stop`

   `sudo service demisto start`

#### Save the License File on the Server

This method requires you to restart the server after saving the file. The path for the license file varies according to your installation.

* If you are using Elasticsearch as your database and did not upgrade from a previous version of Cortex XSOAR, the file is located in the `lib` directory. Default is `/var/lib/demisto/demisto.lic`.
* If you are using Elasticsearch and upgraded from a previous version of Cortex XSOAR or you are not using Elasticsearch, the default location of the license file is `/usr/local/demisto/demisto.lic`.
* For customers using a custom location, the path can be found in the `license.file.path` configuration key in the demisto configuration file. The default location of the configuration file is `/etc/demisto.conf`.

In a multi-tenant deployment, the license is only uploaded to the main account.

For High Availability deployments, once Cortex XSOAR is running, synchronize the license by restarting the demisto service on the additional app servers.

If using Live Backup, the production server and the backup server must have the same Cortex XSOAR license installed. When a new license is installed on the production server, the license is automatically synced with the backup server.


---

# 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.12/cortex-xsoar-installation-guide/post-installation-checklist/add-a-license.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.
