doctl compute droplet create

Go to Navigation


doctl compute droplet create <droplet-name>... [flags]




Creates a new Droplet on your account. The command requires values for the --size, and --image flags.

To retrieve a list of size slugs, use the doctl compute size list command. To retrieve a list of image slugs, use the doctl compute image list command.

If you do not specify a region, the Droplet is created in the default region for your account. If you do not specify any SSH keys, we email a temporary password to your account’s email address.


The following example creates a Droplet named example-droplet with a two vCPUs, two GiB of RAM, and 20 GBs of disk space. The Droplet is created in the nyc1 region and is based on the ubuntu-20-04-x64 image. Additionally, the command uses the --user-data flag to run a Bash script the first time the Droplet boots up:

doctl compute droplet create example-droplet --size s-2vcpu-2gb --image ubuntu-20-04-x64 --region nyc1 --user-data $'#!/bin/bash\n touch /root/example.txt; sudo apt update;sudo snap install doctl'


Option Description
--droplet-agent Specifies whether or not the Droplet monitoring agent should be installed. By default, the agent is installed on new Droplets but installation errors are ignored. Set --droplet-agent=false to prevent installation. Set to true to make installation errors fatal.
Default: false
--enable-backups Enables backups for the Droplet. Backups are created on a weekly basis.
Default: false
--enable-ipv6 Enables IPv6 support and assigns an IPv6 address to the Droplet
Default: false
--enable-monitoring Installs the DigitalOcean agent for additional monitoring
Default: false
--enable-private-networking Enables private networking for the Droplet by provisioning it inside of your account’s default VPC for the region
Default: false
--format Columns for output in a comma-separated list. Possible values: ID, Name, PublicIPv4, PrivateIPv4, PublicIPv6, Memory, VCPUs, Disk, Region, Image, VPCUUID, Status, Tags, Features, Volumes.
--help , -h Help for this command
--image An ID or slug specifying the image to use to create the Droplet, such as ubuntu-20-04-x64. Use the commands under doctl compute image to find additional images. (required)
--no-header Return raw data with no headers
Default: false
--project-id The UUID of the project to assign the Droplet to
--region A slug specifying the region to create the Droplet in, such as nyc1. Use the doctl compute region list command for a list of valid regions.
--size A slug indicating the Droplet’s number of vCPUs, RAM, and disk size. For example, s-1vcpu-1gb specifies a Droplet with one vCPU and 1 GiB of RAM. The disk size is defined by the slug’s plan. Run doctl compute size list for a list of valid size slugs and their disk sizes. (required)
--ssh-keys A list of SSH key IDs or fingerprints to embed in the Droplet’s root account upon creation
--tag-name Applies a tag to the Droplet
--tag-names Applies a list of tags to the Droplet
--user-data A shell script to run on the Droplet’s first boot
--user-data-file The path to a file containing a shell script or Cloud-init YAML file to run on the Droplet’s first boot. Example: path/to/file.yaml
--volumes A list of block storage volume IDs to attach to the Droplet
--vpc-uuid The UUID of a non-default VPC to create the Droplet in
--wait Instructs the terminal to wait for the action to complete before returning access to the user
Default: false
Command Description
doctl compute droplet Manage virtual machines (Droplets)

Global Flags

Option Description
--access-token, -t API V2 access token
--api-url, -u Override default API endpoint
--config, -c Specify a custom config file
  • macOS: ${HOME}/Library/Application Support/doctl/config.yaml
  • Linux: ${XDG_CONFIG_HOME}/doctl/config.yaml
  • Windows: %APPDATA%\doctl\config.yaml
--context Specify a custom authentication context name
--http-retry-max Set maximum number of retries for requests that fail with a 429 or 500-level error
Default: 5
--http-retry-wait-max Set the minimum number of seconds to wait before retrying a failed request
Default: 30
--http-retry-wait-min Set the maximum number of seconds to wait before retrying a failed request
Default: 1
--interactive Enable interactive behavior. Defaults to true if the terminal supports it (default false)
Default: false
--output, -o Desired output format [text|json]
Default: text
--trace Show a log of network activity while performing a command
Default: false
--verbose, -v Enable verbose output
Default: false