用途:在 Hetzner Cloud 上完成基础设施的创建与管理,通过 hcloud 命令行工具操作服务器、网络、存储、DNS 等资源;适合部署、脚本化与智能体调用场景。
主要能力:服务器创建、列表、SSH、快照、救援模式与删除;私有网络(VPC)与子网;防火墙规则文件与应用;负载均衡器及其目标与服务;浮动 IP 与主 IP;块存储卷与 Storage Box;DNS 区域与记录、区域文件导入导出;SSH 密钥、证书、镜像、放置组;以及服务器类型、位置、数据中心等参考信息查询。
用法:CLI 通过 API token 认证,可设置环境变量 export HCLOUD_TOKEN="your-api-token",或创建命名上下文 hcloud context create my-project;token 在 Hetzner 控制台项目 Security > API Tokens 生成。安装方式包括 brew install hcloud、下载 Linux 二进制包或使用 Docker 镜像 hetznercloud/cli:latest。常用命令如 hcloud server create --name web-1 --type cpx21 --image ubuntu-24.04 --ssh-key deploy-key --location fsn1、hcloud server ssh web-1。列表、描述与创建命令支持结构化输出:--output json、--output yaml、--output format='{{.ServerType.Cores}}'、--output columns=id,name,status。
限制:资料提示 Hetzner 定价、服务器类型、位置与 API 行为可能过时,引用具体数字与可用类型时应以检索结果为准而非预训练知识;未提供完整命令参数细节,具体选项需查阅随附参考文件或官方文档。