Portainer for Openclaw

Manage Docker infrastructure and git-based stacks through the Portainer REST API using simple CLI commands or AI agent interactions.

asteinberger
v1.0.0
Jan 25, 2026
3
4.6k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install portainer

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install portainer using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Portainer?

The Portainer skill provides a robust interface for managing Docker containers and stacks directly through Portainer's REST API. By integrating this capability into Openclaw Skills, developers can automate infrastructure tasks that usually require manual navigation of a web UI. It enables seamless control over container lifecycles, environment monitoring, and deployment workflows.

This skill is designed for developers and sysadmins who want to bring infrastructure management into their AI-driven development environment. Whether you are running a local development setup or managing remote production clusters, this tool bridges the gap between your code and your running services by providing direct API access to your Portainer instance.

Portainer Use Cases

  • Automated redeploying of Docker Compose stacks after merging a PR by pulling the latest code from git.
  • Real-time debugging of containerized applications by fetching logs via AI agent commands.
  • Remote starting, stopping, or restarting of specific services across different Docker environments.
  • Quick auditing of system health and container status across multiple Portainer endpoints using Openclaw Skills.

How Portainer Works

  1. The skill establishes a secure connection to the Portainer REST API using a provided URL and API access token.
  2. It identifies available Docker environments (endpoints) and maps them to human-readable names and IDs.
  3. Upon receiving a command (like redeploy or restart), the skill sends a structured HTTP request to the Portainer server.
  4. For stack redeployments, it triggers Portainer to pull the latest git commit and update the associated containers automatically.
  5. The skill parses the JSON response from the API and returns formatted status updates or logs to the user interface.

Portainer Setup

To utilize this skill within the Openclaw Skills ecosystem, follow these configuration steps:

  1. Generate API Token: In your Portainer Web UI, go to My Account -> Access tokens and create a new token.
  2. Environment Configuration: Add your credentials to your configuration file (e.g., ~/.clawdbot/.env):
PORTAINER_URL=https://your-portainer-server:9443
PORTAINER_API_KEY=ptr_your_token_here
  1. System Dependencies: Ensure curl and jq are installed on your host system to enable API communication and data processing.

Portainer Data Schema & Taxonomy

The Portainer skill organizes data based on the Portainer API schema to ensure compatibility across environments:

Component Key Metadata Fields
Endpoints ID, Name, Status (online/offline), Environment Type
Containers Name, State (running/exited), Health Status, Uptime
Stacks ID, Name, Git Repository URL, Status (active/inactive), Last Update
Logs Container standard output and error streams (tailing support)

Portainer Advanced Features

  • Automatic git credential management for secure redeployments of private repository stacks.
  • Multi-endpoint support allowing the management of local and remote Docker environments simultaneously.
  • Flexible log retrieval with adjustable line counts for tailored debugging sessions.
  • Deep integration with Openclaw Skills allowing for natural language triggers like "Redeploy the website" or "Show me running containers."

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*