This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
This package is abandoned and no longer maintained. The author suggests using the lkdevelopment/hetzner-cloud-php-sdk package instead.

Hetzner Cloud Client in PHP

v1.0.2 2018-07-17 19:11 UTC

This package is not auto-updated.

Last update: 2020-04-12 19:16:47 UTC


Please use instead!

A PHP wrapper to be used with Hetzner Cloud API.

Scrutinizer Code Quality Code Coverage Build Status Build Status StyleCI Latest Stable Version Total Downloads

A simple wrapper for the Hetzner Cloud API in PHP.


  • Light and fast thanks to lazy loading of API classes
  • Extensively tested



via composer

composer require arkste/hetzner-cloud-client-php php-http/guzzle6-adapter

Why php-http/guzzle6-adapter? We are decoupled from any HTTP messaging client with help by HTTPlug.

You can visit HTTPlug for library users to get more information about installing HTTPlug related packages.

Basic usage of hetzner-cloud-client-php client


use HetznerCloud\HttpClient\Message\ResponseMediator;

// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';

// Create Client and authenticate with your token
$client = \HetznerCloud\Client::create()

// Get all Servers
$servers = $client->servers()->all();

// Get additional information about the last Response
$lastResponse = $client->getLastResponse();
$pagination = ResponseMediator::getPagination($lastResponse);
$apiLimit = ResponseMediator::getApiLimit($lastResponse);

From $client object, you can access to all Hetzner Cloud.

Example with Pager

to fetch all actions with pagination:


// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';

// Create Client and authenticate with your token
$client = \HetznerCloud\Client::create()

// Create ResultPager with Client
$pager = new \HetznerCloud\ResultPager($client);

// Get all Actions
$actions = $pager->fetchAll($client->actions(), 'all');


Version Hetzner Cloud API Version
1.x V1

Why no PHP 7.0 Features?

This Library aims to be as compatible as possible, thats why it only needs PHP >= 5.5.9 and depends on very few composer packages.


hetzner-cloud-client-php is licensed under the MIT License - see the LICENSE file for details


This Library is heavily inspired by php-github-api & php-gitlab-api.

Thanks to Hetzner for the high quality API and documentation.