Skip to content
Vitaly Kopylov edited this page Jun 17, 2022 · 1 revision

htz

CLI app for managing servers on the Hetzner cloud platform

To use this application, you need an API token, so add the given environment variable to your terminal config file

$HETZNER_API_TOKEN = your_api_key

Usage:

$ htz [OPTIONS] COMMAND [ARGS]...

Options:

  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • info: Information about available data centers,...
  • server: Operations with servers
  • version: Show app version

htz info

Information about available data centers, images, ISOs and more

Usage:

$ htz info [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • datacenter: Information about datacenters available on...
  • price: Information about price for all resources...
  • server: Information about server types

htz info datacenter

Information about datacenters available on platform

Usage:

$ htz info datacenter [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • all: List all datacenters, which available in...

htz info datacenter all

List all datacenters, which available in current moment

Usage:

$ htz info datacenter all [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price

Information about price for all resources available on the platform

Usage:

$ htz info price [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • all: Information about price for all resources
  • backup: Information about price for server backup
  • float_ip: Information about price for floating IP
  • float_ips: Information about price for floating IPs
  • image: Information about price for image
  • load_balancer: Information about price and types for load...
  • server: Information about price and types for server
  • traffic: Information about traffic price
  • volume: Information about volume price

htz info price all

Information about price for all resources

Usage:

$ htz info price all [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price backup

Information about price for server backup

Usage:

$ htz info price backup [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price float_ip

Information about price for floating IP

Usage:

$ htz info price float_ip [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price float_ips

Information about price for floating IPs

Usage:

$ htz info price float_ips [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price image

Information about price for image

Usage:

$ htz info price image [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price load_balancer

Information about price and types for load balancer

Usage:

$ htz info price load_balancer [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price server

Information about price and types for server

Usage:

$ htz info price server [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price traffic

Information about traffic price

Usage:

$ htz info price traffic [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info price volume

Information about volume price

Usage:

$ htz info price volume [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info server

Information about server types

Usage:

$ htz info server [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • all: Information about all server types
  • select: Information for a specific server type by ID

htz info server all

Information about all server types

Usage:

$ htz info server all [OPTIONS]

Options:

  • --help: Show this message and exit.

htz info server select

Information for a specific server type by ID

Usage:

$ htz info server select [OPTIONS] ID

Arguments:

  • ID: Server type id [required]

Options:

  • --help: Show this message and exit.

htz server

Operations with servers

Usage:

$ htz server [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • create: Create a server with custom options
  • delete: Delete a server
  • down: Power off server by ID
  • info: Get a detailed description of the server by...
  • list: Lists all servers you own
  • up: Power on server by ID

htz server create

Create a server with custom options

Usage:

$ htz server create [OPTIONS] NAME [IMAGE] [LOCATION] [SERVER_TYPE] [AUTOMOUNT] [START_AFTER_CREATE]

Arguments:

  • NAME: Server name [required]
  • [IMAGE]: Server build image [default: ubuntu-20.04]
  • [LOCATION]: ID or name of Location to create Server in [default: nbg1]
  • [SERVER_TYPE]: ID or name of the Server type [default: cx11]
  • [AUTOMOUNT]: Auto-mount Volumes after attach [default: False]
  • [START_AFTER_CREATE]: Start Server right after creation [default: False]

Options:

  • --help: Show this message and exit.

htz server delete

Delete a server

Usage:

$ htz server delete [OPTIONS] ID_SERVER

Arguments:

  • ID_SERVER: ID of the Server [required]

Options:

  • --help: Show this message and exit.

htz server down

Power off server by ID

Usage:

$ htz server down [OPTIONS] ID_SERVER

Arguments:

  • ID_SERVER: ID of the Server [required]

Options:

  • --help: Show this message and exit.

htz server info

Get a detailed description of the server by its ID

Usage:

$ htz server info [OPTIONS] ID_SERVER

Arguments:

  • ID_SERVER: ID of the Server [required]

Options:

  • --help: Show this message and exit.

htz server list

Lists all servers you own

Usage:

$ htz server list [OPTIONS]

Options:

  • --help: Show this message and exit.

htz server up

Power on server by ID

Usage:

$ htz server up [OPTIONS] ID_SERVER

Arguments:

  • ID_SERVER: ID of the Server [required]

Options:

  • --help: Show this message and exit.

htz version

Show app version

Usage:

$ htz version [OPTIONS]

Options:

  • --help: Show this message and exit.