Add ssh_run_server, ssh_upload_file, ssh_interactive_session, and ssh_verify_connectivity to shared/common.sh. These four functions were copy-pasted identically across 21 cloud provider lib files, differing only in SSH username (root vs ubuntu). Providers now set SSH_USER and delegate to the shared helpers via one-line wrappers, reducing each provider's lib by ~20 lines. Agent: complexity-hunter Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| lib | ||
| aider.sh | ||
| amazonq.sh | ||
| claude.sh | ||
| cline.sh | ||
| codex.sh | ||
| continue.sh | ||
| gemini.sh | ||
| goose.sh | ||
| gptme.sh | ||
| interpreter.sh | ||
| kilocode.sh | ||
| nanoclaw.sh | ||
| openclaw.sh | ||
| opencode.sh | ||
| plandex.sh | ||
| README.md | ||
Hostinger VPS
Hostinger is a budget VPS provider with cloud-init support and REST API provisioning. Starting at $4.95/month for 1 vCPU + 4GB RAM instances with hourly billing.
Quick Start
Each script provisions a Hostinger VPS, installs the agent, injects OpenRouter credentials, and drops you into an interactive session.
Claude Code
bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hostinger/claude.sh)
Aider
bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hostinger/aider.sh)
OpenClaw
bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hostinger/openclaw.sh)
Non-Interactive Mode
All scripts support non-interactive execution via environment variables:
export HOSTINGER_API_KEY="your-api-key"
export HOSTINGER_SERVER_NAME="my-vps"
export HOSTINGER_PLAN="kvm1" # Optional (default: kvm1)
export HOSTINGER_LOCATION="eu-central" # Optional (default: eu-central)
export OPENROUTER_API_KEY="your-key" # Optional (triggers OAuth if unset)
bash <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hostinger/claude.sh)
Configuration
Authentication
Get your Hostinger API key:
- Log into hPanel: https://hpanel.hostinger.com/
- Click your Profile icon → Account Information
- Navigate to API in the sidebar
- Click 'Generate token' or 'New token'
- Set token name and expiration, then click Generate
- Copy the token:
export HOSTINGER_API_KEY=...
The token will be saved to ~/.config/spawn/hostinger.json for reuse.
VPS Plans
Common plans (hourly pricing estimated from monthly):
kvm1: 1 vCPU, 4GB RAM, 50GB SSD (~$0.0068/hr)kvm2: 2 vCPU, 8GB RAM, 100GB SSD (~$0.0137/hr)kvm4: 4 vCPU, 16GB RAM, 200GB SSD (~$0.0274/hr)
The script will show available plans if HOSTINGER_PLAN is not set.
Locations
Available regions:
eu-central(default) - Europe, Centralus-east- United States, East Coastasia-pacific- Asia Pacific
The script will show available locations if HOSTINGER_LOCATION is not set.
OS Templates
Default: ubuntu-24.04
Override with:
export HOSTINGER_OS_TEMPLATE="ubuntu-22.04"
Environment Variables
| Variable | Description | Default |
|---|---|---|
HOSTINGER_API_KEY |
API authentication token | Required (prompted if unset) |
HOSTINGER_SERVER_NAME |
VPS hostname | Required (prompted if unset) |
HOSTINGER_PLAN |
VPS plan ID | kvm1 (interactive picker if unset) |
HOSTINGER_LOCATION |
Region/datacenter | eu-central (interactive picker if unset) |
HOSTINGER_OS_TEMPLATE |
Operating system | ubuntu-24.04 |
OPENROUTER_API_KEY |
OpenRouter API key | OAuth flow if unset |
SSH Key Management
The scripts automatically:
- Generate
~/.ssh/spawn_ed25519keypair if missing - Register the public key with Hostinger API
- Wait for SSH connectivity after VPS creation
To use an existing key:
export SPAWN_SSH_KEY_PATH="$HOME/.ssh/id_ed25519"
Management
List VPSs
source <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hostinger/lib/common.sh)
ensure_hostinger_token
list_servers
Destroy VPS
source <(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/hostinger/lib/common.sh)
ensure_hostinger_token
destroy_server "12345" # Replace with VPS ID from list_servers
Cloud-Init Support
All Hostinger VPS instances come with cloud-init pre-installed. The scripts inject userdata to:
- Install bun (JavaScript runtime)
- Install common tools (git, curl, zsh, etc.)
- Configure shell environment
- Set up OpenRouter API key injection
Pricing
- Pay-per-hour billing (billed monthly based on usage)
- Starting at $4.95/month for kvm1 plan
- No bandwidth charges
- No setup fees
API Documentation
Hostinger VPS API base: https://api.hostinger.com/vps/v1
Common endpoints:
GET /virtual-machines- List VPSsPOST /virtual-machines- Create VPSDELETE /virtual-machines/{id}- Destroy VPSGET /ssh-keys- List SSH keysPOST /ssh-keys- Register SSH keyGET /plans- List available plansGET /locations- List available regions
Authentication: Bearer token via Authorization header