> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-self-hosted/operations/troubleshooting/debug-mode-and-logs.md).

# Debug mode and logs

Debug mode in CARTO allows you to gather additional information for troubleshooting and diagnosing issues.

## Enable debug mode

{% tabs %}
{% tab title="Kots" %} <img src="/files/iX0yYSxrIcdJH0mbRf9w" alt="Kots" width="18">

To enable debug mode, enable the Debug Mode option in the configuration of your CARTO Self-Hosted platform through the Admin Console.

<figure><img src="/files/xInqo5DPLcXvXTYMpIcw" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Helm" %} <img src="/files/5mQydBQdQ20MZUxbcOKQ" alt="Helm" width="18">

Update your <mark style="color:orange;">customizations.yaml</mark> file and apply the changes:

<details>

<summary>CARTO SH Version 2025.1.10 or newer</summary>

```yaml
appConfigValues:
  logLevel: "debug"
```

</details>

<details>

<summary>CARTO Self-Hosted version 2024.12.10 or older</summary>

```yaml
importApi:
  extraEnvVars:
    - name: CARTO_TRACING_MODE
      value: "local"

importWorker:
  extraEnvVars:
    - name: CARTO_TRACING_MODE
      value: "local"

ldsApi:
  extraEnvVars:
    - name: CARTO_TRACING_MODE
      value: "local"

mapsApi:
  extraEnvVars:
    - name: CARTO_TRACING_MODE
      value: "local"

workspaceApi:
  extraEnvVars:
    - name: CARTO_TRACING_MODE
      value: "local"

workspaceSubscriber:
  extraEnvVars:
    - name: CARTO_TRACING_MODE
      value: "local"
```

</details>
{% endtab %}
{% endtabs %}

## Collecting logs

To collect logs from your CARTO Self-Hosted deployment:

{% tabs %}
{% tab title="Kots (Single VM)" %}

1. Open a terminal.
2. Navigate to your CARTO Self-Hosted installation directory.
3. Run the following command to start a shell with permissions to check the logs:

   ```bash
   ./carto shell
   ```
4. Check the logs of each container:

   ```bash
   kubectl logs -f <service_name> -n kotsadm
   ```

{% endtab %}

{% tab title="Kots (Kubernetes)" %}

1. Open a terminal or use your preferred Kubernetes management tool.
2. Check the logs of each container:

   ```bash
   kubectl logs -f <service_name> -n <namespace>
   ```

{% endtab %}

{% tab title="Helm" %} <img src="/files/5mQydBQdQ20MZUxbcOKQ" alt="Helm" width="18">

1. Open a terminal or use your preferred Kubernetes management tool.
2. Check the logs of each container:

   ```bash
   kubectl logs -f <service_name> -n <namespace>
   ```

{% endtab %}
{% endtabs %}


---

# 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://docs.carto.com/carto-self-hosted/operations/troubleshooting/debug-mode-and-logs.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.
