Hetzner hcloud icon

Hetzner hcloud

Interact with the cloud api of the german infrastructure provider Hetzner.

Actions47

Server → Create

AI-generated

Summary

Create a new server instance on Hetzner Cloud with customizable options including image, server type, location, networks, volumes, firewalls, SSH keys, labels, and public network settings.

Inputs

  • name (required) — Unique name for the server following RFC 1123 hostname rules.
  • image (required) — ID or name of the image to create the server from.
  • server_type (required) — ID or name of the server type for hardware configuration.
  • location — ID or name of the location to create the server in.
  • networks — List of private network IDs to attach at creation.
  • volumes — List of volume IDs to attach at creation, must be in the same location.
  • firewalls — List of firewall IDs to apply to the server's public interface at creation.
  • ssh_keys — List of SSH key IDs or names to inject into the server for access.
  • labels — User-defined key/value pairs to label the server resource.
  • public_net — Public network options to enable/disable IPv4 and IPv6 and specify primary IPs.
  • automount — Boolean to automatically mount volumes after attachment.
  • placement_group — Placement group ID for server placement constraints.
  • start_after_create — Boolean to automatically power on the server after creation (default true).
  • user_data — Cloud-Init user data script (max 32 KiB) to configure the server on creation.

Output shape

a single object containing details of the created server including ID, status, networking, volumes attached, and next actions.

The returned data contains the full server resource as per Hetzner Cloud API, including any triggered next actions such as automatic powering on if enabled. Errors are reported if required parameters are missing or invalid.

Examples

Example 1: Create a new server with a specified image, server type, and SSH keys, that starts automatically after creation.

Set 'name', 'image', 'server_type', and provide 'ssh_keys'. Leave 'start_after_create' as true.

Links

Discussion