Actions88
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Network Actions
- Volume Actions
- Swarm Actions
- Node Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
Overview
This node enables interaction with Docker through the Portainer API, specifically focusing on managing Docker Swarm clusters. The "Swarm Unlock" operation allows users to unlock a locked Docker Swarm manager node by sending an unlock key or relevant data to the specified endpoint.
Common scenarios for this node include:
- Automating Docker Swarm management tasks within workflows.
- Unlocking a Docker Swarm manager after a restart or failure recovery.
- Integrating Docker Swarm operations into CI/CD pipelines or infrastructure automation.
For example, after a Docker Swarm manager node restarts and becomes locked, this node can be used to programmatically send the unlock key to restore cluster functionality without manual intervention.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | Selects the Docker endpoint (Portainer environment) to target. Can choose from a list or specify an ID via expression. |
| Body | The raw string content sent as the request body to unlock the Swarm. This typically contains the unlock key or related data required by the API. |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to unlock the Docker Swarm. This output typically includes status information about the unlock operation, such as success confirmation or error details.
No binary data output is involved in this operation.
Dependencies
- Requires access to a Portainer instance with the Docker endpoints configured.
- Needs an API authentication token or API key credential to authenticate requests against the Portainer API.
- The node uses the Portainer API endpoint
/api/endpoints/{endpointId}/docker/swarm/unlock(implied by context) to perform the unlock operation. - The user must configure the base URL of the Portainer API and provide valid credentials in n8n.
Troubleshooting
- Invalid EndpointID: If the selected endpoint ID does not exist or is incorrect, the node will fail to connect. Ensure the endpoint is correctly selected or specified.
- Authentication Errors: Missing or invalid API credentials will cause authorization failures. Verify that the API key or token is correct and has sufficient permissions.
- Incorrect Unlock Key: Providing an invalid or malformed unlock key in the Body property will result in an error from the API. Double-check the unlock key format and content.
- Network Issues: Connectivity problems between n8n and the Portainer server can cause timeouts or connection errors.
- API Changes: If the Portainer API changes its endpoint paths or expected payloads, the node may stop working until updated.