Portainer icon

Portainer

Interact with Portainer via API

Actions190

Stacks → Stack Create Docker Standalone String

AI-generated

Overview

This node allows you to create a Docker standalone stack in Portainer by sending a raw stack configuration string. It is useful for automating the deployment of Docker stacks on specific environments managed by Portainer, especially when you have the stack configuration as a plain text string (e.g., a Docker Compose YAML content). Typical use cases include continuous deployment pipelines, infrastructure automation, or managing multiple Docker environments programmatically.

Properties

Name Meaning
Endpoint Id Identifier of the environment where the stack will be deployed. This selects the target Docker environment within Portainer.
Body The stack configuration as a raw string. This should contain the full stack definition (e.g., Docker Compose YAML) to deploy.

Output

The node outputs JSON data representing the response from the Portainer API after attempting to create the stack. This typically includes details about the created stack such as its ID, name, and status. There is no binary output.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • Needs the base URL of the Portainer instance configured in the credentials.
  • Depends on the Portainer API being accessible and the specified endpoint/environment existing.

Troubleshooting

  • Invalid Endpoint Id: If the provided environment identifier does not exist or is incorrect, the API call will fail. Verify the environment ID in Portainer.
  • Malformed Stack Configuration: If the stack config string is invalid or improperly formatted, the stack creation will fail. Ensure the body contains valid Docker Compose YAML or compatible stack definition.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Confirm that the API key and URL are correctly set in the node credentials.
  • API Connectivity Issues: Network problems or incorrect Portainer URL can prevent communication. Check network access and URL correctness.

Links and References

Discussion