what is the exact doctl command to create a droplet of given specification

September 10, 2019 62 views
Configuration Management API DigitalOcean Ubuntu 18.04

doctl compute droplet create webserver01 region banglore image ubuntu-18.04-x64 –size1gb

2 Answers

Hello,

You can check this article on DigitalOcean website and see how the doctl is used:

https://www.digitalocean.com/community/tutorials/how-to-use-doctl-the-official-digitalocean-command-line-client

This is an example for creation of droplets:

For example, the following command creates a 64-bit Debian 8 Droplet named test with 1GB of memory, an SSH key, and backups enabled.

doctl compute droplet create test –size 1gb –image debian-8-x64 –region nyc1 –ssh-keys 4d:23:e6:e4:8c:17:d2:cf:89:47:36:b5:c7:33:40:4e –enable-backups

You can modify it to match your needs, e.g using Ubuntu and region Banglore:

doctl compute droplet create webserver01 –size 1gb –image ubuntu-18.04-x64 –region banglore

Let me know how it goes.

Alex

by Marko Mudrinić
DigitalOcean's web based control panel provides a convenient, point-and-click interface for managing Droplets. There are many times, however, when a command-line tool may be a preferable alternative. doctl, the official DigitalOcean command-line client, leverages the DigitalOcean API to provide access to most account and Droplet features.
Have another answer? Share your knowledge.