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

# Install a Cortex XSOAR Engine

Before you install the engine, you need to define the base URL in the **Settings** page so the engine can communicate with the server. The base URL is the external IP address of your Cortex XSOAR server. If you do not define the base URL, you need to add it to the **`d1.conf`** file after you create the engine.

When you install the engine, the `d1.config` is installed on the engine machine, which contains engine properties such as proxy, log level, log files, etc. If Docker/Podman is already installed, the **`python.engine.docker`** and **`powershell.engine.docker`** key is set to **`true`**. If Docker or Podman is not available when the engine is installed, the key is set to **`false`**. If so, you need to set the key to **`true`**. Verify that **`python.engine.docker`** and **`powershell.engine.docker`** configuration key is present in the **`d1.conf`** file.

For engines running on a Windows machine, add the following keys to the `d1.config` file:

* The **`python.runner.loop.script.path`** configuration key with the path to the **`_script_docker_python_loop.py`** file (located in the engine’s installation folder). The path to the **`_script_docker_python_loop.py`** must be taken from WSL installed on the Windows machine (for example, **`/mnt/c/Users/<customer user>/Desktop/<customer engine folder>/_script_docker_python_loop.py`**).
* The **`powershell.runner.loop.script.path`** configuration key with the WSL path to the **`_script_docker_powershell_loop.ps1`** file (also located in engine’s installation folder).

After you install and deploy an engine, there are several ways that you can [Manage Engines](/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/engines/manage-engines.md). For Linux systems, you can run Python integrations on an engine. Ensure you have Python 2.7 or later installed on the engine machine. Running Python integrations needs to be through Docker.

1. Define the base URL.
   1. Go to Settings → About → **Troubleshooting**.
   2. From the **Server Configuration** section, in the **Base URL (for D2 Agents and Engines)** type the Base URL.

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

      <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><h3>Tip</h3><p>We recommend using the FQDN (fully qualified domain name). If the engine does not have an external address, the IP address can be used instead of the FQDN. For high availability environments or multi-tenant deployments, the FQDN should always be used.</p></div>
2. Create an engine.
   1. Select Settings → Integrations → Engines → **Create New Engine**.
   2. In the **Engine Name** field, add a meaningful name for the engine.
   3. Select one of the installer types from the dropdown list.

      For Linux systems it is recommended to use the Shell installer.
   4. (Optional) (Shell only) Select the checkbox to enable multiple engines to run on the same machine.

      If you have an existing engine, you did not select the checkbox, and you want to install another engine on the same machine, you need to delete the existing engine.
   5. (Optional) Add any required configuration in JSON format.
   6. Click **Create New Engine**.
3. For Shell installation, do the following:
   1. Move the `.sh` file to the engine machine using a tool like SSH or PuTTY.
   2. On the engine machine, grant execution permission by running the following command:

      **`chmod +x <engine-file-path>`**
   3. Install the engine by typing one of the following 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, it is likely that you do not have permission to access the **`/tmp`** directory.
4. For RPM/DEB installation do the following:
   1. Move the file to the required machine using a tool like SSH or PuTTY.
   2. Type one of the following installation commands:

      | Machine Type | Install Command                            |
      | ------------ | ------------------------------------------ |
      | Ubuntu (DEB) | **`sudo dpkg --install d1_xxx_amd64.deb`** |
   3. Start the engine by running one of the following commands:

      | Machine Type | Start Command                 |
      | ------------ | ----------------------------- |
      | Ubuntu (DEB) | **`sudo service d1 restart`** |
5. For zip file installation, do the following.
   1. Move the d1 `zip` file to the engine machine using a tool like [WinSCP](https://winscp.net/eng/download.php).
   2. Unzip the file and move it to any location you require.
   3. Open the file and run the d1\_windows\_amd64.exe file.

      Every time you want to connect to Cortex XSOAR you need to run the D1 Application file.
6. [Use an Engine in an Integration](/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/engines/use-an-engine-in-an-integration.md).
7. (Optional) If you experience performance issues you may need to [Configure the Number of Workers for the Server](/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/engines/configure-engines.md#UUID-e6e02e4b-7a68-c965-2993-a94f911ba747). To troubleshoot installation, upgrade, connectivity, or issues with integrations, see [Troubleshoot Cortex XSOAR Engines](/xsoar-6-administrator-guide/6.14/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.14/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.
