Forrest logo
back to the doctl tool

doctl-compute-droplet:tldr:c72cf

doctl-compute-droplet: Create a droplet.
$ doctl compute droplet create --region ${region} --image ${os_image} --size ${vps_type} ${droplet_name}
try on your machine

The command you provided is using the doctl command-line interface to create a new Droplet (virtual private server) on the DigitalOcean cloud.

Here is the breakdown of the command:

  • doctl: This is the command-line tool for DigitalOcean.
  • compute: This subcommand is used to interact with the compute resources (like Droplets) on DigitalOcean.
  • droplet create: This subcommand specifically creates a new Droplet.
  • --region ${region}: This flag specifies the region where the Droplet will be created. The ${region} variable should be replaced with the desired region code (e.g., nyc1 for New York).
  • --image ${os_image}: This flag specifies the image (operating system) for the Droplet. The ${os_image} variable should be replaced with the desired image slug (e.g., ubuntu-18-04-x64 for Ubuntu 18.04).
  • --size ${vps_type}: This flag specifies the Droplet's size (virtual private server type/resource allocation). The ${vps_type} variable should be replaced with the desired size slug (e.g., s-1vcpu-1gb for the starter size with 1 virtual CPU and 1GB RAM).
  • ${droplet_name}: This is the name you want to give to your Droplet. It should be replaced with the desired name.

By executing this command, a new Droplet will be created on DigitalOcean with the specified region, image, size, and name.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the doctl tool