Go to file
2025-07-24 17:31:36 +02:00
examples added the ability to order server addons (like ipv4 address) + updated server ordering example script to showcase new functionality 2025-07-24 13:52:01 +02:00
src updated models to work with API + added a README 2025-07-24 17:31:36 +02:00
.env first commit: added functionality for server listing, ssh key management and boot configuration management 2025-07-17 20:08:48 +02:00
.gitignore first commit: added functionality for server listing, ssh key management and boot configuration management 2025-07-17 20:08:48 +02:00
Cargo.lock first commit: added functionality for server listing, ssh key management and boot configuration management 2025-07-17 20:08:48 +02:00
Cargo.toml first commit: added functionality for server listing, ssh key management and boot configuration management 2025-07-17 20:08:48 +02:00
README.md updated models to work with API + added a README 2025-07-24 17:31:36 +02:00

Hetzner Robot API Rhai Client

This project provides a Rhai scripting client for interacting with the Hetzner Robot API. It allows users to manage their Hetzner servers, SSH keys, boot configurations, and order new servers and addons directly from Rhai scripts.

Goal

The primary goal of this project is to offer a flexible and scriptable interface to the Hetzner Robot API, enabling automation of server management tasks. By leveraging Rhai, users can write simple yet powerful scripts to interact with their Hetzner infrastructure.

Examples

The examples/ directory contains several Rhai scripts demonstrating the capabilities of this client:

  • examples/server_management.rhai: Showcases basic server management operations, such as fetching server details and updating server names.
  • examples/ssh_key_management.rhai: Demonstrates how to list, add, update, and delete SSH keys.
  • examples/boot_management.rhai: Provides examples for managing server boot configurations, including rescue mode.
  • examples/server_ordering.rhai: Contains comprehensive examples for ordering new servers and managing server addons, including:
    • Getting available server products.
    • Ordering new servers.
    • Listing server order transactions.
    • Fetching specific transaction details.
    • Listing and ordering auction servers.
    • Getting available server addon products.
    • Listing server addon transactions.
    • Ordering server addons.
    • Querying specific server addon transactions.

Important Note on IPv6 Addresses

When ordering a server without an IPv4 addon, the server might be assigned an IPv6 network like 2a01:4f8:221:1fe3::/64. It's important to note that you cannot directly SSH to this network address. Hetzner does not use SLAAC for server assignments. The actual address to SSH to will typically be the network address with 2 appended (e.g., 2a01:4f8:221:1fe3::2).