PHPackages                             webfoersterei/hetzner-cloud-api-client - 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. webfoersterei/hetzner-cloud-api-client

ActiveLibrary[API Development](/categories/api)

webfoersterei/hetzner-cloud-api-client
======================================

A client to manage Hetzner's Cloud via API

0.2.1-alpha(7y ago)71055MITPHPPHP &gt;=7.1CI failing

Since Jan 30Pushed 7y ago4 watchersCompare

[ Source](https://github.com/webfoersterei/hetzner-cloud-api-client)[ Packagist](https://packagist.org/packages/webfoersterei/hetzner-cloud-api-client)[ RSS](/packages/webfoersterei-hetzner-cloud-api-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (8)Versions (5)Used By (0)

hetzner-cloud-api-client
========================

[](#hetzner-cloud-api-client)

API Client for managing Hetzner's Cloud

[![Build Status](https://camo.githubusercontent.com/ba197a9ea9913722510a5557c698091f6aee0b8f541d9fcd152be76103a9a0b4/68747470733a2f2f7472617669732d63692e6f72672f776562666f65727374657265692f6865747a6e65722d636c6f75642d6170692d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/webfoersterei/hetzner-cloud-api-client)[![Packagist](https://camo.githubusercontent.com/8a94565619bc7a9895bdf4ccb643088d28575133866ae0da0ff363333045ec4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776562666f65727374657265692f6865747a6e65722d636c6f75642d6170692d636c69656e742e737667)](https://packagist.org/packages/webfoersterei/hetzner-cloud-api-client)[![Packagist Pre Release](https://camo.githubusercontent.com/3108811b2165bc280dcd730367c6358a7f221637b3b1304727755d53ef413544/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f776562666f65727374657265692f6865747a6e65722d636c6f75642d6170692d636c69656e742e737667)](https://packagist.org/packages/webfoersterei/hetzner-cloud-api-client)[![GitHub license](https://camo.githubusercontent.com/cfa9efcde39a5c2f7f7d92eba2097df53c107aa6351ec0ccc804308002b56bfa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f776562666f65727374657265692f6865747a6e65722d636c6f75642d6170692d636c69656e742e737667)](https://github.com/webfoersterei/hetzner-cloud-api-client/blob/master/LICENSE)

Usage
-----

[](#usage)

Install this package via composer `composer require webfoersterei/hetzner-cloud-api-client "dev-master@dev"`

**Note:** There is no stable release at the moment

After that you can use the client like this:

```
define('API_KEY', 'MYSECRETAPIKEY'); # See https://docs.hetzner.cloud/#header-authentication-1
$cloudApiClient = Webfoersterei\HetznerCloudApiClient\ClientFactory::create(API_KEY);

# You can now use the cloudApiClient. E.g:
$cloudApiClient->getServers();
```

Implemented Methods
-------------------

[](#implemented-methods)

The client provides implementations for the following methods (grouped by resources).

### Actions

[](#actions)

See:

- List all: `getActions()`
- Get one: `getAction(int $id)`

### Servers

[](#servers)

See:

- Get all: `getServers()`
- Get one: `getServer(int $id)`
- Create one: `createServer(CreateRequest $createRequest)`
- Rename: `changeServerName(int $id, string $name)`
- Delete one: `deleteServer(int $id)`

### ServerTypes

[](#servertypes)

See:

- Get all: `getServerTypes()`
- Get one: `getServerType(int $id)`

### Pricing

[](#pricing)

See:

- Get all: `getPricing()`

Contribute
----------

[](#contribute)

Feel free to contribute to this github repository by reporting bugs and ideas to improve this API-client.

Examples
--------

[](#examples)

### List of serverTypes

[](#list-of-servertypes)

Lists all serverTypes: name and specs

```
# Require vendors/autoload.php here

define('API_KEY', 'MYSECRETAPIKEY');
$client = \Webfoersterei\HetznerCloudApiClient\ClientFactory::create(API_KEY);

$serverTypes = $client->getServerTypes();

foreach ($serverTypes->server_types as $serverType) {
    printf("%--12s CPU: %2d Cores, RAM: %3d GB, Storage: %4d GB (%s)\n", $serverType->name, $serverType->cores,
        $serverType->memory, $serverType->disk, $serverType->storage_type);
}
```

### My first server

[](#my-first-server)

Create a new server and delete it after started

```
# Require vendors/autoload.php here

define('API_KEY', 'MYSECRETAPIKEY');
$client = \Webfoersterei\HetznerCloudApiClient\ClientFactory::create(API_KEY);

$createServerRequest = new \Webfoersterei\HetznerCloudApiClient\Model\Server\CreateRequest();
$createServerRequest->name = 'my-first-server-created-with-php';
$createServerRequest->server_type = 'cx11';
$createServerRequest->start_after_create = true;
$createServerRequest->image = 1;

echo "Creating server.\n";

$createResponse = $client->createServer($createServerRequest);

$progress = $createResponse->action->progress;
$status = $createResponse->action->status;

while ($progress != 100 && $status != 'success') {
    $actionResponse = $client->getAction($createResponse->action->id);
    echo $actionResponse->action->progress."%\n";
    $progress = $actionResponse->action->progress;
    sleep(1);
}

echo sprintf("Server created. Root-PW: %s\n", $createResponse->root_password);
sleep(10);
echo "Deleting server.\n";

$client->deleteServer($createResponse->server->id);

echo "Done.\n";
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~92 days

Total

3

Last Release

2888d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/737401?v=4)[Timo](/maintainers/Hecke29)[@Hecke29](https://github.com/Hecke29)

---

Top Contributors

[![Hecke29](https://avatars.githubusercontent.com/u/737401?v=4)](https://github.com/Hecke29 "Hecke29 (27 commits)")

---

Tags

api-clienthetznerhetzner-cloud

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webfoersterei-hetzner-cloud-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/webfoersterei-hetzner-cloud-api-client/health.svg)](https://phpackages.com/packages/webfoersterei-hetzner-cloud-api-client)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1237.8M121](/packages/web-auth-webauthn-lib)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k50.1M314](/packages/api-platform-core)

PHPackages © 2026

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