claude-code-hetzner-vps
Spin up a secure, Claude Code-ready VPS for ~$5/month in under 5 minutes.

A free tool by Pete Sena | The Resonance Labs
What is Claude Code?
Claude Code is Anthropic's official CLI tool that lets you use Claude AI directly in your terminal. It can read files, write code, run commands, and help you build software faster. This plugin extends Claude Code with commands to provision secure cloud servers.
Installation
Option 1: From Marketplace (Easiest)
# In Claude Code
/plugin marketplace add The-Resonance/claude-code-hetzner-vps
/plugin install claude-code-hetzner-vps
Option 2: Clone and Use
# Clone the plugin
git clone https://github.com/The-Resonance/claude-code-hetzner-vps.git ~/.claude-plugins/hetzner-vps
# Start Claude Code with the plugin
claude --plugin-dir ~/.claude-plugins/hetzner-vps
Option 3: Test Locally
git clone https://github.com/The-Resonance/claude-code-hetzner-vps.git
cd claude-code-hetzner-vps
claude --plugin-dir .
Once loaded, you'll have access to these commands:
/provision - Create a secure VPS
/status - Check server status
/destroy - Delete a server
/cost-estimate - See pricing before you spend
The Problem
You want to run Claude Code on a remote server—maybe for longer tasks, CI/CD pipelines, or just to keep your laptop free. But setting up a secure cloud server means:
- Configuring firewalls
- Hardening SSH
- Setting up fail2ban
- Installing dependencies
- ...and hoping you didn't miss a security step
The Solution
One command. Fully secured. Claude Code pre-installed.
/provision my-server
That's it. You get:
- UFW firewall blocking everything except SSH
- fail2ban banning brute-force attackers
- SSH hardening (key-only, no root, limited retries)
- Automatic security updates
- Claude Code ready to use
5-Minute Setup (Complete Walkthrough)
Step 1: Create a Hetzner Account
- Go to console.hetzner.cloud
- Click Register and create an account
- Verify your email
- You may need to add payment info (no charge until you provision)
Step 2: Create a Project
- In the Hetzner Console, click + New Project
- Name it something like
claude-servers
- Click into your new project
Step 3: Generate an API Token
- Go to Security → API Tokens
- Click Generate API Token
- Name it
claude-code-cli
- Select Read & Write permissions
- Click Generate
- Copy the token immediately (you won't see it again!)
Step 4: Install the hcloud CLI
macOS:
brew install hcloud
Linux:
curl -fsSL https://github.com/hetznercloud/cli/releases/latest/download/hcloud-linux-amd64.tar.gz | tar xz
sudo mv hcloud /usr/local/bin/
Step 5: Configure hcloud Authentication
hcloud context create claude-servers
When prompted, paste your API token from Step 3.
Verify it works:
hcloud server list
Should return an empty list (no errors).
Step 6: Ensure You Have an SSH Key
Check if you have one:
ls ~/.ssh/id_ed25519.pub || ls ~/.ssh/id_rsa.pub
If not, generate one:
ssh-keygen -t ed25519 -C "your@email.com"
Press Enter to accept defaults.
Step 7: Provision Your Server
# Check cost first
/cost-estimate cx22
# Create the server
/provision my-dev-server cx22 nbg1
This takes about 60 seconds. You'll see the server IP when done.
Step 8: Connect via SSH
Wait ~2 minutes for cloud-init to complete, then:
ssh claude@<your-server-ip>
You'll see the branded welcome message confirming security features are active.
Step 9: Use Claude Code
claude
Done! You're running Claude Code on your own secure VPS.
GitHub + Vercel Workflow
To push code and work with Vercel, set up GitHub authentication on your server:
Install GitHub CLI
sudo apt install gh -y
Authenticate with GitHub
gh auth login
Select:
- GitHub.com
- HTTPS
- Yes (authenticate with browser)
- Login with a one-time code
Set Up SSH Key for Git
# Generate a key for this server
ssh-keygen -t ed25519 -C "your-server-name"
# Add the required scope (important!)
gh auth refresh -h github.com -s admin:public_key
# Add the key to your GitHub account
gh ssh-key add ~/.ssh/id_ed25519.pub --title "my-hetzner-server"
# Test the connection
ssh -T git@github.com
Clone and Work
# Clone your repo
git clone git@github.com:username/your-repo.git
cd your-repo
# Run Claude Code
claude