From 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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-sentinel:vps-setupThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guided walkthrough to install and authenticate Claude Code on a remote server via SSH.
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~/.bashrcnpx claudepluginhub southlab-ai/claude-plugin-marketplace --plugin claude-sentinelSets up Telegram/Discord channels for remote Claude Code access. Enables sending commands from phone via messaging apps with --auto flag and FORGE_OUTPUT=json protocol.
Guides complete beginners through setting up a development environment, detecting Mac vs other systems, and walking through VPS purchase and SSH setup step by step.
Use this skill when the user wants to provision a Hetzner VPS, create a cloud server, deploy to Hetzner, set up a development server, configure server security (UFW, fail2ban), or estimate cloud hosting costs. Handles secure VPS provisioning with Claude Code pre-installed.