# Deploy a stack

Portainer lets you deploy an entire stack from either a default template or a custom template.

{% hint style="info" %}
You can also [create a template from a stack](/user/docker/stacks/template.md).
{% endhint %}

From the menu expand **Templates**, select **Application** or **Custom** (depending on the template) then select the template you want to deploy. In this example we'll create a WordPress stack.

<figure><img src="/files/ByiOBR5qeFGuP07agBf4" alt=""><figcaption></figcaption></figure>

Enter a name for the stack and set any required configuration values (these will differ from template to template). Toggle **Enable access control** on or off as required.

<figure><img src="/files/2JHe5QjE9l1uZM5XRset" alt=""><figcaption></figcaption></figure>

Click **Deploy the stack** then wait for the deployment to finish. If the deployment is successful, the new stack will appear in the list. Select it to view the [deployment details](/user/docker/stacks/edit.md).

<figure><img src="/files/btOlhj4wzEbMB6nZ7QfK" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.portainer.io/user/docker/templates/deploy-stack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
