LinuxCommandLibrary

doctl

official DigitalOcean command-line interface

TLDR

Authenticate with DigitalOcean
$ doctl auth init
copy
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
Delete a droplet
$ doctl compute droplet delete [droplet_id]
copy
List Kubernetes clusters
$ doctl kubernetes cluster list
copy
Get kubeconfig
$ doctl kubernetes cluster kubeconfig save [cluster_name]
copy
List available regions
$ doctl compute region list
copy

SYNOPSIS

doctl command [subcommand] [options]

DESCRIPTION

doctl is the official command-line interface for DigitalOcean, providing access to all DigitalOcean services including Droplets, Kubernetes, App Platform, Databases, and more.
The tool enables infrastructure automation, CI/CD integration, and scriptable management of DigitalOcean resources. It supports multiple authentication contexts for managing different accounts or teams.
doctl mirrors the DigitalOcean API functionality, allowing complete control over cloud resources from the command line without using the web console.

PARAMETERS

COMMAND

Resource type: compute, kubernetes, apps, databases, etc.
auth init
Authenticate with API token.
compute droplet ACTION
Manage droplets.
kubernetes cluster ACTION
Manage Kubernetes clusters.
apps ACTION
Manage App Platform applications.
--output FORMAT
Output format: text, json.
--context NAME
Use named authentication context.
--help
Display help information.

CAVEATS

Requires DigitalOcean account and API token. Actions may incur charges. Some operations are irreversible. Rate limits apply to API requests.

HISTORY

doctl was developed by DigitalOcean as the official CLI for their cloud platform. It provides programmatic access to DigitalOcean services, supporting DevOps workflows and infrastructure as code practices.

SEE ALSO

kubectl(1), terraform(1), aws(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard