> 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-8-on-prem/8.8/configure-cortex-xsoar/engines/upgrade-an-engine.md).

# Upgrade an engine

Whenever there is a Cortex XSOAR major version change or a change in tenant-engine protocol version, your engines require an upgrade. On the **Engines** page, the **Status** column shows those engines that require upgrades. You can upgrade an engine by doing the following:

* If you installed the engine using the Shell installer, you can upgrade the engine on the **Engines** page.
* If you didn't install the engine using the Shell installer, you need to remove the engine and do a fresh install.

#### Upgrade an engine (Shell installations)

You can upgrade the engine on the **Engines** page if you have installed the engine using the Shell installer.

{% hint style="info" %}

### Note

The Engine needs to be connected.
{% endhint %}

1. On the **Engines** page, select the checkbox for the engine that requires an upgrade.
2. Click **Upgrade Engine**.

   When the upgrade finishes, the version appears in the **Cortex XSOAR Version** column. The upgrade procedure can take several minutes.

#### Upgrade an engine (non-shell installations)

If you didn't use the Shell installer, you need to remove the engine and do a fresh install.

1. On the **Engines** page, locate the engine that requires an update.
2. In the Download link, click relevant Download files.
3. On the remote machine, do the following:

   * Remove the existing engine. For more information, see [Remove an engine](/cortex-xsoar-8-on-prem/8.8/configure-cortex-xsoar/engines/remove-an-engine.md).
   * Install the engine you downloaded in step 2. For more information, see [Install an engine](/cortex-xsoar-8-on-prem/8.8/configure-cortex-xsoar/engines/install-an-engine.md).

   When the upgrade finishes, the version appears in the **Cortex XSOAR Version** column. The upgrade procedure can take several minutes.

For troubleshooting, see [Troubleshoot engine upgrades](/cortex-xsoar-8-on-prem/8.8/configure-cortex-xsoar/engines/troubleshoot-engines.md#troubleshoot-engine-upgrades).

{% hint style="info" %}

### Note

By default, auto-upgrade extracts the files to the **`/tmp`** directory. In some cases, you might need to use a different directory. For example, a common use case is if your **`/tmp`** directory is mounted as a non-executable directory. To use a different directory, edit the **`XSOAR_ENGINE_AUTO_UPGRADE_TMP_DIR`** env variable. The env variable can be specified as a global variable or can be edited in the crontab of the root user that runs the engine upgrade script. To edit the crontab of root, run **`sudo crontab -e`**. For example:

```programlisting
# d1 engine
XSOAR_ENGINE_AUTO_UPGRADE_TMP_DIR=/root/tmp
PATH=/sbin:/bin:/usr/sbin:/usr/bin
* * * * * /usr/local/demisto/upgrade_engine.sh >> /var/log/demisto/demisto_install.log
```

{% endhint %}


---

# 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-8-on-prem/8.8/configure-cortex-xsoar/engines/upgrade-an-engine.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.
