> For the complete documentation index, see [llms.txt](https://docs.helmut.de/helmut4-releases/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.helmut.de/helmut4-releases/support/debug-or-log-collection/helmut4-server/stack-already-exists.md).

# Stack already exists

If you encounter an error message from Portainer stating that a stack with the specified or normalized name 'helmut4' already exists, you might need to address the issue on the server-side.

<figure><img src="/files/CMQ8nkfOPYGzj6CBFxT8" alt=""><figcaption><p>A stack with the name helmut4 already exists</p></figcaption></figure>

This issue can arise if Portainer running version 2.9 or earlier has been upgraded to a newer version. In previous versions, it was permissible to create stacks with uppercase letters, such as "Helmut4." However, this functionality has been modified, and only lowercase characters are now permitted, resulting in the name "helmut4."

{% hint style="danger" %}
**Please exercise caution, as the following steps may result in data loss, corruption, or other unexpected issues.**

Proceed only if you are thoroughly acquainted with the task and are fully aware of the potential risks.

MoovIT cannot be held liable for any damage caused by customer error.

Consult our [support team](/helmut4-releases/support/requesting-support.md) if you require assistance in carrying out this procedure.
{% endhint %}

If the matching stack is not visible in the GUI, it is necessary to connect to the host and delete the stack from there.

Establish an SSH or terminal connection to the server and utilize sudo privileges to perform the necessary actions.

{% hint style="info" %}
Before proceeding with the following commands, ensure that the httpie and jq utilities are installed on your system.

For detailed installation instructions, please refer to the [Helmut4 installation guide](/helmut4-releases/getting-started/installation-guide/helmut4-server/helmut4-single-server.md#installation).
{% endhint %}

### Connect to Portainer and list 'helmut4' stack

```bash
# Set portainer port
PORTAINER_PORT=9000

# Get JWT token - replace the PASSWORD
JWT=$(http POST :${PORTAINER_PORT}/api/auth Username="admin" Password="admin" | jq -r '.jwt')

# Request stacks with name helmut4 or Helmut4
http --verify=no --form GET :${PORTAINER_PORT}/api/stacks X-API-Key: "Authorization: Bearer ${JWT}" | jq '.[] | select(.Name | ascii_downcase == "helmut4")'
```

The last command should return a response similar to the screenshot below. Verify if the name is 'helmut4' and jot down the ID and EndpointID before proceeding further.

<figure><img src="/files/fAZWLyMkiIcg84N6QVpG" alt=""><figcaption><p>helmut4 stack with ID &#x26; EndpointID</p></figcaption></figure>

### List all available stacks (optional)

If the expected 'helmut4' stack is not present, list all active stacks using the following command:

```bash
# List all available stacks
http --verify=no --form GET :${PORTAINER_PORT}/api/stacks X-API-Key: "Authorization: Bearer ${JWT}"
```

### Delete stack by ID & EndpointID

To delete the dedicated 'helmut4' stack, you need the ID & EndpointID. Please replace those in the given command below to match your environment.

<pre class="language-bash"><code class="lang-bash"># Delete stack
http --verify=no --form DELETE :${PORTAINER_PORT}/api/stacks/<a data-footnote-ref href="#user-content-fn-1">1</a>?endpointId=<a data-footnote-ref href="#user-content-fn-2">1</a> X-API-Key: "Authorization: Bearer ${JWT}"
</code></pre>

You can confirm the success of the command by reattempting to list the "helmut4" stack.\
If the command was successful, you should not see any output in the terminal.

<figure><img src="/files/JIeP4kii8AEInovPFO89" alt=""><figcaption><p>Delete helmut4 stack</p></figcaption></figure>

[^1]: ID

[^2]: Endpoint ID


---

# 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.helmut.de/helmut4-releases/support/debug-or-log-collection/helmut4-server/stack-already-exists.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.
