LinuxCommandLibrary

doctl-compute-droplet

manage DigitalOcean Droplet virtual machines

TLDR

List all droplets

$ doctl compute droplet list
copy
Create a droplet
$ doctl compute droplet create [name] --size [s-1vcpu-1gb] --image [ubuntu-22-04-x64] --region [nyc1]
copy
Get droplet details
$ doctl compute droplet get [droplet_id]
copy
Delete a droplet
$ doctl compute droplet delete [droplet_id]
copy
SSH into droplet
$ doctl compute ssh [droplet_name]
copy
List available sizes
$ doctl compute size list
copy
Perform action on droplet
$ doctl compute droplet-action reboot [droplet_id]
copy

SYNOPSIS

doctl compute droplet command [options]

DESCRIPTION

doctl compute droplet manages DigitalOcean Droplets (virtual machines). It provides full lifecycle control including creation, configuration, monitoring, and deletion of cloud servers.
Droplets can be created with various configurations specifying size, region, image, and networking options. The command supports actions like reboot, power cycle, resize, and snapshot creation.
Integration with SSH keys enables secure access, and the ssh subcommand provides convenient direct connection to droplets by name.

PARAMETERS

COMMAND

Operation: list, create, get, delete, ssh, etc.
list
List all droplets.
create NAME
Create new droplet.
--size SLUG
Droplet size slug.
--image IMAGE
OS image slug or ID.
--region REGION
Data center region.
--ssh-keys IDS
SSH key IDs or fingerprints.
delete ID
Delete droplet.
ssh NAME
SSH into droplet.
--help
Display help information.

CAVEATS

Droplet creation incurs charges immediately. Deletion is irreversible. Some actions require droplet power-off. Region availability varies for sizes and images.

HISTORY

doctl compute droplet is a core component of the doctl CLI, providing command-line management of DigitalOcean's primary compute service since the tool's initial release.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community