spawn/hostinger
A b9e21bded6
refactor: use sys.argv instead of bash interpolation in Python body builders (#842)
Replace unsafe '$var' bash string interpolation inside Python code with
sys.argv parameter passing across 9 cloud provider libs. This eliminates
a class of potential injection bugs where values containing single quotes
could break the Python string context.

Affected functions:
- binarylane: _binarylane_build_server_body
- contabo: _contabo_build_instance_body
- digitalocean: _build_droplet_request_body
- hostinger: _hostinger_build_create_body
- ionos: ionos_register_ssh_key, _ionos_create_datacenter,
         _ionos_build_volume_body, _ionos_build_server_body
- linode: _linode_build_create_payload
- ovh: ovh_register_ssh_key, _ovh_find_flavor_id,
       _ovh_get_ssh_key_id, _ovh_build_instance_body
- upcloud: _build_upcloud_server_body
- vultr: _vultr_build_instance_body

This aligns with the pattern already used by cherry, scaleway, netcup,
and ramnode providers.

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-13 01:45:11 -08:00
..
lib refactor: use sys.argv instead of bash interpolation in Python body builders (#842) 2026-02-13 01:45:11 -08:00
aider.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
amazonq.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
claude.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
cline.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
codex.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
continue.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
gemini.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
goose.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
gptme.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
interpreter.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
kilocode.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
nanoclaw.sh fix: replace log_warn with log_step/log_info for non-warning messages (#604) 2026-02-12 03:24:30 -08:00
openclaw.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
opencode.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -08:00
plandex.sh fix: use log_step (cyan) for progress messages instead of log_warn (yellow) (#534) 2026-02-11 14:37:43 -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