Actions72
- Image Actions
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Stack Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Overview
This node integrates with the Portainer API to manage Docker containers and other Docker-related resources. Specifically, the Container - Pause operation allows you to pause a running Docker container within a specified environment (endpoint). Pausing a container suspends all processes inside it without stopping or terminating the container, which can be useful for temporarily freeing up system resources or debugging.
Common scenarios:
- Temporarily pausing a container during maintenance or troubleshooting.
- Suspending resource-intensive containers without stopping them.
- Managing container lifecycle programmatically in automated workflows.
Practical example:
You have a web application running in a Docker container that occasionally needs to be paused during off-peak hours to save resources. Using this node, you can automate pausing the container at scheduled times and unpausing it later.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint where the container is running. |
| Container ID | The unique identifier of the Docker container to pause. |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to pause the container. This typically includes status information about the container or confirmation of the pause action.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Portainer instance with API access.
- Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
- The target environment (endpoint) must be accessible and properly configured in Portainer.
Troubleshooting
Common issues:
- Invalid or missing Environment ID or Container ID parameters.
- Insufficient permissions or invalid API key leading to authentication errors.
- Target container not found or already paused.
- Network connectivity issues between n8n and the Portainer server.
Error messages and resolutions:
- 401 Unauthorized: Check that the API key credential is correct and has sufficient permissions.
- 404 Not Found: Verify the Environment ID and Container ID are correct and exist in Portainer.
- 409 Conflict or similar: The container might already be paused; confirm container state before pausing.
- Network errors: Ensure the Portainer base URL is reachable from the n8n instance.