fofx / droplet-manager
For managing DigitalOcean droplets, CyberPanel accounts, and DNS records for GoDaddy and Namecheap.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/fofx/droplet-manager
Requires
- php: ^8.1
- fofx/helper: ^1.1
- guzzlehttp/guzzle: ^7.9
- league/flysystem: ^3.29
- league/flysystem-sftp-v3: ^3.29
- monolog/monolog: ^3.7
- naturalbuild/namecheap-sdk: ^1.0
- phpseclib/phpseclib: ^3.0
- toin0u/digitalocean-v2: ^4.9
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^11.3
- dev-master
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.5.7
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.9
- v0.4.8
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.9
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- 0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
This package is auto-updated.
Last update: 2025-11-17 17:31:09 UTC
README
This PHP library provides functionality to manage DigitalOcean droplets, CyberPanel accounts, and DNS settings with GoDaddy and Namecheap. This library provides a set of tools for automating server management tasks, and website deployments.
Features
-
DigitalOcean Management
- Create and configure droplets
- Manage DNS records
-
CyberPanel Integration
- Create and manage websites
- Configure PHP versions and extensions
- Manage databases
- Handle user accounts
-
DNS Management
- Support for Namecheap and GoDaddy
- Automated DNS record configuration
- Nameserver updates
-
Server Configuration
- Automated HTTPS setup
- PHP version management
- MySQL configuration
- Security settings
Installation
- Install via Composer:
composer require fofx/droplet-manager
- Create config folder and configuration file:
mkdir -p config && cp vendor/fofx/droplet-manager/config/droplet-manager.config.php.example config/droplet-manager.config.php
- Configure your credentials in
config/droplet-manager.config.php:
return [ 'digitalocean' => [ 'token' => 'your_do_token', 'image_id' => 'litespeedtechnol-cyberpanel-20-04', ], 'namecheap' => [ 'username' => 'your_username', 'token' => 'your_token', ], 'godaddy' => [ 'api_key' => 'your_godaddy_key', 'api_secret' => 'your_godaddy_secret', ], // ... other configurations ];
Usage
See docs/usage.md for more detailed usage instructions.
Setup
- Install:
composer require fofx/droplet-manager - Copy config:
cp vendor/fofx/droplet-manager/config/droplet-manager.config.php.example config/droplet-manager.config.php - Add your DigitalOcean API token to
config/droplet-manager.config.php
Workflow
- Create droplet →
$manager->createDroplet($dropletName, $region, $size) - Wait for email → DigitalOcean emails you the root password
- Get credentials → Log in to the droplet, run
cat /root/.litespeed_passwordandcat /root/.db_password - Add to config → Update config file with droplet IP and passwords
- Configure server →
$manager->configureDroplet()(installs PHP, MySQL, tools) - Create website →
$manager->setupWebsite(domainName: 'example.com', websiteEmail: 'admin@example.com', phpVersion: '8.4')
Requirements
- PHP 8.1 or higher
- Composer
- Required PHP extensions:
- curl
- json
- xml
- mbstring
Developer Tools
Run the PHPUnit test suite:
composer test
Run PHPStan static analysis:
composer analyse
Run PHP-CS-Fixer:
composer cs-fix
License
This project is licensed under the MIT License.