$linuxjunkies
>

hcloud(1)

Control Hetzner Cloud resources from the command line.

UbuntuDebianFedoraArch

Synopsis

hcloud [OPTIONS] COMMAND [ARGS]...

Description

hcloud is the official command-line interface for Hetzner Cloud, a public cloud infrastructure provider. It allows you to manage servers, volumes, networks, floating IPs, images, and other cloud resources directly from your terminal.

You must authenticate with an API token, typically set via the HCLOUD_TOKEN environment variable or passed with the --token flag. Most operations require an active Hetzner Cloud account.

Common options

FlagWhat it does
-h, --helpShow help message and exit
--versionShow version number and exit
--token TOKENHetzner Cloud API token (overrides HCLOUD_TOKEN env var)
--poll-interval SECONDSPolling interval when waiting for actions to complete (default: 1s)
-o, --output FORMATOutput format: json, yaml, or table (default: table)
--quietSuppress output and only show exit code

Examples

List all servers in your account with their IPs and status

hcloud server list

Create a new server named web01 with a small instance type and Ubuntu image

hcloud server create --name web01 --type cx11 --image ubuntu-22.04

Power on the server with ID 12345

hcloud server power-on 12345

Create a 10GB volume and attach it to server ID 12345

hcloud volume create --name data-vol --size 10 --server 12345

Create a floating IPv4 address and assign it to a server

hcloud floating-ip create --type ipv4 --name public-ip --server 12345

Show detailed information about the server named 'web01'

hcloud server describe web01

List all available images sorted by creation date

hcloud image list --sort created

Delete the server named web01 without confirmation prompt

hcloud server delete --name web01 --force

Related commands