> 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

Enable debug mode and collect logs for CARTO Self-Hosted

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

## Enable debug mode

{% tabs %}
{% tab title="Kots" %} <img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-9eca52f0d85c9aacba5a62150e03b4faee188bd8%2Ftool-kots.svg?alt=media" 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="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-65a3deb4ec4ccb87e6e0edb18fe2b60e0ede7111%2FScreenshot%202024-03-11%20at%2016.58.11.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Helm" %} <img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-ba881227fa0a4e04d6d1ddbe193d0e0de6876521%2Ftool-helm.svg?alt=media" 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 %}

Debug mode only takes effect once the change is deployed. See [Apply configuration changes](/carto-self-hosted/operations/upgrades/apply-configuration-changes.md) (**Save config** and **Deploy** in the Admin Console, or `helm upgrade` for Helm). It only affects logs written after the deploy, so if you're gathering information for Support, reproduce the issue once the deploy has finished. See [Get debug information for support](/carto-self-hosted/operations/troubleshooting/get-debug-information-for-support.md).

## 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="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-ba881227fa0a4e04d6d1ddbe193d0e0de6876521%2Ftool-helm.svg?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.carto.com/carto-self-hosted/operations/troubleshooting/debug-mode-and-logs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
