{"id":51009887,"url":"https://github.com/ghostcompiler/laravel-hetzner-robot","last_synced_at":"2026-06-21T01:06:54.233Z","repository":{"id":364832420,"uuid":"1269317000","full_name":"ghostcompiler/laravel-hetzner-robot","owner":"ghostcompiler","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-14T16:47:39.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T18:22:23.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ghostcompiler.github.io/laravel-hetzner-robot/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostcompiler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-14T15:07:18.000Z","updated_at":"2026-06-14T16:47:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ghostcompiler/laravel-hetzner-robot","commit_stats":null,"previous_names":["ghostcompiler/laravel-hetzner-robot"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ghostcompiler/laravel-hetzner-robot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostcompiler%2Flaravel-hetzner-robot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostcompiler%2Flaravel-hetzner-robot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostcompiler%2Flaravel-hetzner-robot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostcompiler%2Flaravel-hetzner-robot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostcompiler","download_url":"https://codeload.github.com/ghostcompiler/laravel-hetzner-robot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostcompiler%2Flaravel-hetzner-robot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34590341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-21T01:06:53.612Z","updated_at":"2026-06-21T01:06:54.226Z","avatar_url":"https://github.com/ghostcompiler.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://res.cloudinary.com/djgvfl1tv/image/upload/v1780666791/logo_mqnqn4.png\" alt=\"Laravel Hetzner Robot\" width=\"180\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eLaravel Hetzner Robot SDK\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  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.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Laravel-11%20%7C%2012%20%7C%2013-FF2D20?style=for-the-badge\u0026logo=laravel\u0026logoColor=white\" alt=\"Laravel\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PHP-8.2%20to%208.5-777BB4?style=for-the-badge\u0026logo=php\u0026logoColor=white\" alt=\"PHP Version\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Hetzner--Robot-API-D85012?style=for-the-badge\" alt=\"Hetzner Robot API\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Built%20By-Ghost%20Compiler-0F172A?style=for-the-badge\" alt=\"Ghost Compiler\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/ghostcompiler/laravel-hetzner-robot?style=for-the-badge\u0026logo=github\" /\u003e\n    \u003cimg src=\"https://img.shields.io/packagist/dt/ghostcompiler/laravel-hetzner-robot?style=for-the-badge\u0026logo=packagist\" /\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n- **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).\n- **Basic Authentication**: Fully automated Basic Auth headers configuration.\n- **Form Urlencoded Requests**: Parameters transfer mapped automatically using `application/x-www-form-urlencoded`.\n- **Fail-Safe Retries \u0026 Backoff**: Robust exponential backoff and rate-limit parsing handling `RATE_LIMIT_EXCEEDED` errors automatically.\n- **Concurrently Pooled Processing**: Execute calls asynchronously or concurrently in batches.\n- **Type-Safe DTOs**: Automated data hydration into standard PHP DTO structures.\n- **Custom Exceptions**: Specialized mapping of API status codes (ValidationException, RateLimitException, AuthenticationException, etc.).\n\n---\n\n## Installation\n\nInstall the package via Composer:\n\n```bash\ncomposer require ghostcompiler/laravel-hetzner-robot\n```\n\nPublish the configuration file:\n\n```bash\nphp artisan vendor:publish --provider=\"Vendor\\HetznerRobot\\Providers\\HetznerRobotServiceProvider\" --tag=\"config\"\n```\n\nAdd your Hetzner Robot API Web Service credentials to your `.env` file:\n\n```env\nHETZNER_ROBOT_USERNAME=your_web_service_username_here\nHETZNER_ROBOT_PASSWORD=your_web_service_password_here\nHETZNER_ROBOT_BASE_URL=https://robot-ws.your-server.de\nHETZNER_ROBOT_TIMEOUT=30\nHETZNER_ROBOT_RETRIES=3\nHETZNER_ROBOT_LOGGING_ENABLED=true\n```\n\n---\n\n## Usage Examples\n\n### Servers\n\n#### Listing and Finding Servers\n```php\nuse Vendor\\HetznerRobot\\Facades\\HetznerRobot;\n\n// List all servers\n$servers = HetznerRobot::servers()-\u003eall();\n\nforeach ($servers as $server) {\n    echo $server-\u003eserverName . ': ' . $server-\u003eserverIp . \"\\n\";\n}\n\n// Find a server by number\n$server = HetznerRobot::servers()-\u003efind(321);\necho \"DC: \" . $server-\u003edc;\n```\n\n#### Updating and Cancelling a Server\n```php\n// Rename a server\n$server = HetznerRobot::servers()-\u003eupdate(321, [\n    'server_name' =\u003e 'production-web-01'\n]);\n\n// Cancel a server\n$cancellation = HetznerRobot::servers()-\u003ecreateCancellation(321, [\n    'cancellation_reason' =\u003e 'no_longer_needed'\n]);\necho \"Cancellation status: \" . $cancellation-\u003ecancellationDate;\n```\n\n---\n\n### IP \u0026 Subnet Management\n```php\n// List all IP addresses\n$ips = HetznerRobot::ips()-\u003eall();\n\n// Update reverse DNS (PTR)\n$rdns = HetznerRobot::rdns()-\u003ecreate('123.123.123.123', 'your-domain.com');\n\n// Enable MAC address for IP\n$mac = HetznerRobot::ips()-\u003eupdateMac('123.123.123.123', '00:11:22:33:44:55');\n```\n\n---\n\n### Boot Configurations (Rescue, Linux, Windows, VNC)\n```php\n// Enable rescue system for server\n$rescue = HetznerRobot::boots()-\u003eenableRescue(321, [\n    'os' =\u003e 'linux',\n    'arch' =\u003e 64\n]);\n\necho \"Temp password: \" . $rescue-\u003epassword;\n```\n\n---\n\n### Storage Box\n```php\n// List storage boxes\n$boxes = HetznerRobot::storageBoxes()-\u003eall();\n\n// Create snapshot\n$snapshot = HetznerRobot::storageBoxes()-\u003ecreateSnapshot($boxId);\n\n// Get snapshot plan\n$plan = HetznerRobot::storageBoxes()-\u003egetSnapshotPlan($boxId);\n\n// Create sub-account\n$sub = HetznerRobot::storageBoxes()-\u003ecreateSubAccount($boxId, [\n    'homedirectory' =\u003e 'backup_sub'\n]);\n```\n\n---\n\n### Firewall Configuration\n```php\n// Find firewall for server\n$firewall = HetznerRobot::firewalls()-\u003efind(321);\n\n// Create or update firewall rules\nHetznerRobot::firewalls()-\u003ecreate(321, [\n    'status' =\u003e 'active',\n    'filter_ipv6' =\u003e false,\n    'whitelist_hos' =\u003e true,\n    'rules' =\u003e [\n        'input' =\u003e [\n            [\n                'name' =\u003e 'Allow HTTP',\n                'ip_version' =\u003e 'ipv4',\n                'dst_port' =\u003e '80',\n                'action' =\u003e 'accept'\n            ]\n        ]\n    ]\n]);\n```\n\n---\n\n### vSwitches\n```php\n// List vswitches\n$vswitches = HetznerRobot::vswitches()-\u003eall();\n\n// Create vswitch\n$vswitch = HetznerRobot::vswitches()-\u003ecreate([\n    'name' =\u003e 'vswitch-prod',\n    'vlan' =\u003e 4000\n]);\n\n// Add servers to vswitch\nHetznerRobot::vswitches()-\u003eaddServers($vswitch-\u003eid, [321, 421]);\n```\n\n---\n\n### Asynchronous Requests\n```php\nuse GuzzleHttp\\Promise\\PromiseInterface;\n\n// Return a Guzzle Promise immediately\n$promise = HetznerRobot::servers()-\u003easync()-\u003eall();\n\n// Resolve promise when ready\n$servers = $promise-\u003ewait();\n```\n\n---\n\n### Batch Concurrent Operations\n```php\n// Execute multiple queries concurrently\n$results = HetznerRobot::batch([\n    fn () =\u003e HetznerRobot::servers()-\u003efind(321),\n    fn () =\u003e HetznerRobot::servers()-\u003efind(421),\n    fn () =\u003e HetznerRobot::storageBoxes()-\u003efind(123456),\n]);\n\n$server1 = $results[0];\n$server2 = $results[1];\n$storageBox = $results[2];\n```\n\n---\n\n### Exception Handling\nAll exceptions inherit from `Vendor\\HetznerRobot\\Exceptions\\HetznerException`.\n\n```php\nuse Vendor\\HetznerRobot\\Exceptions\\AuthenticationException;\nuse Vendor\\HetznerRobot\\Exceptions\\ValidationException;\nuse Vendor\\HetznerRobot\\Exceptions\\RateLimitException;\nuse Vendor\\HetznerRobot\\Exceptions\\HetznerException;\n\ntry {\n    HetznerRobot::servers()-\u003eupdate(321, []);\n} catch (AuthenticationException $e) {\n    // 401 Unauthorized\n} catch (ValidationException $e) {\n    // 400 Bad Request / INVALID_INPUT\n    $missingFields = $e-\u003egetMissingFields();\n    $invalidFields = $e-\u003egetInvalidFields();\n} catch (RateLimitException $e) {\n    // 403 Rate Limit Exceeded\n    $maxRequest = $e-\u003egetMaxRequest();\n} catch (HetznerException $e) {\n    // Base exception handler\n}\n```\n\n---\n\n## Static Analysis \u0026 Linting\n\nRun PHPStan static analysis:\n```bash\nvendor/bin/phpstan analyse\n```\n\nRun Psalm static analysis:\n```bash\nvendor/bin/psalm\n```\n\nFormat code with Pint:\n```bash\nvendor/bin/pint\n```\n\n---\n\n## Development Environment\n\nBuilt using **ServBay**\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://res.cloudinary.com/djgvfl1tv/image/upload/v1780667063/servbay_edc7jz.png\" alt=\"ServBay\" width=\"120\"\u003e\n\u003c/p\u003e\n\n- Mac M4 Tested\n- macOS Apple Silicon\n- Powered by ServBay\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostcompiler%2Flaravel-hetzner-robot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostcompiler%2Flaravel-hetzner-robot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostcompiler%2Flaravel-hetzner-robot/lists"}