Skip to content
PHP Digital Ocean API for one click provisioning of droplets
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A project for handling Digital Ocean droplets on the unix commandline. It can be used to quickly manage droplets from the CLI, as well as be used in combination with provisioning scripts (Ex. Ansible) for one click deployments.


Dependencies: php7.0 php-curl

You must generate a Digital Ocean API Token for your account, as well as add an SSH Key. Add both of these to your CONFIG.php file. Make sure you have the id_rsa private key file of the RSA SSH key you created in the root directory of this project or to change it's location in the config.

A typical creation command would look like: php -q vmManage.php --create TestHostname s-1vcpu-1gb sfo1 ubuntu-16-04-x64

The overall process will take between 30 and 50 seconds to spin up the server depending on the image specified.

To access the server, you can ssh with the key linked in the CONFIG.php file


php -q vmManage.php --help

php -q vmManage.php --list

php -q vmManage.php --destroy <dropletID/dropletName>

php -q vmManage.php --create <hostname> <size> <location> <image>

List all Locations

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582" ""

"regions": [

List all Sizes

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582" ""

"sizes": [
You can’t perform that action at this time.