From provision-server
Provision a new Minion instance on a remote server. Handles the full lifecycle: SSH connectivity check, dry run, credential collection, setup execution, monitoring, verification, and server config registration. Use when deploying a new agent instance, setting up a dev environment on a VPS, or provisioning a new tenant.
How this skill is triggered — by the user, by Claude, or both
Slash command
/provision-server:provision-serverThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
End-to-end provisioning of Minion instances on remote servers using the setup framework
End-to-end provisioning of Minion instances on remote servers using the setup framework
at setup/setup.sh.
setup/setup.sh — orchestrates all phasessetup/phases/ — 00 through 70 (plus 95-decommission, 99-rollback)setup/lib/ — logging, variables, network, templatessetup/templates/ — minion.json, systemd, SOUL.md, wrappersetup/config/defaults.yaml — all default valuesminions repo or setup/profiles/| Phase | Name | Purpose |
|---|---|---|
| 00 | Preflight | Validate environment, test SSH connectivity |
| 20 | User Creation | Create agent user, directories, enable linger |
| 30 | Environment | Install/verify Node.js, pnpm, gh CLI, build tools |
| 40 | Install | Clone repo, checkout branch, pnpm install + build |
| 45 | Alias | Create ~/.local/bin/minion wrapper |
| 50 | Config | Render templates, deploy with correct permissions |
| 60 | Service | Enable + start systemd user service |
| 70 | Verification | Health checks, deployment summary |
.github/servers/production.json.github/servers/development.jsonFormat:
{
"id": "env-tenant-name",
"host": "hostname-or-ip",
"user": "minion-username",
"port": 22,
"deployment_path": "/home/username/minion",
"platform": "linux/amd64",
"gateway_port": 18789,
"bridge_port": 18790,
"tenant": "tenant-name",
"region": "us-east",
"branch": "main",
"local_build": true
}
Test SSH access to the target server before anything else:
ssh -o ConnectTimeout=5 -o BatchMode=yes root@<hostname> echo "SSH OK as root"
ssh -o ConnectTimeout=5 -o BatchMode=yes deploy@<hostname> echo "SSH OK as deploy"
Root access is required for user creation (phase 20) and package installation (phase 30).
If the server already hosts other Minion instances, verify port availability:
.github/servers/production.json and development.json for existing port allocationsAlways run a dry run first to verify configuration:
bash setup/setup.sh \
--vps-hostname=<host> \
--agent-name=<name> \
--branch=<branch> \
--gateway-port=<port> \
--api-key=placeholder \
--dry-run --verbose
Review the output to confirm:
AGENT_USERNAME derivation (minion-{agent-name})AGENT_HOME_DIR pathPrompt the user for required values:
| Credential | Required | Notes |
|---|---|---|
| Anthropic API key | Always | Starts with sk-ant- |
| GitHub PAT | If repo is private | Starts with ghp_ or github_pat_ |
| Gateway port | If server has existing instances | Must not conflict |
Run the full provisioning in the background (it takes 5-10 minutes):
bash setup/setup.sh \
--vps-hostname=<host> \
--agent-name=<name> \
--branch=<branch> \
--gateway-port=<port> \
--api-key=<key> \
--github-pat=<pat> \
--verbose
Poll the output periodically. Key milestones to watch for:
After successful provisioning, add the server entry to the appropriate config file:
.github/servers/production.json.github/servers/development.jsonAfter provisioning, review the full output for improvement observations using the
lessons-learned skill. Common findings:
--mode=remote — Orchestrate via SSH (auto-detected when --vps-hostname is set)--update — Pull latest + rebuild existing install--decommission — Stop services, free disk, preserve config--vps-hostname=HOST — Target server (implies remote mode)--agent-name=NAME — Agent name (derives username as minion-{name})--branch=BRANCH — Git branch to deploy (default: main)--gateway-port=PORT — Gateway listen port (default: 18789)--api-key=KEY — Anthropic API key (required)--github-pat=TOKEN — GitHub PAT for private repo access--tenant=NAME — Tenant identifier for multi-tenant setups--profile=PROFILE — Load from profile file--dry-run — Preview without executing--start-from=PHASE — Resume from a specific phase--skip-phase=PHASE — Skip a phase (repeatable)--verbose — Debug-level loggingWhen deploying multiple agents on the same server:
minion-{name})--tenant=NAME for config path suffixing when agents share a usernamessh minion-{name}@<host> "systemctl --user status minion-gateway"
ssh minion-{name}@<host> "journalctl --user -u minion-gateway -n 50"
The gateway may need more warmup time. Check if the process is running:
ssh minion-{name}@<host> "systemctl --user is-active minion-gateway"
The framework saves checkpoints. Resume from the last successful phase:
bash setup/setup.sh --start-from=50 --vps-hostname=<host> --agent-name=<name> ...
Automatic on phase failure. Manual rollback:
bash setup/phases/99-rollback.sh
npx claudepluginhub nikolasp98/minion_plugins --plugin provision-serverGuides deployment of TunPilot server on Linux via SSH script, CLI connection with health checks, updates, and initial setup detection.
Manages VPS for autonomous dev environments: checks status via Supabase queries and health endpoints, connects projects via SSH, provisions new VPS.
Connects to cloud instances via SSH/CLI and diagnoses access blockers. Supports AWS EC2, Aliyun ECS, bastions, file transfer, log inspection, and process checks within authorization boundaries.