PHPackages                             fruitbytes/pterodactyl-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fruitbytes/pterodactyl-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fruitbytes/pterodactyl-sdk
==========================

Pterodactyl PHP SDK (Unofficial)

86861PHP

Since Apr 17Pushed 8y ago3 watchersCompare

[ Source](https://github.com/FruitBytes/pterodactyl-sdk)[ Packagist](https://packagist.org/packages/fruitbytes/pterodactyl-sdk)[ RSS](/packages/fruitbytes-pterodactyl-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Pterodactyl PHP SDK
===================

[](#pterodactyl-php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b220484126ce8b6349a6b24ca180a499204c146fbe13f182d8201b048c719cd0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667275697462797465732f707465726f64616374796c2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fruitbytes/pterodactyl-sdk)[![Total Downloads](https://camo.githubusercontent.com/41cd7730121be4fd162e3cee175fa186ea29f4cbb48ac79b329eca880bb95380/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667275697462797465732f707465726f64616374796c2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fruitbytes/pterodactyl-sdk)[![Software License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

To install the SDK in your project you need to require the package via [composer](http://getcomposer.org):

```
composer require fruitbytes/pterodactyl-sdk
```

Then use Composer's autoload:

```
require __DIR__.'/../vendor/autoload.php';
```

And finally create an instance of the SDK:

```
$pterodactyl = new \Fruitbytes\Pterodactyl\Pterodactyl(PUBLIC_KEY_HERE, SECRET_KEY_HERE, BASE_URI_HERE);
```

Usage
-----

[](#usage)

Using the pterodactyl instance you may perform multiple actions as well as retrieve the different resources Pterodactyl's API provides:

```
$servers = $pterodactyl->servers();
```

This will give you an array of servers that you have access to, each server is represented by an instance of `Fruitbytes\Pterodactyl\Resources\Server`, this instance has multiple public properties like `$name`, `$id`, `$owner`, `$memory`, and others.

You may also retrieve a single server using:

```
$server = $pterodactyl->server(SERVER_ID_HERE);
```

On multiple actions supported by this SDK you may need to pass some parameters, for example when creating a new server:

```
$server = $pterodactyl->createServer([
    "name"=>"API Test",
    "description"=>"API Description",
    "user_id"=>1,
    "location_id"=>1,
    "auto_deploy"=>true,
    "memory"=>64,
    "swap"=>0,
    "disk"=>1024,
    "cpu"=>0,
    "io"=>500,
    "service_id"=>1,
    "option_id"=>1,
    "startup"=>"java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}",
    "env_SERVER_JARFILE"=>"server.jar",
    "env_VANILLA_VERSION"=>"latest"
]);
```

These parameters will be used in the POST request sent to Pterodactyl servers, you can find more information about the parameters needed for each action on [Pterodactyl's official API documentation](https://pterodactyl.readme.io/v0.6/reference).

Notice that this request for example will only start the server creation process, your server might need a few minutes before it completes provisioning, you'll need to check the Server's `$installed` property to know if it's ready or not yet.

Managing Users
--------------

[](#managing-users)

```
$pterodactyl->users();
$pterodactyl->user($userId);
$pterodactyl->createUser(array $data);
$pterodactyl->deleteUser($userId);
```

On a User instance you may also call:

```
$user->delete();
```

Managing Servers
----------------

[](#managing-servers)

```
$pterodactyl->servers();
$pterodactyl->server($serverId);
$pterodactyl->createServer(array $data);
$pterodactyl->deleteServer($serverId);

// Server access
$pterodactyl->suspendServer($serverId);
$pterodactyl->unsuspendServer($serverId);
```

On a Server instance you may also call:

```
$server->delete();
$server->suspend();
$server->unsuspend();
```

Using Servers
-------------

[](#using-servers)

```
$pterodactyl->powerServer($serverUuid, $action); // 'start', 'stop', 'restart', 'kill'
$pterodactyl->commandServer($serverUuid, $command);
```

On a Server instance you may also call:

```
$server->power($action); // 'start', 'stop', 'restart', 'kill'
$server->command($command);
```

License
-------

[](#license)

`fruitbytes/pterodactyl-sdk` is licensed under the MIT License (MIT). Please see the [license file](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

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

---

Top Contributors

[![JoshTrebilco](https://avatars.githubusercontent.com/u/6693616?v=4)](https://github.com/JoshTrebilco "JoshTrebilco (23 commits)")

### Embed Badge

![Health badge](/badges/fruitbytes-pterodactyl-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/fruitbytes-pterodactyl-sdk/health.svg)](https://phpackages.com/packages/fruitbytes-pterodactyl-sdk)
```

###  Alternatives

[liberu-genealogy/php-dna

DNA analysis toolkit for PHP 8.3+

344.8k1](/packages/liberu-genealogy-php-dna)[sas/shortcode

Use Wordpress like Shortcodes within the Text Editor of Shopware

156.4k](/packages/sas-shortcode)

PHPackages © 2026

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