Skip to main content
skill CX Codex

hetzner-deploy — Claude Code skill: what it does, how to install

hetzner-deploy — a skill for managing Hetzner Cloud infrastructure via the hcloud CLI: servers, networks, firewalls, load balancers, DNS zones, and volumes.

MIT ★ 1,216 updated 2026-10-24

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add fcakyon/claude-codex-settings
/plugin install hetzner-skills@claude-settings
Open on GitHub

What hetzner-deploy does

The skill loads decision trees and reference files for hcloud, the Hetzner Cloud CLI. The agent gets command templates for creating servers (hcloud server create), configuring private networks, firewalls, load balancers, block volumes, and DNS zones. Inside: command trees by resource type (compute, networking, storage, DNS), ready-made workflows (quick server deploy, full stack with network and firewall), and output examples in JSON, YAML, and Go templates for scripting.

Authentication uses a Hetzner Cloud API token in the HCLOUD_TOKEN environment variable or a named context via hcloud context create. Tokens are generated in the project console under Security > API Tokens. Without a token, commands fail.

The skill advises querying current server types, pricing, and locations through the CLI (hcloud server-type list, hcloud location list) rather than relying on the agent's outdated data.

What it helps with

  • create a Hetzner server with cloud-init, firewall, and private network
  • set up a load balancer with multiple targets
  • import a DNS zone from a file
  • attach a block volume to a server with automount
  • list available server types and pricing

Example prompts for the agent

  • Deploy a cpx21 server with Ubuntu 24.04 in Nuremberg, add a firewall for SSH and HTTPS
  • Create a private network 10.0.0.0/16 and attach server app-1 to it
  • Set up a load balancer for servers web-1 and web-2 on port 80

How to install hetzner-deploy

1Plugin marketplace

/plugin marketplace add fcakyon/claude-codex-settings
/plugin install hetzner-skills@claude-settings

This installs the whole hetzner-skills plugin with all its skills

2Skills CLI (Vercel)

npx skills add fcakyon/claude-codex-settings --skill hetzner-deploy -a claude-code

3Manually: put the files in place

~/.claude/skills/hetzner-deploy/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/hetzner-deploy/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about hetzner-deploy

How do I install hetzner-deploy in Claude Code?

Run /plugin marketplace add fcakyon/claude-codex-settings, then /plugin install hetzner-skills@claude-settings. The skill appears in ~/.claude/skills/hetzner-deploy/SKILL.md.

What does hetzner-deploy do?

It loads hcloud command references and decision trees for working with Hetzner Cloud infrastructure: servers, networks, firewalls, load balancers, DNS, and block volumes. The agent gets command templates and workflows for common tasks.

What does hetzner-deploy require to work?

The hcloud CLI installed and a Hetzner Cloud project API token in the HCLOUD_TOKEN environment variable or a named context. Without the token, commands fail.

Source text

SKILL.md · MIT
---
name: hetzner-deploy
description: This skill should be used when user asks to "deploy to Hetzner", "create Hetzner server", "manage Hetzner Cloud", "hcloud CLI", or works with Hetzner Cloud infrastructure including servers, networks, firewalls, load balancers, DNS zones, and volumes.
references:
  - server
  - network
  - firewall
  - getting-started
license: MIT
---

# Hetzner Cloud CLI Skill

Skill for provisioning and managing infrastructure on Hetzner Cloud using the `hcloud` CLI. Use the decision trees below to find the right command group, then load detailed references.

Your knowledge of Hetzner Cloud pricing, server types, locations, and API behavior may be outdated. **Prefer retrieval over pre-training** when citing specific numbers, available types, or configuration options. The reference files alongside this skill are starting points extracted from the official CLI docs.

## Authentication

The CLI authenticates via API token. Set the `HCLOUD_TOKEN` environment variable or create a named context:

```bash
# Stateless (CI, scripting, agent use)
export HCLOUD_TOKEN="your-api-token"

# Named context (interactive use)
hcloud context create my-project
```

Generate tokens at https://console.hetzner.cloud under your project's Security > API Tokens.

## Installation

```bash
# macOS / Linux (Homebrew)
brew install hcloud

# Linux (binary)
curl -sSLO https://github.com/hetznercloud/cli/releases/latest/download/hcloud-linux-amd64.tar.gz
sudo tar -C /usr/local/bin --no-same-owner -xzf hcloud-linux-amd64.tar.gz hcloud

# Docker
docker run --rm -e HCLOUD_TOKEN="$HCLOUD_TOKEN" hetznercloud/cli:latest <command>
```

## Quick Decision Trees

### "I need compute"

```
Need a server?
├─ Create a new server → hcloud server create --name <n> --type <t> --image <img>
├─ With cloud-init user data → add --user-data-from-file <path>
├─ With firewall + network → add --firewall <fw> --network <net>
├─ List available types → hcloud server-type list
├─ List available images → hcloud image list
├─ SSH into server → hcloud server ssh <name>
├─ Create snapshot → hcloud server create-image --type snapshot <name>
├─ Rescue mode → hcloud server enable-rescue <name>
└─ Delete server → hcloud server delete <name>
```

### "I need networking"

```
Need networking?
├─ Private network (VPC) → hcloud network create --name <n> --ip-range <cidr>
│  ├─ Add subnet → hcloud network add-subnet --network <n> --type cloud --network-zone <z> --ip-range <cidr>
│  └─ Attach server → hcloud server attach-to-network --network <n> --server <s>
├─ Firewall → hcloud firewall create --name <n> --rules-file <json>
│  ├─ Apply to server → hcloud firewall apply-to-resource --firewall <n> --type server --server <s>
│  └─ Replace rules → hcloud firewall replace-rules --rules-file <json> <name>
├─ Load balancer → hcloud load-balancer create --name <n> --type <t> --location <loc>
│  ├─ Add target → hcloud load-balancer add-target --server <s> <lb>
│  └─ Add service → hcloud load-balancer add-service --protocol <p> --listen-port <port> <lb>
├─ Floating IP → hcloud floating-ip create --type ipv4 --home-location <loc>
│  └─ Assign → hcloud floating-ip assign <ip> --server <s>
└─ Primary IP → hcloud primary-ip create --name <n> --type ipv4 --datacenter <dc>
```

### "I need storage"

```
Need storage?
├─ Block volume → hcloud volume create --name <n> --size <gb> --server <s> --automount --format ext4
│  ├─ Resize → hcloud volume resize --size <gb> <name>
│  └─ Detach → hcloud volume detach <name>
└─ Storage Box (managed NFS/CIFS/SCP) → hcloud storage-box create --name <n> --type <t> --location <loc>
   ├─ Subaccounts → hcloud storage-box subaccount create <box>
   └─ Snapshots → hcloud storage-box snapshot create <box>
```

### "I need DNS"

```
Need DNS?
├─ Create zone → hcloud zone create --name <domain>
├─ Add records → hcloud zone add-records --zone <z> --type A --name <n> --value <ip>
├─ Set full record set → hcloud zone set-records --zone <z> --type A --name <n> --value <ip1> --value <ip2>
├─ Import zone file → hcloud zone import-zonefile --zone <z> <file>
├─ Export zone file → hcloud zone export-zonefile <zone>
└─ Manage individual RRSets → hcloud zone rrset list <zone>
```

### "I need info"

```
Need reference data?
├─ Server types + pricing → hcloud server-type list / describe <type>
├─ Locations → hcloud location list / describe <loc>
├─ Datacenters → hcloud datacenter list / describe <dc>
├─ Available images → hcloud image list
├─ ISO images → hcloud iso list
├─ Load balancer types → hcloud load-balancer-type list
└─ Storage box types → hcloud storage-box-type list
```

### "I need to configure the CLI"

```
Need CLI config?
├─ Create context → hcloud context create <name>
├─ Switch context → hcloud context use <name>
├─ Set default SSH key → hcloud config set default-ssh-keys <key>
├─ View config → hcloud config list
└─ Shell completion → hcloud completion bash/zsh/fish
```

## Common Workflows

### Quick server deploy

```bash
# Upload SSH key, create server, connect
hcloud ssh-key create --name deploy-key --public-key-from-file ~/.ssh/id_ed25519.pub
hcloud server create --name web-1 --type cpx21 --image ubuntu-24.04 --ssh-key deploy-key --location fsn1
hcloud server ssh web-1
```

### Full stack with network + firewall

```bash
# Network
hcloud network create --name prod-net --ip-range 10.0.0.0/16
hcloud network add-subnet --network prod-net --type cloud --network-zone eu-central --ip-range 10.0.1.0/24

# Firewall (allow SSH + HTTP/S)
cat > rules.json << 'EOF'
[
  {"direction":"in","protocol":"tcp","port":"22","source_ips":["0.0.0.0/0","::/0"]},
  {"direction":"in","protocol":"tcp","port":"80","source_ips":["0.0.0.0/0","::/0"]},
  {"direction":"in","protocol":"tcp","port":"443","source_ips":["0.0.0.0/0","::/0"]}
]
EOF
hcloud firewall create --name web-fw --rules-file rules.json

# Server with network + firewall
hcloud server create --name app-1 --type cpx21 --image ubuntu-24.04 \
  --ssh-key deploy-key --network prod-net --firewall web-fw --location fsn1

# Load balancer
hcloud load-balancer create --name web-lb --type lb11 --location fsn1
hcloud load-balancer attach-to-network --network prod-net web-lb
hcloud load-balancer add-target --server app-1 web-lb
hcloud load-balancer add-service --protocol tcp --listen-port 80 --destination-port 80 web-lb
```

## Output Formats

All `describe`, `list`, and `create` commands support structured output for scripting and agent use:

```bash
hcloud server list --output json          # JSON array
hcloud server describe my-srv --output yaml  # YAML
hcloud server describe my-srv --output format='{{.ServerType.Cores}}'  # Go template
hcloud server list --output columns=id,name,status  # Custom table columns
```

## Resource Index

### Compute
| Resource | Reference |
|----------|-----------|
| Server | `references/server/` |
| Server Types | `references/info/` |

### Networking
| Resource | Reference |
|----------|-----------|
| Network (VPC) | `references/network/` |
| Firewall | `references/firewall/` |
| Load Balancer | `references/load-balancer/` |
| Floating IP | `references/floating-ip/` |
| Primary IP | `references/primary-ip/` |

### Storage
| Resource | Reference |
|----------|-----------|
| Volume | `references/volume/` |
| Storage Box | `references/storage-box/` |

### DNS
| Resource | Reference |
|----------|-----------|
| Zone & Records | `references/dns/` |

### Security & Access
| Resource | Reference |
|----------|-----------|
| SSH Key | `references/ssh-key/` |
| Certificate | `references/certificate/` |
| Image | `references/image/` |
| Placement Group | `references/placement-group/` |

### Reference Data
| Resource | Reference |
|----------|-----------|
| Server Types, LB Types, Storage Box Types, Datacenters, Locations, ISOs | `references/info/` |

### CLI Configuration
| Resource | Reference |
|----------|-----------|
| Config, Context, Completion | `references/config/` |
| All Resources | `references/all/` |
| Raw API Calls | `references/api/` |

### Getting Started
| Resource | Reference |
|----------|-----------|
| Setup, Server Tutorial, Output Options, Configuration | `references/getting-started/` |

© fcakyon · MIT · fcakyon/claude-codex-settings

Similar skills

All skills for DevOps and infrastructure →

From the same set113

The whole set →
supabase-js Adds practical cheat sheets and patterns for @supabase/supabase-js to your AI coding agent, covering Auth, Storage, Edge Functions, and queries. CX Codex +1 ★ 1,216repo stars create-pr The create-pr skill checks a branch, prepares a review-ready pull request, and publishes it with gh. Use it when you want an agent to handle the PR workflow for your changes. CX Codex +1 ★ 1,216repo stars electron Drives Electron desktop apps like Slack, VS Code, Discord, Figma and Spotify over the Chrome DevTools Protocol. CX Codex +1 ★ 1,216repo stars pull The pull command syncs local configuration, database schema, and Edge Functions with a linked Supabase project. Use it to refresh them in one run. CX Codex +1 ★ 1,216repo stars ui-regression ui-regression verifies web apps and browser extensions on localhost, staging, or production across user flows, recovery states, locales, and viewports. CX Codex +1 ★ 1,216repo stars humanize humanize is a Claude Code skill for revising text to sound natural while keeping its meaning. It activates on requests to edit replies, docs, comments, emails, and other writing. CX Codex +1 ★ 1,216repo stars writing-guidelines writing-guidelines audits technical documentation, guides, and interface copy against strict editorial rules and AI phrasing patterns. CX Codex +1 ★ 1,216repo stars aeo This skill builds AEO plans, reviews AI answers and sources, and maps content work for products that need to appear in buyer-focused AI search. CX Codex +1 ★ 1,216repo stars

Project sponsors

Companies that keep this analytics open