> 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/xsoar-6-administrator-guide/6.13/onboard-cortex-xsoar/engines/engine-installation/install-a-cortex-xsoar-engine.md).

# Install a Cortex XSOAR Engine

Install an engine in Cortex XSOAR 6.13.

Before installing an engine, define the base URL in **Settings**. The engine uses this URL to communicate with the Cortex XSOAR server. The base URL is the external IP address of the server. If you do not define it, add it to `d1.conf` after creating the engine.

The engine installation creates `d1.config` on the engine machine. This file contains engine properties, including proxy settings, log levels, and log files. If Docker or Podman is installed, `python.engine.docker` and `powershell.engine.docker` are set to `true`. Otherwise, they are set to `false`. Set both keys to `true` after installing Docker or Podman. Verify that both keys exist in `d1.conf`.

For an engine on Windows, add these keys to `d1.config`:

* Add `python.runner.loop.script.path` with the WSL path to `_script_docker_python_loop.py`. The file is in the engine installation folder. For example, `/mnt/c/Users/<customer user>/Desktop/<customer engine folder>/_script_docker_python_loop.py`.
* Add `powershell.runner.loop.script.path` with the WSL path to `_script_docker_powershell_loop.ps1`. The file is in the engine installation folder.

After installing and deploying an engine, see [Manage Engines](/xsoar-6-administrator-guide/6.13/onboard-cortex-xsoar/engines/manage-engines.md). Linux engines can run Python integrations. Install Python 2.7 or later. Run Python integrations through Docker.

{% stepper %}
{% step %}

### Define the base URL

1. Go to **Settings** → **About** → **Troubleshooting**.
2. In **Server Configuration**, enter the URL in **Base URL (for D2 Agents and Engines)**.

For example, enter `eu-west-1.compute.amazonaws.com` for `https://ec2-54-228-48-128.eu-west-1.compute.amazonaws.com/`.

{% hint style="info" %}
Use a fully qualified domain name (FQDN). Use an IP address only when the engine has no external address. High availability and multi-tenant deployments must use an FQDN.
{% endhint %}
{% endstep %}

{% step %}

### Create an engine

1. Select **Settings** → **Integrations** → **Engines** → **Create New Engine**.
2. Enter a name in **Engine Name**.
3. Select an installer type.

   Use the Shell installer for Linux systems.
4. Optional: Select the checkbox to run multiple Shell engines on one machine.

   Delete an existing engine before adding another without this selection.
5. Optional: Add required configuration in JSON format.
6. Select **Create New Engine**.
   {% endstep %}

{% step %}

### Install the engine with the Shell installer

1. Move the `.sh` file to the engine machine using SSH or PuTTY.
2. Run `chmod +x <engine-file-path>`.
3. Run one of these commands:

   With tools: `sudo ./d1-<engine-name>-<XSOAR-version>-xxxxxxx.sh`

   Without tools: `sudo ./d1-<engine-name>-<XSOAR-version>-xxxxxxx.sh -- -tools=false`

   For example: `sudo ./d1-engine1-6.6-2458567.sh -- -tools=false`

If you receive a `permissions denied` error, verify access to `/tmp`.
{% endstep %}

{% step %}

### Install the engine with an RPM or DEB package

1. Move the package to the engine machine using SSH or PuTTY.
2. Run the installation command:

   | Machine type | Install command                        |
   | ------------ | -------------------------------------- |
   | Ubuntu (DEB) | `sudo dpkg --install d1_xxx_amd64.deb` |
3. Start the engine:

   | Machine type | Start command             |
   | ------------ | ------------------------- |
   | Ubuntu (DEB) | `sudo service d1 restart` |

{% endstep %}

{% step %}

### Install the engine from a ZIP file

1. Move the `d1` ZIP file to the engine machine using [WinSCP](https://winscp.net/eng/download.php).
2. Extract the file to the required location.
3. Run `d1_windows_amd64.exe`.

Run the D1 Application file each time you connect to Cortex XSOAR.
{% endstep %}

{% step %}

### Use the engine in an integration

Configure the engine for an integration. See [Use an Engine in an Integration](/xsoar-6-administrator-guide/6.13/onboard-cortex-xsoar/engines/use-an-engine-in-an-integration.md).
{% endstep %}
{% endstepper %}

### Troubleshooting

If performance issues occur, see [Configure the Number of Workers for the Server](/xsoar-6-administrator-guide/6.13/onboard-cortex-xsoar/engines/configure-engines/configure-the-number-of-workers-for-the-server.md). For installation, upgrade, connectivity, or integration issues, see [Troubleshoot Cortex XSOAR Engines](/xsoar-6-administrator-guide/6.13/onboard-cortex-xsoar/engines/troubleshoot-cortex-xsoar-engines.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/xsoar-6-administrator-guide/6.13/onboard-cortex-xsoar/engines/engine-installation/install-a-cortex-xsoar-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.
