PHPackages                             ghostcompiler/laravel-hetzner-robot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ghostcompiler/laravel-hetzner-robot

ActiveLibrary[API Development](/categories/api)

ghostcompiler/laravel-hetzner-robot
===================================

Production-ready Laravel SDK for the Hetzner Robot API

v1.1.0(1mo ago)202.3kMITPHPPHP ^8.2 || ^8.3 || ^8.4 || ^8.5CI passing

Since Jun 14Pushed 3w agoCompare

[ Source](https://github.com/ghostcompiler/laravel-hetzner-robot)[ Packagist](https://packagist.org/packages/ghostcompiler/laravel-hetzner-robot)[ RSS](/packages/ghostcompiler-laravel-hetzner-robot/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (18)Versions (3)Used By (0)

 [![Laravel Hetzner Robot](https://camo.githubusercontent.com/7a311440d646263aeef835cc3b8d3f30b2c35f8fbf32c26ecf9a971070371ca9/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646a6776666c3174762f696d6167652f75706c6f61642f76313738303636363739312f6c6f676f5f6d716e716e342e706e67)](https://camo.githubusercontent.com/7a311440d646263aeef835cc3b8d3f30b2c35f8fbf32c26ecf9a971070371ca9/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646a6776666c3174762f696d6167652f75706c6f61642f76313738303636363739312f6c6f676f5f6d716e716e342e706e67)

Laravel Hetzner Robot SDK
=========================

[](#laravel-hetzner-robot-sdk)

 A premium, feature-rich PHP SDK and Laravel integration for the Hetzner Robot Web Service API, featuring rate-limit handling, automatic retries, and concurrent batch operations.

 [![Laravel](https://camo.githubusercontent.com/afee0cfa7253c01ebb1c83448d41b8ddd9d091dd5bc9e00b4533da6faa715e97/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/afee0cfa7253c01ebb1c83448d41b8ddd9d091dd5bc9e00b4533da6faa715e97/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [![PHP Version](https://camo.githubusercontent.com/22a8463a63c7c9f605dbc977742748c940ec017f0a569bcea7fe0f1144b9087a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e32253230746f253230382e352d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/22a8463a63c7c9f605dbc977742748c940ec017f0a569bcea7fe0f1144b9087a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e32253230746f253230382e352d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![Hetzner Robot API](https://camo.githubusercontent.com/49607d8f8a778d9dddd34ecd9d0a715dd32f9aa23b367625ea8ebe9937ae5227/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4865747a6e65722d2d526f626f742d4150492d4438353031323f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/49607d8f8a778d9dddd34ecd9d0a715dd32f9aa23b367625ea8ebe9937ae5227/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4865747a6e65722d2d526f626f742d4150492d4438353031323f7374796c653d666f722d7468652d6261646765) [![Ghost Compiler](https://camo.githubusercontent.com/929b6dba84633d06d1f92f362e1226d9ae8489c83d8d5294df8817b1192edf88/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c7425323042792d47686f7374253230436f6d70696c65722d3046313732413f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/929b6dba84633d06d1f92f362e1226d9ae8489c83d8d5294df8817b1192edf88/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c7425323042792d47686f7374253230436f6d70696c65722d3046313732413f7374796c653d666f722d7468652d6261646765)

 [![](https://camo.githubusercontent.com/15470d56df53ae45593af17c9294f7073d97116d58844de543e40999bc74130d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f67686f7374636f6d70696c65722f6c61726176656c2d6865747a6e65722d726f626f743f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562)](https://camo.githubusercontent.com/15470d56df53ae45593af17c9294f7073d97116d58844de543e40999bc74130d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f67686f7374636f6d70696c65722f6c61726176656c2d6865747a6e65722d726f626f743f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562) [![](https://camo.githubusercontent.com/f7acc8edd5bd2fc70746f486574a5ed4c1209344c4ca3dd25def33eae04a29eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67686f7374636f6d70696c65722f6c61726176656c2d6865747a6e65722d726f626f743f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374)](https://camo.githubusercontent.com/f7acc8edd5bd2fc70746f486574a5ed4c1209344c4ca3dd25def33eae04a29eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67686f7374636f6d70696c65722f6c61726176656c2d6865747a6e65722d726f626f743f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374)

---

Features
--------

[](#features)

- **100% Endpoint Coverage**: Complete implementation of all 14 Robot webservice sections (servers, IPs, subnets, resets, failover, Wake-on-LAN, boot options, reverse DNS, traffic, SSH keys, order products, Storage Boxes, firewalls, and vSwitches).
- **Basic Authentication**: Fully automated Basic Auth headers configuration.
- **Form Urlencoded Requests**: Parameters transfer mapped automatically using `application/x-www-form-urlencoded`.
- **Fail-Safe Retries &amp; Backoff**: Robust exponential backoff and rate-limit parsing handling `RATE_LIMIT_EXCEEDED` errors automatically.
- **Concurrently Pooled Processing**: Execute calls asynchronously or concurrently in batches.
- **Type-Safe DTOs**: Automated data hydration into standard PHP DTO structures.
- **Custom Exceptions**: Specialized mapping of API status codes (ValidationException, RateLimitException, AuthenticationException, etc.).

---

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require ghostcompiler/laravel-hetzner-robot
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Vendor\HetznerRobot\Providers\HetznerRobotServiceProvider" --tag="config"
```

Add your Hetzner Robot API Web Service credentials to your `.env` file:

```
HETZNER_ROBOT_USERNAME=your_web_service_username_here
HETZNER_ROBOT_PASSWORD=your_web_service_password_here
HETZNER_ROBOT_BASE_URL=https://robot-ws.your-server.de
HETZNER_ROBOT_TIMEOUT=30
HETZNER_ROBOT_RETRIES=3
HETZNER_ROBOT_LOGGING_ENABLED=true
```

---

Usage Examples
--------------

[](#usage-examples)

### Servers

[](#servers)

#### Listing and Finding Servers

[](#listing-and-finding-servers)

```
use Vendor\HetznerRobot\Facades\HetznerRobot;

// List all servers
$servers = HetznerRobot::servers()->all();

foreach ($servers as $server) {
    echo $server->serverName . ': ' . $server->serverIp . "\n";
}

// Find a server by number
$server = HetznerRobot::servers()->find(321);
echo "DC: " . $server->dc;
```

#### Updating and Cancelling a Server

[](#updating-and-cancelling-a-server)

```
// Rename a server
$server = HetznerRobot::servers()->update(321, [
    'server_name' => 'production-web-01'
]);

// Cancel a server
$cancellation = HetznerRobot::servers()->createCancellation(321, [
    'cancellation_reason' => 'no_longer_needed'
]);
echo "Cancellation status: " . $cancellation->cancellationDate;
```

---

### IP &amp; Subnet Management

[](#ip--subnet-management)

```
// List all IP addresses
$ips = HetznerRobot::ips()->all();

// Update reverse DNS (PTR)
$rdns = HetznerRobot::rdns()->create('123.123.123.123', 'your-domain.com');

// Enable MAC address for IP
$mac = HetznerRobot::ips()->updateMac('123.123.123.123', '00:11:22:33:44:55');
```

---

### Boot Configurations (Rescue, Linux, Windows, VNC)

[](#boot-configurations-rescue-linux-windows-vnc)

```
// Enable rescue system for server
$rescue = HetznerRobot::boots()->enableRescue(321, [
    'os' => 'linux',
    'arch' => 64
]);

echo "Temp password: " . $rescue->password;
```

---

### Storage Box

[](#storage-box)

```
// List storage boxes
$boxes = HetznerRobot::storageBoxes()->all();

// Create snapshot
$snapshot = HetznerRobot::storageBoxes()->createSnapshot($boxId);

// Get snapshot plan
$plan = HetznerRobot::storageBoxes()->getSnapshotPlan($boxId);

// Create sub-account
$sub = HetznerRobot::storageBoxes()->createSubAccount($boxId, [
    'homedirectory' => 'backup_sub'
]);
```

---

### Firewall Configuration

[](#firewall-configuration)

```
// Find firewall for server
$firewall = HetznerRobot::firewalls()->find(321);

// Create or update firewall rules
HetznerRobot::firewalls()->create(321, [
    'status' => 'active',
    'filter_ipv6' => false,
    'whitelist_hos' => true,
    'rules' => [
        'input' => [
            [
                'name' => 'Allow HTTP',
                'ip_version' => 'ipv4',
                'dst_port' => '80',
                'action' => 'accept'
            ]
        ]
    ]
]);
```

---

### vSwitches

[](#vswitches)

```
// List vswitches
$vswitches = HetznerRobot::vswitches()->all();

// Create vswitch
$vswitch = HetznerRobot::vswitches()->create([
    'name' => 'vswitch-prod',
    'vlan' => 4000
]);

// Add servers to vswitch
HetznerRobot::vswitches()->addServers($vswitch->id, [321, 421]);
```

---

### Asynchronous Requests

[](#asynchronous-requests)

```
use GuzzleHttp\Promise\PromiseInterface;

// Return a Guzzle Promise immediately
$promise = HetznerRobot::servers()->async()->all();

// Resolve promise when ready
$servers = $promise->wait();
```

---

### Batch Concurrent Operations

[](#batch-concurrent-operations)

```
// Execute multiple queries concurrently
$results = HetznerRobot::batch([
    fn () => HetznerRobot::servers()->find(321),
    fn () => HetznerRobot::servers()->find(421),
    fn () => HetznerRobot::storageBoxes()->find(123456),
]);

$server1 = $results[0];
$server2 = $results[1];
$storageBox = $results[2];
```

---

### Exception Handling

[](#exception-handling)

All exceptions inherit from `Vendor\HetznerRobot\Exceptions\HetznerException`.

```
use Vendor\HetznerRobot\Exceptions\AuthenticationException;
use Vendor\HetznerRobot\Exceptions\ValidationException;
use Vendor\HetznerRobot\Exceptions\RateLimitException;
use Vendor\HetznerRobot\Exceptions\HetznerException;

try {
    HetznerRobot::servers()->update(321, []);
} catch (AuthenticationException $e) {
    // 401 Unauthorized
} catch (ValidationException $e) {
    // 400 Bad Request / INVALID_INPUT
    $missingFields = $e->getMissingFields();
    $invalidFields = $e->getInvalidFields();
} catch (RateLimitException $e) {
    // 403 Rate Limit Exceeded
    $maxRequest = $e->getMaxRequest();
} catch (HetznerException $e) {
    // Base exception handler
}
```

---

Static Analysis &amp; Linting
-----------------------------

[](#static-analysis--linting)

Run PHPStan static analysis:

```
vendor/bin/phpstan analyse
```

Run Psalm static analysis:

```
vendor/bin/psalm
```

Format code with Pint:

```
vendor/bin/pint
```

---

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance93

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

44d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fdfc8e246731b39477bdf1668097bd52dfa52a1a9588235cbdd75d2dc7c6b927?d=identicon)[ghostcompiler](/maintainers/ghostcompiler)

---

Top Contributors

[![ghost-maintainer](https://avatars.githubusercontent.com/u/269910969?v=4)](https://github.com/ghost-maintainer "ghost-maintainer (2 commits)")[![ghostcompiler](https://avatars.githubusercontent.com/u/269910969?v=4)](https://github.com/ghostcompiler "ghostcompiler (1 commits)")

---

Tags

api-clientautomationdedicated-serverfailover-iphetznerhetzner-robotinfrastructurelaravellaravel-packagephprobot-apisdkserver-management

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ghostcompiler-laravel-hetzner-robot/health.svg)

```
[![Health](https://phpackages.com/badges/ghostcompiler-laravel-hetzner-robot/health.svg)](https://phpackages.com/packages/ghostcompiler-laravel-hetzner-robot)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k21](/packages/fleetbase-core-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
