spawn/hostinger
A fdc5d5e58b
refactor: extract shared SSH helpers to eliminate ~410 lines of duplication (#429)
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>
2026-02-11 03:45:18 -08:00
..
lib refactor: extract shared SSH helpers to eliminate ~410 lines of duplication (#429) 2026-02-11 03:45:18 -08:00
aider.sh feat: Add Hostinger cloud provider with 3 agent implementations (#354) 2026-02-10 20:42:54 -08:00
amazonq.sh feat: Add Hostinger amazonq support (#406) 2026-02-11 01:30:17 -08:00
claude.sh feat: Add Hostinger cloud provider with 3 agent implementations (#354) 2026-02-10 20:42:54 -08:00
cline.sh feat: Add Hostinger cline support (#397) 2026-02-11 01:29:16 -08:00
codex.sh feat: Add Hostinger codex support (#390) 2026-02-11 01:28:39 -08:00
continue.sh feat: Add Hostinger continue support (#403) 2026-02-11 01:30:01 -08:00
gemini.sh feat: Add Hostinger gemini support (#395) 2026-02-11 01:29:10 -08:00
goose.sh feat: Add Hostinger goose support (#382) 2026-02-11 01:04:03 -08:00
gptme.sh feat: Add Hostinger gptme support (#405) 2026-02-11 01:30:14 -08:00
interpreter.sh feat: Add Hostinger interpreter support (#400) 2026-02-11 01:30:35 -08:00
kilocode.sh feat: Add Hostinger kilocode support (#394) 2026-02-11 01:29:00 -08:00
nanoclaw.sh feat: Add Hostinger nanoclaw support (#379) 2026-02-11 00:36:22 -08:00
openclaw.sh feat: Add Hostinger cloud provider with 3 agent implementations (#354) 2026-02-10 20:42:54 -08:00
opencode.sh feat: Add Hostinger opencode support (#391) 2026-02-11 01:28:46 -08:00
plandex.sh feat: Add Hostinger plandex support (#401) 2026-02-11 01:29:49 -08:00
README.md feat: Add Hostinger cloud provider with 3 agent implementations (#354) 2026-02-10 20:42:54 -08:00

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:

  1. Log into hPanel: https://hpanel.hostinger.com/
  2. Click your Profile icon → Account Information
  3. Navigate to API in the sidebar
  4. Click 'Generate token' or 'New token'
  5. Set token name and expiration, then click Generate
  6. 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, Central
  • us-east - United States, East Coast
  • asia-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:

  1. Generate ~/.ssh/spawn_ed25519 keypair if missing
  2. Register the public key with Hostinger API
  3. 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 VPSs
  • POST /virtual-machines - Create VPS
  • DELETE /virtual-machines/{id} - Destroy VPS
  • GET /ssh-keys - List SSH keys
  • POST /ssh-keys - Register SSH key
  • GET /plans - List available plans
  • GET /locations - List available regions

Authentication: Bearer token via Authorization header