hcloud
Manage Hetzner Cloud resources
TLDR
Show available commands and flags
Display help
Show available commands and flags for hcloud contexts
SYNOPSIS
hcloud [command] [options]
PARAMETERS
completion
Generates shell completion code.
version
Shows the hcloud version.
token
Sets the API token to use for authentication.
help
Displays help for hcloud and its subcommands.
server
Subcommand for server management (create, delete, list, etc.).
volume
Subcommand for volume management (create, delete, list, etc.).
ssh-key
Subcommand for SSH key management (create, delete, list, etc.).
image
Subcommand for image management (list).
location
Subcommand for location management (list).
datacenter
Subcommand for datacenter management (list).
network
Subcommand for network management.
firewall
Subcommand for firewall management.
load-balancer
Subcommand for load balancer management.
DESCRIPTION
The hcloud command-line interface (CLI) is a tool for interacting with the Hetzner Cloud API. It allows users to manage Hetzner Cloud resources such as servers, volumes, networks, firewalls, load balancers, and SSH keys directly from the terminal. With hcloud, you can create, delete, modify, and monitor your cloud infrastructure in an automated and efficient manner.
The CLI supports various operations like server creation, image management, network configuration, and snapshot handling. It provides an alternative to the Hetzner Cloud web console, offering enhanced scripting and automation capabilities. The tool is designed for developers, system administrators, and anyone who prefers a command-line interface for managing their cloud resources. It simplifies complex tasks, improves productivity, and integrates seamlessly into existing workflows. It usually requires an API token.
CAVEATS
Requires a valid Hetzner Cloud API token for authentication. Rate limits may apply to API requests. Familiarity with Hetzner Cloud concepts is recommended for effective use.
CONFIGURATION
hcloud stores its configuration in a file located at `~/.config/hcloud/cli.toml`. You can configure the API token and default context here. You can also configure the output format (e.g., JSON).
Example:
[cli]
active_context = "my-context"
[contexts.my-context]
token = "YOUR_API_TOKEN"
EXAMPLES
List all servers:
`hcloud server list`
Create a new server:
`hcloud server create --name my-server --type CX11 --image ubuntu-20.04 --location nbg1`
Delete a server:
`hcloud server delete
HISTORY
The hcloud CLI was developed by Hetzner Online GmbH to provide a command-line interface for their cloud platform. Its development and adoption have grown alongside the Hetzner Cloud service, catering to users who need programmatic control over their infrastructure. The tool is actively maintained and updated with new features and improvements.