ericrisco/rsc-harness / skills/hetzner
hetzner
UnverifiedUse when provisioning or hardening a Hetzner Cloud VPS: picking the plan/location (CX/CPX/CAX/CCX), bringing it up reproducibly with hcloud + cloud-init, locking down SSH, and wiring the Cloud Firewall to hand off a Docker-ready host. NOT app deploys on Coolify (that is `coolify`), NOT Dockerfiles (that is `docker`), NOT another provider (that is `digitalocean`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.3 KB |
| evals/README.md | markdown | 1.8 KB |
| evals/cases.yaml | config | 3.6 KB |
| references/cloud-init.md | markdown | 4.3 KB |
| references/plans-and-locations.md | markdown | 2.9 KB |
| scripts/verify.shexecutable | script | 3.9 KB |
references/cloud-init.md
View on GitHub# Reference: cloud-init + Cloud Firewall
The full, annotated first-boot configuration and the firewall script the SKILL
trims. Everything here runs **before first login** so the box is never reachable
in an unhardened state.
## Full annotated `cloud-init.yaml`
```yaml
#cloud-config
# Runs on first boot via: hcloud server create --user-data-from-file cloud-init.yaml
# --- non-root sudo user (root SSH gets disabled below) ---
users:
- name: deploy
groups: [sudo]
shell: /bin/bash
sudo: ["ALL=(ALL) NOPASSWD:ALL"] # drop NOPASSWD if you want a sudo password
ssh_authorized_keys:
- ssh-ed25519 AAAA... you@laptop # YOUR real public key — never a placeholder
# --- kill root + password login at the cloud-init layer (belt) ---
disable_root: true # cloud-init disables the root account's SSH
ssh_pwauth: false # cloud-init disables password auth
# --- packages for hardening + patching ---
package_update: true
package_upgrade: true
packages:
- ufw
- fail2ban
- unattended-upgrades
# --- drop-in sshd hardening (braces) so an image default can't re-enable it ---
write_files:
- path: /etc/ssh/sshd_config.d/99-hardening.conf
content: |
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
ChallengeResponseAuthentication no
# Optional: move the port. Obscurity, not security — keep key-only + firewall regardless.
# Port 2222
- path: /etc/apt/apt.conf.d/20auto-upgrades
content: |
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
- path: /etc/fail2ban/jail.d/sshd.local
content: |
[sshd]
enabled = true
maxretry = 4
bantime = 1h
# --- apply it on first boot ---
runcmd:
- ufw default deny incoming
- ufw default allow outgoing
- ufw allow 22/tcp # change to your moved port if you set Port above
- ufw allow 80/tcp
- ufw allow 443/tcp
- ufw --force enable
- systemctl enable --now fail2ban
- systemctl enable --now unattended-upgrades
- systemctl restart ssh
```
Notes:
- `disable_root` + `ssh_pwauth: false` are the cloud-init-native way; the
`sshd_config.d` drop-in is the redundant explicit layer so a base-image default
can't quietly re-enable password/root login. Both saying the same thing is
intentional.
- If you move the SSH port, change **both** the `Port` directive and the `ufw
allow` line, and add the moved port to the Cloud Firewall before you reboot —
or you lock yourself out.
- Optional Docker install (only if you're not handing off to the `coolify` skill
to install it): append the official `get-docker.sh` convenience step in
`runcmd`, then add `deploy` to the `docker` group.
## Cloud Firewall script
Create the edge firewall, scope it, and attach it. Inbound is default-deny — you
only enumerate what you allow.
```bash
#!/usr/bin/env bash
set -euo pipefail
FW=app-edge
SRV=app-01
MY_IP=203.0.113.4/32 # your admin IP/range for SSH
hcloud firewall create --name "$FW"
# Public web
hcloud firewall add-rule "$FW" --direction in --protocol tcp --port 80 --source-ips 0.0.0.0/0 --source-ips ::/0
hcloud firewall add-rule "$FW" --direction in --protocol tcp --port 443 --source-ips 0.0.0.0/0 --source-ips ::/0
# SSH scoped to you (open to the world only during initial setup, then tighten)
hcloud firewall add-rule "$FW" --direction in --protocol tcp --port 22 --source-ips "$MY_IP"
hcloud firewall apply-to-resource "$FW" --type server --server "$SRV"
hcloud firewall describe "$FW"
```
To open SSH to the world for the first connection, then lock it down:
```bash
hcloud firewall add-rule "$FW" --direction in --protocol tcp --port 22 --source-ips 0.0.0.0/0 --source-ips ::/0
# ... do initial setup, confirm key login works ...
hcloud firewall delete-rule "$FW" --direction in --protocol tcp --port 22 --source-ips 0.0.0.0/0 --source-ips ::/0
hcloud firewall add-rule "$FW" --direction in --protocol tcp --port 22 --source-ips "$MY_IP"
```
Two layers, why each:
- **Cloud Firewall (edge):** stateful, filters before the packet reaches the VM,
configured via API/console — survives a broken host config. Primary defense.
- **Host `ufw`:** defense-in-depth — if the Cloud Firewall is ever detached or
mis-edited, the box still isn't wide open. Keep the two allowlists in sync.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |