ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

pm2

Manage Node.js applications with PM2 process manager. Use for deploying, monitoring, and auto-restarting Node apps in production. Covers starting apps, viewing logs, setting up auto-start on boot, and managing multiple processes.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/asteinberger/pm2
Or

What This Skill Does

The PM2 skill provides a robust interface for OpenClaw to manage Node.js applications within a server environment. It acts as an abstraction layer over the PM2 process manager, allowing the AI to start, stop, restart, reload, and monitor Node.js processes seamlessly. By leveraging this skill, the AI can ensure high availability for web services, handle production deployments, and manage resource limits through cluster mode and automatic restarts. It enables the AI to act as a sysadmin, maintaining uptime for backend services without requiring manual intervention.

Installation

To integrate this skill into your OpenClaw agent, execute the following command in your terminal: clawhub install openclaw/skills/skills/asteinberger/pm2 Ensure that Node.js and npm are pre-installed on the target system, as the skill depends on the global PM2 package (npm install -g pm2).

Use Cases

  • Production Deployment: Automatically trigger application starts after pulling new code from a repository.
  • Process Monitoring: The AI can proactively check the status of critical services, interpret logs, and identify bottlenecks using pm2 monit or pm2 logs.
  • Zero-Downtime Updates: Utilize pm2 reload to deploy changes to production environments without dropping active user connections.
  • Self-Healing Infrastructure: Configure auto-restart policies on memory thresholds or system reboots to ensure consistent service uptime.

Example Prompts

  1. "OpenClaw, list all running processes and show me the last 50 lines of logs for the 'auth-service' app."
  2. "I've updated the codebase for 'api-server'. Please restart the process using PM2 to apply the changes."
  3. "My Node.js app is crashing due to memory issues. Can you configure PM2 to restart the process whenever it exceeds 500MB of RAM?"

Tips & Limitations

  • Environment Variables: When using PM2, remember that process environment variables set via shell might not persist after a system reboot unless saved in an ecosystem.config.js file.
  • Permissions: PM2 operations often require specific system permissions. Ensure the user running OpenClaw has sufficient privileges to manage PM2 daemons and execute startup scripts.
  • Resource Management: While cluster mode (-i max) is excellent for scaling, avoid over-allocating CPU cores if the server is running other critical background tasks simultaneously.
  • Cleanup: Regularly audit the PM2 process list to delete stale or failed deployments to prevent memory leaks and confusion.

Metadata

Stars4473
Views7
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-asteinberger-pm2": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#node#pm2#devops#server#process-manager
Safety Score: 3/5

Flags: file-write, file-read, code-execution