> 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.12/onboard-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-hardening-guide/run-docker-with-non-root-internal-users.md).

# Run Docker with Non-Root Internal Users

For additional security isolation, we recommend running Docker containers as non-root internal users. This follows the principle of least privilege.

1. Configure Cortex XSOAR Server to execute containers as non-root internal users.
   1. Select Settings → About → Troubleshooting → **Add Server Configuration**.
   2. Add the following:

      | Key                              | Value      |
      | -------------------------------- | ---------- |
      | **`docker.run.internal.asuser`** | **`true`** |
   3. Click **Save**.
   4. Reset the running containers using one of the following methods:

      From the Cortex XSOAR CLI, type the following command.

      **`/reset_containers`**

      Alternatively, restart the Cortex XSOAR Server.
   5. From the Cortex XSOAR CLI, type the following command to check if the container is running as a non-root internal user:

      **`!py script="import os;print(os.getuid())"`**

      If the server configuration was added successfully and the container is running with a non-root internal user, the output is a non-zero UID.

      ![docker-config.png](/files/SwCjILV4Nm5B2L7Ua88n)

      If the server configuration was not configured correctly and the container is running with an internal root user, the output is **`0`**.
2. Configure exceptions for containers that do not support non-root internal users.
   1. Select Settings → About → Troubleshooting → **Add Server Configuration**.
   2. Add the following:

      | Key                                     | Value                                                                                                                           |
      | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
      | **`docker.run.internal.asuser.ignore`** | A CSV list of container names. The Cortex XSOAR server matches the container names according to the prefixes of the key values. |

      For example, **`docker.run.internal.asuser.ignore=demisto/python3:,demisto/python:`**

      The Cortex XSOAR server matches the key values for the following containers:

      demisto/python:1.3-alpine

      demisto/python:2.7.16.373

      demisto/python3:3.7.3.928

      demisto/python3:3.7.4.977

      The **`:`** character should be used to limit the match to the full name of the container. For example, using the **`:`** character does not find **`demisto/python-deb:2.7.16.373`**.


---

# 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.12/onboard-cortex-xsoar/onboarding-in-cortex-xsoar/docker/docker-hardening-guide/run-docker-with-non-root-internal-users.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.
