LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hcloud

command-line interface for Hetzner Cloud

TLDR

List servers
$ hcloud server list
copy
Create server
$ hcloud server create --name [myserver] --type [cx22] --image [ubuntu-24.04]
copy
SSH to server
$ hcloud server ssh [myserver]
copy
Delete server
$ hcloud server delete [myserver]
copy
List images
$ hcloud image list
copy
Create snapshot
$ hcloud server create-image [myserver] --type snapshot
copy

SYNOPSIS

hcloud [global-options] command subcommand [options]

DESCRIPTION

hcloud is the command-line interface for Hetzner Cloud. It manages cloud servers, images, volumes, and networks.The tool provides complete control over Hetzner Cloud infrastructure. It supports automation and scripting for cloud resource management.

PARAMETERS

COMMAND

Resource or subcommand to execute.
server
Manage cloud servers.
image
Manage server images and snapshots.
volume
Manage block storage volumes.
network
Manage private networks.
firewall
Manage firewalls and rules.
load-balancer
Manage load balancers.
ssh-key
Manage SSH keys.
certificate
Manage TLS certificates.
context
Manage CLI contexts (project/API token profiles).
config
Manage local CLI configuration.
--context name
Use a specific context instead of the active one.
-o, --output format
Output format: table, json, or yaml.
--debug
Enable debug output.
--help
Display help information.

INSTALL

sudo apt install hcloud-cli
copy
sudo dnf install hcloud
copy
sudo pacman -S hcloud
copy
sudo apk add hcloud
copy
sudo zypper install hcloud-cli
copy
brew install hcloud
copy
nix profile install nixpkgs#hcloud
copy

CAVEATS

Requires API token. Hetzner Cloud specific. Some operations incur costs.

HISTORY

hcloud was developed by Hetzner as the official CLI for their cloud platform.

SEE ALSO

doctl(1), aws(1), gcloud(1)

RESOURCES

Copied to clipboard
Kai