Vps 标志

Vps

组织
hostinger
vps

Hostinger VPS API for virtual machine management, Docker projects, firewalls, SSH keys, backups, snapshots, OS templates, post-install scripts, recovery mode, malware scanning, PTR records, and metrics. Use when creating, managing, or troubleshooting VPS instances, deploying Docker containers, configuring firewalls, or managing server infrastructure.

概览

发布者hostinger
代码仓库hostinger-agent-skills
技能名称vps
星标数
27
复刻数
1
附带文件
4
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 4 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 hostinger 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Vps AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/hostinger/hostinger-agent-skills/tree/main/skills/vps
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hostinger/hostinger-agent-skills.git /tmp/hostinger-agent-skills
mkdir -p .claude/skills
cp -r /tmp/hostinger-agent-skills/skills/vps .claude/skills/vps
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Vps,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Vps。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Vps 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Hostinger VPS

The VPS API provides comprehensive management of virtual private servers — from purchasing and setup to Docker deployments, firewall configuration, SSH keys, backups, snapshots, OS reinstallation, recovery mode, malware scanning, and performance monitoring.

Table of Contents

Core Concepts

Virtual Machines

VPS instances with dedicated CPU, RAM, disk, and network resources. Each VM has an OS template, root access, and an IP address. VMs go through states: initial → running → stopped.

Actions

Asynchronous operations on VMs (start, stop, restart, recreate, etc.) return an action resource with a status you can poll.

Docker Manager

Deploy and manage Docker Compose projects directly on VPS instances. Supports creating projects from docker-compose.yaml content or GitHub URLs.

Firewalls

Network security rules that control inbound traffic. By default, all incoming traffic is dropped — you must explicitly add accept rules. Only one firewall can be active per VM at a time. Changes require manual sync to take effect.

SSH Public Keys

SSH keys for authentication. Keys are managed at the account level and attached to specific VMs.

OS Templates

Pre-configured operating system images for VM installation (Ubuntu, Debian, CentOS, etc.) including panel templates (e.g., with cPanel or Plesk).

Post-Install Scripts

Automation scripts that run after VM installation. Saved to /post_install with executable permissions. Output goes to /post_install.log. Maximum size: 48KB.

Backups & Snapshots

  • Backups: Automatic periodic backups managed by Hostinger
  • Snapshots: User-initiated point-in-time captures. Only one snapshot per VM — creating a new one overwrites the existing one

Recovery Mode

Boot the VM from a recovery disk image for system rescue. The original disk is mounted at /mnt.

Malware Scanner (Monarx)

Optional security tool for malware detection and prevention on VPS instances.

Common Patterns

Purchase and Setup a VPS

bash
# Step 1: Get available OS templates
curl -X GET "https://developers.hostinger.com/api/vps/v1/templates" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Step 2: Get available data centers
curl -X GET "https://developers.hostinger.com/api/vps/v1/data-centers" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Step 3: Purchase a VPS
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "item_id": "hostingercom-vps-kvm2-usd-1m",
    "payment_method_id": 517244,
    "template_id": 1,
    "data_center_id": 1,
    "hostname": "my-server",
    "password": "SecurePass123!"
  }'

# Step 4: Setup purchased VM (if in initial state)
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/setup" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1,
    "data_center_id": 1,
    "hostname": "my-server",
    "password": "SecurePass123!"
  }'

CLI (hapi):

bash
hapi vps vm list

Python SDK:

python
from hostinger_api import Hostinger

client = Hostinger(api_token="YOUR_API_TOKEN")

# List all VPS instances
vms = client.vps.virtual_machines.list()
for vm in vms:
    print(f"{vm.hostname} - {vm.state} - {vm.ip_address}")

TypeScript SDK:

typescript
import { Hostinger } from "hostinger-api-sdk";

const client = new Hostinger({ apiToken: "YOUR_API_TOKEN" });

const vms = await client.vps.virtualMachines.list();
for (const vm of vms) {
  console.log(`${vm.hostname} - ${vm.state} - ${vm.ipAddress}`);
}

PHP SDK:

php
use Hostinger\Api\HostingerApi;

$client = new HostingerApi('YOUR_API_TOKEN');

$vms = $client->vps->virtualMachines->list();
foreach ($vms as $vm) {
    echo "{$vm->hostname} - {$vm->state} - {$vm->ip_address}\n";
}

VM Lifecycle Operations

bash
# List all VMs
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Get VM details
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Start VM
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/start" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Stop VM
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/stop" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Restart VM
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/restart" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Set hostname
curl -X PUT "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/hostname" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "hostname": "new-hostname.example.com" }'

# Set root password
curl -X PUT "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/root-password" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "password": "NewSecurePass123!" }'

# Recreate VM (DESTRUCTIVE - all data lost)
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/recreate" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1,
    "password": "SecurePass123!"
  }'

Deploy Docker Compose Projects

bash
# List Docker projects on a VM
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/docker" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Deploy from docker-compose.yaml content
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/docker" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "project_name": "my-app",
    "content": "version: \"3\"\nservices:\n  web:\n    image: nginx:latest\n    ports:\n      - \"80:80\""
  }'

# Deploy from GitHub URL
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/docker" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "project_name": "my-app",
    "url": "https://github.com/user/repo"
  }'

# Get project containers and stats
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/docker/my-app/containers" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# View project logs (last 300 entries)
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/docker/my-app/logs" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Start / Stop / Restart / Update / Delete project
curl -X POST ".../docker/my-app/start" -H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X POST ".../docker/my-app/stop" -H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X POST ".../docker/my-app/restart" -H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X POST ".../docker/my-app/update" -H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X DELETE ".../docker/my-app/down" -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

Configure Firewalls

bash
# Create a firewall
curl -X POST "https://developers.hostinger.com/api/vps/v1/firewall" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "web-server" }'

# Add rules (default drops all — add accept rules for ports you need)
curl -X POST "https://developers.hostinger.com/api/vps/v1/firewall/1/rules" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "tcp",
    "port": "80",
    "source": "0.0.0.0/0",
    "action": "accept"
  }'

# Activate firewall on a VM
curl -X POST "https://developers.hostinger.com/api/vps/v1/firewall/1/activate/12345" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Sync firewall after rule changes
curl -X POST "https://developers.hostinger.com/api/vps/v1/firewall/1/sync/12345" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

SSH Key Management

bash
# Create SSH key
curl -X POST "https://developers.hostinger.com/api/vps/v1/public-keys" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-laptop",
    "key": "ssh-ed25519 AAAA... user@host"
  }'

# Attach key to VM
curl -X POST "https://developers.hostinger.com/api/vps/v1/public-keys/attach/12345" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "ids": [1, 2] }'

# List keys on a VM
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/public-keys" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

Backups and Snapshots

bash
# List backups
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/backups" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Restore a backup (DESTRUCTIVE - overwrites all data)
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/backups/99/restore" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Create a snapshot (overwrites existing snapshot)
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/snapshot" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Get current snapshot
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/snapshot" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

# Restore from snapshot
curl -X POST "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/snapshot/restore" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

Monitor Performance

bash
# Get VM metrics (CPU, memory, disk, network, uptime)
curl -X GET "https://developers.hostinger.com/api/vps/v1/virtual-machines/12345/metrics?date_from=2025-05-01T00:00:00Z&date_to=2025-06-01T00:00:00Z" \
  -H "Authorization: Bearer $HOSTINGER_API_TOKEN"

API Reference

Virtual Machines

MethodEndpointDescription
GET/api/vps/v1/virtual-machinesList all VMs
POST/api/vps/v1/virtual-machinesPurchase new VM
GET/api/vps/v1/virtual-machines/{id}Get VM details
POST/api/vps/v1/virtual-machines/{id}/setupSetup purchased VM
POST/api/vps/v1/virtual-machines/{id}/startStart VM
POST/api/vps/v1/virtual-machines/{id}/stopStop VM
POST/api/vps/v1/virtual-machines/{id}/restartRestart VM
POST/api/vps/v1/virtual-machines/{id}/recreateRecreate VM (destructive)
PUT/api/vps/v1/virtual-machines/{id}/hostnameSet hostname
DELETE/api/vps/v1/virtual-machines/{id}/hostnameReset hostname
PUT/api/vps/v1/virtual-machines/{id}/root-passwordSet root password
PUT/api/vps/v1/virtual-machines/{id}/panel-passwordSet panel password
PUT/api/vps/v1/virtual-machines/{id}/nameserversSet nameservers
GET/api/vps/v1/virtual-machines/{id}/metricsGet metrics
GET/api/vps/v1/virtual-machines/{id}/public-keysGet attached SSH keys
GET/api/vps/v1/virtual-machines/{id}/actionsGet action history
GET/api/vps/v1/virtual-machines/{id}/actions/{actionId}Get action details

Docker Manager (experimental)

MethodEndpointDescription
GET.../dockerList projects
POST.../dockerCreate project
GET.../docker/{name}Get project contents
GET.../docker/{name}/containersGet containers with stats
GET.../docker/{name}/logsGet project logs (last 300)
POST.../docker/{name}/startStart project
POST.../docker/{name}/stopStop project
POST.../docker/{name}/restartRestart project
POST.../docker/{name}/updateUpdate project
DELETE.../docker/{name}/downDelete project (irreversible)

Firewall

MethodEndpointDescription
GET/api/vps/v1/firewallList firewalls
POST/api/vps/v1/firewallCreate firewall
GET/api/vps/v1/firewall/{id}Get firewall details
DELETE/api/vps/v1/firewall/{id}Delete firewall
POST/api/vps/v1/firewall/{id}/rulesCreate rule
PUT/api/vps/v1/firewall/{id}/rules/{ruleId}Update rule
DELETE/api/vps/v1/firewall/{id}/rules/{ruleId}Delete rule
POST/api/vps/v1/firewall/{id}/activate/{vmId}Activate on VM
POST/api/vps/v1/firewall/{id}/deactivate/{vmId}Deactivate on VM
POST/api/vps/v1/firewall/{id}/sync/{vmId}Sync rules to VM

SSH Keys, Templates, Scripts, Backups, Snapshots, Recovery, PTR, Malware

MethodEndpointDescription
GET/POST/DELETE/api/vps/v1/public-keysManage SSH keys
POST/api/vps/v1/public-keys/attach/{vmId}Attach keys to VM
GET/api/vps/v1/templatesList OS templates
GET/api/vps/v1/templates/{id}Get template details
GET/POST/PUT/DELETE/api/vps/v1/post-install-scriptsManage scripts
GET/api/vps/v1/data-centersList data centers
GET.../backupsList backups
POST.../backups/{id}/restoreRestore backup
GET/POST/DELETE.../snapshotManage snapshot
POST.../snapshot/restoreRestore snapshot
POST/DELETE.../recoveryStart/stop recovery mode
POST/DELETE.../ptr/{ipId}Manage PTR records
GET/POST/DELETE.../monarxManage malware scanner

Best Practices

Security

  • Always attach SSH keys and disable password auth when possible
  • Configure firewalls — default drops all traffic, add only needed ports
  • Sync firewalls after any rule change — changes don't auto-apply
  • Only one firewall per VM — plan rules in a single firewall
  • Install Monarx malware scanner on production servers
  • Use strong passwords (12+ chars, mixed case, numbers, not leaked)

Backups & Recovery

  • Take a snapshot before destructive operations (recreate, major changes)
  • Remember: creating a new snapshot overwrites the existing one
  • Backup restores overwrite all data on the VM
  • Use recovery mode for filesystem repair — original disk is at /mnt

Docker

  • Docker Manager endpoints are experimental — expect changes
  • GitHub URLs auto-resolve to docker-compose.yaml in master branch
  • Deploying a project with an existing name replaces it
  • Use logs endpoint for debugging container issues

Performance

  • Monitor metrics to right-size your VPS plan
  • Set custom nameservers only if you know what you're doing — wrong config breaks DNS resolution

Post-Install Scripts

  • Maximum script size: 48KB
  • Script runs as /post_install, output goes to /post_install.log
  • Test scripts on non-production VMs first

Troubleshooting

VM Not Starting

  • Check action history for error details
  • VM may be in recovery mode — stop recovery first
  • Check if VM is in initial state — run setup first

Cannot SSH Into VM

  • Verify SSH key is attached (not just in account)
  • Check firewall allows port 22
  • Verify firewall is synced after rule changes
  • Try root password login to diagnose

Firewall Rules Not Taking Effect

  • Rules require manual sync after changes: POST .../firewall/{id}/sync/{vmId}
  • Only one firewall can be active per VM
  • Default policy is DROP — ensure accept rules exist for needed ports

Docker Project Not Starting

  • Check project logs: GET .../docker/{name}/logs
  • Verify docker-compose.yaml is valid
  • Ensure required ports are not already in use
  • Check VM has enough resources (CPU, RAM, disk)

Password Rejected During Recreate

  • Must be 12+ characters with uppercase, lowercase, and numbers
  • Password is checked against leaked password databases
  • Try a completely unique, complex password

Action Stuck in Progress

  • Poll action status: GET .../actions/{actionId}
  • Some operations take several minutes (recreate, backup restore)
  • If stuck for extended time, contact support

See Also

The following deep-dive guides are available in this skill directory:

  • deployment-workflow.md — SSH-first deployment workflow for Dockerized apps (7-step process, rollback strategy, verification levels)
  • docker-patterns.md — Docker Compose deployment patterns (WordPress, Node+Redis+Postgres, Traefik SSL, lifecycle management)
  • firewall-patterns.md — Common firewall configurations (web server, database, Docker host, mail server, TypeScript/PHP examples)
  • terraform-examples.md — Infrastructure as Code with the Hostinger Terraform Provider (VPS provisioning, SSH keys, firewalls, complete infra example)

References

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Vps AI 技能有什么作用?

Hostinger VPS API for virtual machine management, Docker projects, firewalls, SSH keys, backups, snapshots, OS templates, post-install scripts, recovery mode, malware scanning, PTR records, and metrics. Use when creating, managing, or troubleshooting VPS instances, deploying Docker containers, configuring firewalls, or managing server infrastructure.

为什么在 TypingMind 中使用 Vps?

因为您只需安装一次,就能搭配任何模型使用。Vps 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Vps?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/hostinger/hostinger-agent-skills/tree/main/skills/vps。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Vps?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Vps 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Vps 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Vps AI 技能免费吗?

是的。hostinger 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇