doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / Create Droplet

Create Droplet

Creates a new droplet with specified configurations including region, image, and size.

$
Terminal
doctl compute d c --region <region> --image <os_image> --size <vps_type> <droplet_name>

When To Use

During new environment setups or application rollouts requiring dedicated resources.

Pro Tip

Utilize snapshot images for quicker deployments from previously configured droplets.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
doctl compute d c --region <region> --image <os_image> --size <vps_type> <droplet_name>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Creating droplet...\n\nID          Name          Status      Size          Image         Region\n12345678    my-droplet    active      s-1vcpu-1gb  ubuntu-20-04  nyc1\n\nDroplet created successfully!

Anatomy of Output

Understanding the result

Droplet ID: 98765432 Droplet Identifier

Unique ID assigned to the newly created droplet.

Name: my-droplet Droplet Name

User-assigned name for easy reference.

Status: Active Current Status

Indicates the droplet is successfully operational.

Power User Variants

Optimized versions

doctl compute droplet create --size s-2vcpu-4gb --image ubuntu-20-04-x64 --region nyc1 --tag-name 'webserver'

Create a droplet with tagging for organization.

doctl compute droplet create --size s-1vcpu-1gb --image snapshot-23456789 --region nyc1 --name backup-droplet

Deploy using a snapshot for quicker recovery.

Troubleshooting

Common pitfalls

Error: Invalid region

Solution: Ensure the specified region is supported by DigitalOcean.

Error: Missing required fields

Solution: Check all parameters are provided as required.

Error: Limit exceeded

Solution: Increase your account's droplet limit or remove unused droplets.

Command Breakdown

What each part is doing

doctl
Base Command
The executable that performs this operation. Here it runs Doctl before the shell applies any redirect operators.
d
d|droplet
The value supplied for d|droplet.
c
c|create
The value supplied for c|create.
<region>
region
The value supplied for region.
<os_image>
os image
The value supplied for os image.
<vps_type>
vps type
The value supplied for vps type.
<droplet_name>
droplet name
The value supplied for droplet name.
--region
Command Option
Tool-specific option used by this command invocation.
--image
Command Option
Tool-specific option used by this command invocation.
--size
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command with appropriate parameters for region, image, size, and name.

  2. Step 2

    Verify the droplet status using `doctl compute droplet list`.

  3. Step 3

    Access the droplet via SSH using the assigned IP address.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.