Skip to content

Using the hcloud CLI

cloudalone implements a subset of the hcloud API faithfully enough that the official hcloud CLI and client libraries drive it unchanged. You just point them at your endpoint.

Point the tools at your endpoint

export HCLOUD_TOKEN=$(ssh root@<host> 'grep token /home/cloudalone/config.toml | cut -d\" -f2')
export HCLOUD_ENDPOINT=https://api.example.com/v1     # or http://[<host-ipv6>]:8000/v1

Both the CLI and the Python client honour HCLOUD_ENDPOINT; the Python client takes it as api_endpoint=.

What's supported

Area Commands
Servers server create / list / describe / delete, server ip -6
Power & rebuild server poweron / poweroff / reboot / shutdown / reset, server rebuild --image
SSH keys ssh-key create / list / describe / delete
Catalog (read-only) server-type list, image list, location list, datacenter list

Servers and SSH keys can be referenced by name or numeric id, matching the CLI's own behaviour. Filters the CLI relies on (server list --name, action ?id= polling) are implemented, so there's no "actions not found" noise and no wrong-VM operations.

Typical session

hcloud ssh-key create --name me --public-key-from-file ~/.ssh/id_ed25519.pub
hcloud server create --name web1 --type small --image debian-13 --ssh-key me
hcloud server list
ssh root@$(hcloud server ip -6 web1)
hcloud server delete web1

From Python

from hcloud import Client
from hcloud.images import Image
from hcloud.server_types import ServerType

client = Client(token="…", api_endpoint="https://api.example.com/v1")

action, server = client.servers.create(
    name="web1",
    server_type=ServerType(name="small"),
    image=Image(name="debian-13"),
).__iter__()  # see the client docs for the exact return shape

client.servers.get_all()

The repo's scripts/conformance.py is a working end-to-end example against the real client.

Not implemented

Networks, volumes, floating IPs, load balancers, firewalls, placement groups, and IPv4 for guests are out of scope. Pagination (page/per_page) is a stub (safe because every result fits one page). See the REST API reference for the exact surface.