The Morpheus DigitalOcean Plugin integrates Morpheus with DigitalOcean to provide Droplet provisioning, backup via snapshots, cloud synchronisation, and option source data for regions, images, and plans. The plugin communicates with the DigitalOcean v2 REST API.
- Features
- Requirements
- Repository structure
- Building the plugin
- License
- Installing
- Detailed Usage Steps
- API Endpoints
Provision and decommission DigitalOcean Droplets from Morpheus. Supports region, plan (size), image, VPC, and SSH key selection.
Back up and restore Droplets using DigitalOcean snapshots managed through the Morpheus backup framework.
Morpheus synchronises the following DigitalOcean resources for inventory:
- Droplets (virtual machines)
- Regions and datacenters
- Images (distributions and user snapshots)
- Sizes (plans)
- VPCs
| Requirement | Version |
|---|---|
| Morpheus | 9.0.0 or later |
| Java | 25 or later |
| Gradle | Use the included Gradle wrapper (./gradlew) |
Additional prerequisites:
- A DigitalOcean account with a Personal Access Token (read/write scope)
- Network access from the Morpheus appliance to
https://api.digitalocean.comover HTTPS (port 443)
src/main/groovy/com/morpheusdata/digitalocean/
├── DigitalOceanPlugin.groovy - Plugin entry point; registers all providers
├── DigitalOceanApiService.groovy - DigitalOcean v2 API client; all HTTP calls
├── DigitalOceanOptionSourceProvider.groovy - UI option source data (regions, sizes, images, VPCs)
├── backup/
│ ├── DigitalOceanBackupProvider.groovy - BackupProvider implementation
│ └── DigitalOceanSnapshotProvider.groovy - Snapshot-based backup type
├── cloud/
│ ├── DigitalOceanCloudProvider.groovy - CloudProvider implementation
│ └── sync/
│ ├── DatacentersSync.groovy - Syncs regions/datacenters
│ ├── ImagesSync.groovy - Syncs images
│ ├── SizesSync.groovy - Syncs plans/sizes
│ ├── VirtualMachineSync.groovy - Syncs Droplets
│ └── VPCSync.groovy - Syncs VPCs
├── datasets/
│ └── DatacenterDatasetProvider.groovy - Dataset provider for datacenter selection
└── provisioning/
└── DigitalOceanProvisionProvider.groovy - ProvisionProvider implementation
src/main/resources/i18n/ - Internationalisation message bundles
src/main/resources/scribe/ - Seed/migration scripts
build.gradle, gradle.properties - Build configuration and plugin metadata
Run the following command to compile and package the plugin jar:
./gradlew clean buildThe packaged jar will be written to build/libs/.
To execute tests, use the following command:
./gradlew testThis project is licensed under the Apache License 2.0.
See the LICENSE file for details.
- Build the plugin (see Building the plugin) or download a released jar.
- In Morpheus, navigate to Administration > Integrations > Plugins.
- Click Add and upload the
morpheus-digital-ocean-plugin-<version>.jarfrombuild/libs/. - Navigate to Infrastructure > Clouds > Add and select DigitalOcean to configure the integration.
- Go to Infrastructure > Clouds > Add.
- Select DigitalOcean as the cloud type.
- Enter a Name and provide your DigitalOcean Personal Access Token.
- Save. Morpheus connects to the DigitalOcean API and begins syncing regions, images, sizes, VPCs, and Droplets.
- Go to Provisioning > Instances > Add.
- Select a DigitalOcean-backed instance type.
- Choose the target Group, Cloud, and Region.
- Select the Plan (Droplet size), Image, VPC, and SSH Key.
- Complete the form and provision. Morpheus creates the Droplet via the DigitalOcean API.
- From an instance detail page, navigate to the Backups tab.
- Click Backup Now to trigger an on-demand DigitalOcean snapshot.
- Snapshots appear in the backup list once the DigitalOcean snapshot job completes.
- From the instance Backups tab, select a completed snapshot.
- Click Restore and confirm. Morpheus initiates a Droplet restore from the selected snapshot.
This plugin communicates with the DigitalOcean v2 API at https://api.digitalocean.com. All calls use HTTPS (port 443) and are authenticated with a Bearer token.
| Endpoint | Method | Purpose |
|---|---|---|
/v2/account |
GET | Validate credentials |
/v2/account/keys |
GET | List SSH keys |
/v2/account/keys |
POST | Upload an SSH key |
/v2/regions |
GET | List regions |
/v2/sizes |
GET | List Droplet sizes/plans |
/v2/images |
GET | List images |
/v2/droplets |
GET | List Droplets |
/v2/droplets |
POST | Create a Droplet |
/v2/droplets/{id} |
GET | Get Droplet details |
/v2/droplets/{id} |
DELETE | Delete a Droplet |
/v2/droplets/{id}/actions |
POST | Perform Droplet actions (power on/off, snapshot, restore) |
/v2/snapshots |
GET | List snapshots |
/v2/vpcs |
GET | List VPCs |