Claw Stack Manager
Manage the claw Docker stack via Portainer API.
How it works
| Mode | What it does | Resource impact |
|---|---|---|
update | Pull image → create one-shot redeployer container → redeployer stops/starts stack | 0 (container exits after) |
restart | Restart Gateway via Portainer container API | 0 (process restart) |
pull-only | Pull latest image | 0 (API call) |
The key insight: a one-shot container (created via Portainer API from inside the claw container) runs independently to stop/start the stack. The API call creating it completes before the stack is affected.
Usage
# Pull new image + redeploy
python3 {{SKILL_DIR}}/scripts/manage.py --mode update
# Restart Gateway (no image change)
python3 {{SKILL_DIR}}/scripts/manage.py --mode restart
# Just pull image
python3 {{SKILL_DIR}}/scripts/manage.py --mode pull-only
Environment variables
PORTAINER_API_KEY— requiredPORTAINER_URL(default:http://docker.nas.liyj.cn:2082)PORTAINER_ENDPOINT(default:2)CLAW_IMAGE(default:liyujiang/openclaw:latest)