/claude-sentinel:vps-setupfrom claude-sentinel
Guided step-by-step setup of Claude Code on a VPS via SSH. Use when the user asks to "set up Claude Code on my VPS", "install claude on server", "configure VPS for claude", "SSH setup for claude code", "install claude on remote server", "set up headless claude", or wants to prepare a VPS to run Claude Code with Telegram.
Ships in claude-sentinel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Guided walkthrough to install and authenticate Claude Code on a remote server via SSH. The user runs commands from their local machine (Git Bash, Terminal, etc.) connecting to the VPS. Claude guides each step and verifies before moving on.
Arguments passed: $ARGUMENTS
Before starting, collect:
~/.ssh/id_ed25519, ask to confirmTest connectivity first:
ssh -i <key_path> <user>@<ip> "echo 'Connection OK'"
If this fails, troubleshoot SSH before proceeding.
Why this is required: Claude Code blocks --dangerously-skip-permissions when running
as root for security reasons. The Telegram gateway needs this flag, so a non-root user
is mandatory — not optional.
If user is already connecting as a non-root user, skip to Step 2.
Guide the user to run these commands on the VPS:
# Connect as root (or current user with sudo)
ssh -i <key_path> root@<ip>
# Create the claude user
sudo adduser claude --disabled-password --gecos ""
sudo usermod -aG sudo claude
# Allow passwordless sudo (needed for service management)
echo "claude ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/claude
# Copy SSH key for the new user
sudo mkdir -p /home/claude/.ssh
sudo cp ~/.ssh/authorized_keys /home/claude/.ssh/
sudo chown -R claude:claude /home/claude/.ssh
sudo chmod 700 /home/claude/.ssh
sudo chmod 600 /home/claude/.ssh/authorized_keys
Verify: ssh -i <key_path> claude@<ip> "whoami" should return claude.
ssh -i <key_path> claude@<ip>
# Install Claude Code (native binary, no Node.js needed)
curl -fsSL https://claude.ai/install.sh | bash
# Add to PATH for current session
export PATH="$HOME/.local/bin:$PATH"
# Verify
claude --version
This is the trickiest step on a headless server. The OAuth flow requires a browser which the VPS doesn't have.
Guide the user through this exact flow:
On the VPS (via SSH), run:
claude auth login
Claude Code will display a URL like:
https://claude.com/cai/oauth/authorize?code=true&client_id=...
Tell the user: "Copy that URL and open it in your local browser (not on the VPS)."
After authenticating in the browser, they'll see a code. Tell the user: "Go back to the SSH terminal and paste the code. The text won't appear as you type — that's normal, it's hidden like a password. Just paste and press Enter."
Verify: claude auth status should show loggedIn: true.
Common issues:
claude auth login again for a fresh URLclaude auth login generates a new oneThe gateway and compact job are TypeScript files that run on Bun.
# Still on the VPS as claude user
curl -fsSL https://bun.sh/install | bash
# Add to PATH
export PATH="$HOME/.bun/bin:$PATH"
# Verify
bun --version
This keeps systemd user services running after SSH logout — critical for a VPS.
sudo loginctl enable-linger claude
Verify: loginctl show-user claude | grep Linger should show Linger=yes.
Create the settings file:
mkdir -p ~/.claude
cat > ~/.claude/settings.json << 'EOF'
{
"model": "claude-sonnet-4-6",
"effortLevel": "high",
"permissions": {
"defaultMode": "bypassPermissions"
},
"enabledPlugins": {
"telegram@claude-plugins-official": true
},
"env": {
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "60"
}
}
EOF
The user needs a Telegram bot token from @BotFather. They should create the bot from their phone or desktop Telegram (not from the VPS).
Once they have the token, run on the VPS:
claude
# Inside Claude Code, run:
# /telegram:configure <bot-token>
Or use /sentinel:configure <bot-token> if this plugin is installed.
Run these checks and report results:
claude --version # Should show version
claude auth status # Should show loggedIn: true
bun --version # Should show version
loginctl show-user claude | grep Linger # Should show Linger=yes
Next step: Tell the user to run /sentinel:deploy to install the persistent
gateway, systemd services, compact job, and bot identity.
claude user, not root~/.bashrcWhat SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/accessManage Telegram channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Telegram channel.
/configureSet up the Telegram channel for Claude Sentinel — save the bot token, review access policy, and prepare the gateway environment. Use when the user pastes a Telegram bot token, asks to configure Telegram, asks "how do I set this up", or wants to check channel status. VPS-aware version with headless guidance.
/deploy-sentinelDeploy Claude Sentinel on a VPS — install the persistent Telegram gateway, set up systemd services, configure cron jobs for memory compaction, create the bot identity, and build the required directory structure. Use when the user asks to "install sentinel", "deploy telegram gateway", "set up persistent sessions", "install claude-sentinel", "configure telegram bot on VPS", "set up crons for telegram", "create bot identity", or wants to make their Claude Code Telegram bot persistent.
Other plugins' skills for the same job
npx claudepluginhub southlab-ai/claude-plugin-marketplace --plugin claude-sentinel