Your first server¶
This walks the full lifecycle with the hcloud CLI: register a key, create a server, watch the action, reach it, and delete it. It works against either backend: on the stub the server is a bookkeeping record; on a libvirt host it's a real cloud-init VM you can SSH into.
Point the CLI at your endpoint first:
export HCLOUD_TOKEN=… # your token
export HCLOUD_ENDPOINT=https://api.example.com/v1 # or http://localhost:8000/v1
1. Register an SSH key¶
Your key is installed for root on the VM (matching Hetzner).
2. Create a server¶
Like Hetzner, this returns immediately with an action; the VM boots in the background. The CLI polls the action to completion for you. See How it works for the model.
3. Find its address¶
Each server gets a unique public IPv6 (see IPv6 networking).
4. SSH in¶
macOS
A bare IPv6 literal may need ssh -6 <addr>, or add AddressFamily inet6 to ~/.ssh/config; a client-side getaddrinfo quirk. If your machine has no IPv6 at all, jump through the host: ssh -J root@<host> root@<vm-ipv6>.
5. Power actions & cleanup¶
hcloud server reboot web1
hcloud server poweroff web1
hcloud server poweron web1
hcloud server delete web1
Power operations are idempotent (powering on a running server is a success no-op), and rebuild --image <name> re-images from the catalog.
Stub vs. real
Against the stub backend, steps 3–4 return an allocated address but there's no VM to reach. To boot a real, reachable VM, deploy to a Linux host: Deploying to a host.