PHPackages                             sidis405/laravel-dynamic-servers-digital-ocean - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. sidis405/laravel-dynamic-servers-digital-ocean

AbandonedArchivedLibrary[DevOps &amp; Deployment](/categories/devops)

sidis405/laravel-dynamic-servers-digital-ocean
==============================================

Digital Ocean provider for Spatie's Laravel Dynamic Servers pagkage

v0.1.2(3y ago)148[4 PRs](https://github.com/sidis405/laravel-dynamic-servers-digital-ocean/pulls)MITPHPPHP ^8.1

Since Sep 12Pushed 2y ago2 watchersCompare

[ Source](https://github.com/sidis405/laravel-dynamic-servers-digital-ocean)[ Packagist](https://packagist.org/packages/sidis405/laravel-dynamic-servers-digital-ocean)[ Docs](https://github.com/sidis405/laravel-dynamic-servers-digital-ocean)[ RSS](/packages/sidis405-laravel-dynamic-servers-digital-ocean/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (3)Dependencies (14)Versions (8)Used By (0)

Digital Ocean provider for Spatie's Dynamic Servers Package
===========================================================

[](#digital-ocean-provider-for-spaties-dynamic-servers-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/56fbfdc66f6192b0181f6dcbfa2768f2276f9e2bc30c5fa67fd05becef5971cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696469733430352f6c61726176656c2d64796e616d69632d736572766572732d6469676974616c2d6f6365616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sidis405/laravel-dynamic-servers-digital-ocean)[![GitHub Tests Action Status](https://camo.githubusercontent.com/72e5fcbf48fd0bf16128f43d95b5214cfb8c53b4fa1c6dcf12fc05d71d11fc03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f73696469733430352f6c61726176656c2d64796e616d69632d736572766572732d6469676974616c2d6f6365616e2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/sidis405/laravel-dynamic-servers-digital-ocean/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b95be0958d9509dcc6084be9b5a306b78b8da4794a94c9f1d6f0bec835aac321/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f73696469733430352f6c61726176656c2d64796e616d69632d736572766572732d6469676974616c2d6f6365616e2f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/sidis405/laravel-dynamic-servers-digital-ocean/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bb9683fefb7e41f3d77a6fedcfb5fa5dacd5f79e3537d4fa03581f3c27ac6d22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696469733430352f6c61726176656c2d64796e616d69632d736572766572732d6469676974616c2d6f6365616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sidis405/laravel-dynamic-servers-digital-ocean)

This package provides a [ Server Provider for Spatie's ](https://digitalocean.com)[Laravel Dynamic Servers](https://github.com/spatie/laravel-dynamic-servers) Package.

The package is under active development and not suitable for production. Please feel free to contribute.
--------------------------------------------------------------------------------------------------------

[](#the-package-is-under-active-development-and-not-suitable-for-production-please-feel-free-to-contribute)

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

[](#installation)

You can install the package via composer:

```
composer require sidis405/laravel-dynamic-servers-digital-ocean
```

Afterward make sure to publish the EventServiceProvider that comes with this package:

```
php artisan dynamic-servers-digital-ocean:install
```

Usage
-----

[](#usage)

In your config/dynamic-servers.php register the DO provider

```
return [
    'providers' => [
        ...

        'digital_ocean' => [
            'class' => Sidis405\LaravelDynamicServersDigitalOcean\DigitalOcean\DigitalOceanServerProvider::class,
            'maximum_servers_in_account' => 20,
            'options' => [
                'token' => env('DIGITAL_OCEAN_TOKEN'),
                'region' => env('DIGITAL_OCEAN_REGION'),
                'size' => env('DIGITAL_OCEAN_SIZE'),
                'image' => env('DIGITAL_OCEAN_IMAGE'),
                'vpc_uuid' => env('DIGITAL_OCEAN_VPC_UUID'),
            ],
        ],
    ]
];
```

In your app/Providers/DynamicServersProvider.php register a new server type using the Digital Ocean provider

```
public function register()
{
    ....

    $doServer = ServerType::new('do')
        ->provider('digital_ocean')
        ->configuration(function(Server $server) {
            return [
                'name' => Str::slug($server->name),

                "image" => $server->option('image'),
                "vpc_uuid" => $server->option('vpc_uuid'),
                "region" => $server->option('region'),
                "size" => $server->option('size'),

                "ipv6" => false,
                "backups" => false,
                "monitoring" => true,
            ];
        });

        DynamicServers::registerServerType($doServer);
}
```

Events
------

[](#events)

After the base package's `CreateServerJob` is executed, a new job, `VerifyServerStartedJob` will be dispatched and will check every 20 seconds to make sure that the provider eventually marks the Droplet as running.

After it ensures it runs, no other attempt is made to fetch again the server meta.

Considering that DigitalOcean will return the ip address of a droplet only after it has been full created we need to fetch once more the droplet meta.

For this, we will use the base package's event 'ServerRunningEvent'.

This package, publishes a `App\Providers\DigitalOceanEventServiceProvider` in your project.

By default there is a single listener, configured and it will fetch again the Droplet's meta after the base package has ensured that it is running.

```
protected $listen = [
        ServerRunningEvent::class => [
            UpdateServerMeta::class,
        ],
    ];
```

You may customise the listener, disable it or replace it with a your own.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Sidrit Trandafili](https://github.com/sidis405)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.8% 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 ~0 days

Total

3

Last Release

1338d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/844961?v=4)[Sidrit Trandafili](/maintainers/sidis405)[@sidis405](https://github.com/sidis405)

---

Top Contributors

[![sidis405](https://avatars.githubusercontent.com/u/844961?v=4)](https://github.com/sidis405 "sidis405 (14 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

laraveldigital oceanlaravel-dynamic-serverssidis405laravel-dynamic-servers-digital-ocean

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sidis405-laravel-dynamic-servers-digital-ocean/health.svg)

```
[![Health](https://phpackages.com/badges/sidis405-laravel-dynamic-servers-digital-ocean/health.svg)](https://phpackages.com/packages/sidis405-laravel-dynamic-servers-digital-ocean)
```

###  Alternatives

[spatie/laravel-horizon-watcher

Automatically restart Horizon when local PHP files change

2631.9M](/packages/spatie-laravel-horizon-watcher)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[spatie/laravel-dynamic-servers

Dynamically create and destroy servers

23313.0k2](/packages/spatie-laravel-dynamic-servers)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[salahhusa9/laravel-updater

Laravel Updater is a simple yet powerful package for updater your Laravel applications. It makes it easy to upgrade your application to the latest version with just one command.

2176.3k](/packages/salahhusa9-laravel-updater)

PHPackages © 2026

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