hetzner-cloud
Hetzner Cloudのサーバー構築、VPS管理、ファイアウォール設定、ネットワーク構成、ボリューム管理、スナップショット作成、SSHキー管理など、クラウドインフラをCLIで操作し、Hetzner環境を効率的に構築・管理するSkill。
📜 元の英語説明(参考)
Manage Hetzner Cloud infrastructure from the terminal. Use when a user asks to create a Hetzner server, manage VPS instances, set up firewalls, configure networks, manage volumes, create snapshots, handle SSH keys, or provision infrastructure on Hetzner. Covers the hcloud CLI for all resource types. For deploying applications on top of Hetzner servers, see coolify.
🇯🇵 日本人クリエイター向け解説
Hetzner Cloudのサーバー構築、VPS管理、ファイアウォール設定、ネットワーク構成、ボリューム管理、スナップショット作成、SSHキー管理など、クラウドインフラをCLIで操作し、Hetzner環境を効率的に構築・管理するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o hetzner-cloud.zip https://jpskill.com/download/14979.zip && unzip -o hetzner-cloud.zip && rm hetzner-cloud.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14979.zip -OutFile "$d\hetzner-cloud.zip"; Expand-Archive "$d\hetzner-cloud.zip" -DestinationPath $d -Force; ri "$d\hetzner-cloud.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
hetzner-cloud.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
hetzner-cloudフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Hetzner Cloud
概要
hcloud CLI を使用して、ターミナルから Hetzner Cloud インフラストラクチャをプロビジョニングおよび管理します。サーバー、ネットワーク、ファイアウォール、ボリューム、スナップショット、SSH キー、ロードバランサーを扱います。Hetzner は、Coolify のような自己管理プラットフォームをホストするためによく使用される、競争力のある価格で高性能な VPS インスタンスを提供しています。
手順
ユーザーが Hetzner Cloud に関するヘルプを求めている場合、どのタスクが必要かを判断します。
タスク A: 初期設定
# API トークンで認証
hcloud context create my-project
# プロンプトが表示されたら、API トークンを貼り付けます (Hetzner Cloud Console > API Tokens から)
# 設定済みのコンテキストを一覧表示
hcloud context list
# コンテキストを切り替え
hcloud context use my-project
タスク B: サーバー管理
# 利用可能なサーバータイプを価格とともに一覧表示
hcloud server-type list
# 利用可能なイメージ (OS オプション) を一覧表示
hcloud image list --type system
# サーバーを作成
hcloud server create \
--name my-server \
--type cx22 \
--image ubuntu-24.04 \
--location fsn1 \
--ssh-key my-key
# サーバーを一覧表示
hcloud server list
# サーバーの詳細を取得
hcloud server describe my-server
# サーバーに SSH で接続
hcloud server ssh my-server
# 停止/開始/再起動
hcloud server shutdown my-server
hcloud server poweron my-server
hcloud server reboot my-server
# サーバーのサイズを変更 (最初に poweroff が必要)
hcloud server shutdown my-server
hcloud server change-type my-server --server-type cx32
# 別の OS で再構築
hcloud server rebuild my-server --image ubuntu-24.04
# レスキューモードを有効化 (復旧用)
hcloud server enable-rescue my-server --type linux64 --ssh-key my-key
# サーバーを削除
hcloud server delete my-server
一般的なサーバータイプ:
| Type | vCPU | RAM | Disk | Use case |
|---|---|---|---|---|
| cx22 | 2 | 4 GB | 40 GB | 小規模アプリ、ステージング |
| cx32 | 4 | 8 GB | 80 GB | 本番アプリ |
| cx42 | 8 | 16 GB | 160 GB | データベース、高負荷ワークロード |
| cx52 | 16 | 32 GB | 240 GB | 高トラフィックアプリケーション |
| ccx13 | 2 | 8 GB | 80 GB | 専用 vCPU、安定したパフォーマンス |
ロケーション: fsn1 (Falkenstein), nbg1 (Nuremberg), hel1 (Helsinki), ash (Ashburn), hil (Hillsboro), sin (Singapore).
タスク C: ネットワーク
# プライベートネットワークを作成
hcloud network create --name my-network --ip-range 10.0.0.0/16
# サブネットを追加
hcloud network add-subnet my-network --type server --network-zone eu-central --ip-range 10.0.1.0/24
# サーバーをネットワークに接続
hcloud server attach-to-network my-server --network my-network --ip 10.0.1.2
# ファイアウォールを作成
hcloud firewall create --name web-firewall
# ファイアウォールルールを追加
hcloud firewall add-rule web-firewall --direction in --protocol tcp --port 22 --source-ips 0.0.0.0/0 --description "SSH"
hcloud firewall add-rule web-firewall --direction in --protocol tcp --port 80 --source-ips 0.0.0.0/0 --description "HTTP"
hcloud firewall add-rule web-firewall --direction in --protocol tcp --port 443 --source-ips 0.0.0.0/0 --description "HTTPS"
# サーバーにファイアウォールを適用
hcloud firewall apply-to-resource web-firewall --type server --server my-server
# Floating IP を割り当て
hcloud floating-ip create --type ipv4 --home-location fsn1 --description "Production IP"
# Floating IP をサーバーに割り当て
hcloud floating-ip assign <floating-ip-id> my-server
タスク D: ボリュームとスナップショット
# ボリュームを作成
hcloud volume create --name data-volume --size 50 --server my-server --format ext4
# ボリュームを一覧表示
hcloud volume list
# ボリュームのサイズを変更 (オンライン、ダウンタイムなし)
hcloud volume resize data-volume --size 100
# ボリュームをデタッチ/アタッチ
hcloud volume detach data-volume
hcloud volume attach data-volume --server other-server
# サーバーのスナップショットを作成
hcloud server create-image my-server --type snapshot --description "Before upgrade"
# スナップショットを一覧表示
hcloud image list --type snapshot
# スナップショットからサーバーを作成
hcloud server create --name restored-server --type cx22 --image <snapshot-id> --ssh-key my-key
# スナップショットを削除
hcloud image delete <snapshot-id>
タスク E: SSH キーとセキュリティ
# SSH キーをアップロード
hcloud ssh-key create --name my-key --public-key-from-file ~/.ssh/id_ed25519.pub
# SSH キーを一覧表示
hcloud ssh-key list
# SSH キーを削除
hcloud ssh-key delete my-key
タスク F: Coolify 用のサーバーをセットアップ
一般的なワークフロー — Hetzner サーバーをプロビジョニングし、Coolify をインストールします。
# 1. サーバーを作成 (Coolify には cx32 を推奨)
hcloud server create \
--name coolify-server \
--type cx32 \
--image ubuntu-24.04 \
--location fsn1 \
--ssh-key my-key
# 2. ファイアウォールを作成して適用
hcloud firewall create --name coolify-firewall
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 22 --source-ips 0.0.0.0/0 --description "SSH"
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 80 --source-ips 0.0.0.0/0 --description "HTTP"
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 443 --source-ips 0.0.0.0/0 --description "HTTPS"
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 8000 --source-ips 0.0.0.0/0 --description "Coolify UI"
hcloud firewall apply-to-resource coolify-firewall --type server --server coolify-server
# 3. サーバーの IP を取得
hcloud server ip coolify-server
# 4. SSH で接続し、Coolify をインストール
ssh root@<server-ip> "curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash"
インストール後、http://<server-ip>:8000 で Coolify にアクセスし、セットアップウィザードを完了します。
例
例 1: ファイアウォールとボリュームを備えた本番サーバーをプロビジョニング
ユーザーリクエスト: "ファイアウォールと 100GB のデータボリュームを備えた本番アプリ用の Hetzner サーバーを作成してください"
実行された手順:
# サーバーを作成
$ hcloud server create --name prod-api --type cx32 --image ubuntu-24.04 --location fsn1 --ssh-key deploy-key
Server 12345678 created
# ファイアウォールを作成して構成
$ hcloud firewall create --name prod-firewall
$ hcloud firewall add-rule
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Hetzner Cloud
Overview
Provision and manage Hetzner Cloud infrastructure from the terminal using the hcloud CLI. Covers servers, networks, firewalls, volumes, snapshots, SSH keys, and load balancers. Hetzner offers high-performance VPS instances at competitive prices, commonly used to host self-managed platforms like Coolify.
Instructions
When a user asks for help with Hetzner Cloud, determine which task they need:
Task A: Initial setup
# Authenticate with an API token
hcloud context create my-project
# Paste your API token when prompted (from Hetzner Cloud Console > API Tokens)
# List configured contexts
hcloud context list
# Switch context
hcloud context use my-project
Task B: Server management
# List available server types with pricing
hcloud server-type list
# List available images (OS options)
hcloud image list --type system
# Create a server
hcloud server create \
--name my-server \
--type cx22 \
--image ubuntu-24.04 \
--location fsn1 \
--ssh-key my-key
# List servers
hcloud server list
# Get server details
hcloud server describe my-server
# SSH into a server
hcloud server ssh my-server
# Stop/start/reboot
hcloud server shutdown my-server
hcloud server poweron my-server
hcloud server reboot my-server
# Resize a server (requires poweroff first)
hcloud server shutdown my-server
hcloud server change-type my-server --server-type cx32
# Rebuild with a different OS
hcloud server rebuild my-server --image ubuntu-24.04
# Enable rescue mode (for recovery)
hcloud server enable-rescue my-server --type linux64 --ssh-key my-key
# Delete a server
hcloud server delete my-server
Common server types:
| Type | vCPU | RAM | Disk | Use case |
|---|---|---|---|---|
| cx22 | 2 | 4 GB | 40 GB | Small apps, staging |
| cx32 | 4 | 8 GB | 80 GB | Production apps |
| cx42 | 8 | 16 GB | 160 GB | Databases, heavy workloads |
| cx52 | 16 | 32 GB | 240 GB | High-traffic applications |
| ccx13 | 2 | 8 GB | 80 GB | Dedicated vCPU, consistent performance |
Locations: fsn1 (Falkenstein), nbg1 (Nuremberg), hel1 (Helsinki), ash (Ashburn), hil (Hillsboro), sin (Singapore).
Task C: Networking
# Create a private network
hcloud network create --name my-network --ip-range 10.0.0.0/16
# Add a subnet
hcloud network add-subnet my-network --type server --network-zone eu-central --ip-range 10.0.1.0/24
# Attach server to network
hcloud server attach-to-network my-server --network my-network --ip 10.0.1.2
# Create a firewall
hcloud firewall create --name web-firewall
# Add firewall rules
hcloud firewall add-rule web-firewall --direction in --protocol tcp --port 22 --source-ips 0.0.0.0/0 --description "SSH"
hcloud firewall add-rule web-firewall --direction in --protocol tcp --port 80 --source-ips 0.0.0.0/0 --description "HTTP"
hcloud firewall add-rule web-firewall --direction in --protocol tcp --port 443 --source-ips 0.0.0.0/0 --description "HTTPS"
# Apply firewall to server
hcloud firewall apply-to-resource web-firewall --type server --server my-server
# Allocate a floating IP
hcloud floating-ip create --type ipv4 --home-location fsn1 --description "Production IP"
# Assign floating IP to server
hcloud floating-ip assign <floating-ip-id> my-server
Task D: Volumes and snapshots
# Create a volume
hcloud volume create --name data-volume --size 50 --server my-server --format ext4
# List volumes
hcloud volume list
# Resize a volume (online, no downtime)
hcloud volume resize data-volume --size 100
# Detach/attach a volume
hcloud volume detach data-volume
hcloud volume attach data-volume --server other-server
# Create a server snapshot
hcloud server create-image my-server --type snapshot --description "Before upgrade"
# List snapshots
hcloud image list --type snapshot
# Create a server from a snapshot
hcloud server create --name restored-server --type cx22 --image <snapshot-id> --ssh-key my-key
# Delete a snapshot
hcloud image delete <snapshot-id>
Task E: SSH keys and security
# Upload an SSH key
hcloud ssh-key create --name my-key --public-key-from-file ~/.ssh/id_ed25519.pub
# List SSH keys
hcloud ssh-key list
# Delete an SSH key
hcloud ssh-key delete my-key
Task F: Set up a server for Coolify
A common workflow — provision a Hetzner server and install Coolify:
# 1. Create a server (cx32 recommended for Coolify)
hcloud server create \
--name coolify-server \
--type cx32 \
--image ubuntu-24.04 \
--location fsn1 \
--ssh-key my-key
# 2. Create and apply a firewall
hcloud firewall create --name coolify-firewall
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 22 --source-ips 0.0.0.0/0 --description "SSH"
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 80 --source-ips 0.0.0.0/0 --description "HTTP"
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 443 --source-ips 0.0.0.0/0 --description "HTTPS"
hcloud firewall add-rule coolify-firewall --direction in --protocol tcp --port 8000 --source-ips 0.0.0.0/0 --description "Coolify UI"
hcloud firewall apply-to-resource coolify-firewall --type server --server coolify-server
# 3. Get the server IP
hcloud server ip coolify-server
# 4. SSH in and install Coolify
ssh root@<server-ip> "curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash"
After installation, access Coolify at http://<server-ip>:8000 and complete the setup wizard.
Examples
Example 1: Provision a production server with firewall and volume
User request: "Create a Hetzner server for my production app with a firewall and a 100GB data volume"
Steps taken:
# Create the server
$ hcloud server create --name prod-api --type cx32 --image ubuntu-24.04 --location fsn1 --ssh-key deploy-key
Server 12345678 created
# Create and configure firewall
$ hcloud firewall create --name prod-firewall
$ hcloud firewall add-rule prod-firewall --direction in --protocol tcp --port 22 --source-ips 203.0.113.0/32 --description "SSH from office"
$ hcloud firewall add-rule prod-firewall --direction in --protocol tcp --port 443 --source-ips 0.0.0.0/0 --description "HTTPS"
$ hcloud firewall apply-to-resource prod-firewall --type server --server prod-api
# Attach a data volume
$ hcloud volume create --name prod-data --size 100 --server prod-api --format ext4
Volume 87654321 created and attached at /mnt/HC_Volume_87654321
Example 2: Create a snapshot before a risky upgrade
User request: "Take a snapshot of my server before I upgrade the database"
Steps taken:
$ hcloud server create-image my-server --type snapshot --description "Pre-DB-upgrade 2024-01-15"
Image 11223344 created from server my-server (status: creating)
# Verify snapshot is ready
$ hcloud image describe 11223344
Status: available
Size: 18.40 GB
Created: 2024-01-15T10:30:00+00:00
# After upgrade, if something goes wrong:
# hcloud server rebuild my-server --image 11223344
Guidelines
- Always create a firewall before exposing a server to the internet. At minimum, restrict SSH to known IPs.
- Use SSH keys instead of passwords. Hetzner disables password auth by default on new servers.
- Take snapshots before risky operations (OS upgrades, database migrations). Snapshots are billed by size.
- For Coolify servers,
cx32(4 vCPU, 8 GB RAM) is the recommended minimum.cx22works for testing. - Use private networks for server-to-server communication instead of public IPs.
- Volumes can be resized up (not down) without downtime. Plan initial sizes conservatively.
- Floating IPs let you swap servers behind a stable IP address — useful for zero-downtime migrations.
- Server types can be upgraded (not downgraded for shared types). The server must be powered off during resize.
- Use
hcloud server list -o columns=name,status,ipv4,server_typefor clean output in scripts. - Hetzner locations in Europe (fsn1, nbg1, hel1) generally have the best pricing. US and Asia locations cost more.