Back to All Cheatsheet Libraries cheatsheets

DigitalOcean

doctl CLI reference, Droplet/VPC/Volume core concepts, and a production-ready provisioning checklist.

Total Commands: 0
Category Command Description
Authdoctl auth initAuthenticates the CLI with a personal access token from the control panel.
Dropletsdoctl compute droplet listLists every Droplet on the account with ID, name, region, and status.
Dropletsdoctl compute droplet create NAME --image ubuntu-24-04-x64 --size s-1vcpu-1gb --region nyc1Creates a new Droplet with the given image, size, and region slugs.
Dropletsdoctl compute droplet delete IDPermanently destroys a Droplet — irreversible, all data is lost.
Accessdoctl compute ssh NAMESSHes into a Droplet by name using the key configured on the account.
Snapshotsdoctl compute droplet-action snapshot ID --snapshot-name NAMETakes a point-in-time snapshot of a Droplet's disk.
Networkingdoctl compute floating-ip create --droplet-id IDCreates a Floating IP and assigns it to a Droplet — reassignable without a DNS change.
DNSdoctl compute domain records list DOMAINLists DNS records for a domain managed in DigitalOcean's nameservers.
Databasesdoctl databases listLists managed database clusters (Postgres, MySQL, Redis, etc.).
Firewallsdoctl compute firewall listLists cloud firewalls and the Droplets/tags they're applied to.
Volumesdoctl compute volume create NAME --region nyc1 --size 100GiBCreates a Block Storage volume that can attach to any Droplet in the same region.
Kubernetesdoctl kubernetes cluster kubeconfig save NAMEDownloads and merges a DOKS cluster's kubeconfig for local kubectl use.
Accountdoctl account getShows account email, droplet limit, and status — a quick sanity check after auth.

Core Building Blocks

Droplet

DigitalOcean's name for a virtual machine — sized by vCPU/RAM/disk, billed hourly up to a monthly cap.

Image

The OS or pre-built application (a "1-Click App") a Droplet boots from — a snapshot of an existing Droplet can also be used as a custom image.

Region

The datacenter a resource lives in (e.g. nyc1, sfo3) — Droplets, Volumes, and Load Balancers in the same region attach over a private network for free.

VPC

A private, isolated network per region — resources inside talk to each other without traversing the public internet.

Load Balancer

Distributes traffic across multiple Droplets (often tagged as a group) — handles SSL termination and health checks.

Spaces

S3-compatible object storage for static assets, backups, and CDN-fronted files — same API surface as AWS S3.

Tagging & Automation

Tags

Group resourcesTarget a firewall/LB by tag

Cloud-init / User Data

Boot-time provisioning script

Cloud Firewall

Stateful, applied outside the VM

Monitoring & Alerts

Free built-in metrics agent

Provisioning a Production-Ready Droplet

The baseline steps worth doing before a Droplet takes real traffic.

1

Deploy with SSH keys, not a password

Add a public key in the control panel (or doctl compute ssh-key) and select it at creation — skips a mailed root password and a forced first-login reset.

2

Attach a Cloud Firewall immediately

Restrict inbound to only the ports actually needed (22, 80, 443) — the firewall applies at the network edge, before traffic even reaches the Droplet's own iptables.

3

Enable weekly backups

A small percentage-of-Droplet-cost add-on that snapshots automatically — far cheaper than losing a server with no recent snapshot.

4

Put a Floating IP in front if the Droplet may ever be rebuilt

Point DNS at the Floating IP, not the Droplet's own address — reassigning it to a replacement Droplet needs no DNS propagation wait.

Quick Tips

Destroy, don't just power off
A powered-off Droplet still bills for its disk — Destroy (after snapshotting if needed) is the only way to fully stop charges.
Private networking is free and low-latency
Route database/app traffic over the VPC's private IP instead of the public one — no bandwidth charges and no public exposure for internal traffic.
1-Click Apps save the boring setup
Docker, WordPress, and dozens of other stacks are available as pre-configured images at Droplet creation — skips the manual install for common stacks.