DigitalOcean Cheat Sheet

Last Updated: November 21, 2025

CLI Installation

brew install doctl
Install DO CLI via Homebrew
snap install doctl
Install via Snap (Linux)
doctl auth init
Authenticate with API token
doctl auth list
List authentication contexts

Droplets (VMs)

doctl compute droplet list
List all droplets
doctl compute droplet create my-droplet --size s-1vcpu-1gb --image ubuntu-22-04-x64 --region nyc1
Create new droplet
doctl compute droplet get droplet-id
Get droplet details
doctl compute droplet delete droplet-id
Delete droplet
doctl compute droplet-action reboot droplet-id
Reboot droplet
doctl compute droplet-action power-off droplet-id
Power off droplet
doctl compute droplet-action power-on droplet-id
Power on droplet
doctl compute droplet-action resize droplet-id --size s-2vcpu-2gb
Resize droplet
doctl compute droplet-action snapshot droplet-id --snapshot-name my-snapshot
Create droplet snapshot

Droplet Sizes

s-1vcpu-1gb
1 vCPU, 1GB RAM, 25GB SSD ($6/mo)
s-1vcpu-2gb
1 vCPU, 2GB RAM, 50GB SSD ($12/mo)
s-2vcpu-2gb
2 vCPU, 2GB RAM, 60GB SSD ($18/mo)
s-2vcpu-4gb
2 vCPU, 4GB RAM, 80GB SSD ($24/mo)
doctl compute size list
List all available sizes

Regions

nyc1, nyc3
New York
sfo3
San Francisco
tor1
Toronto
lon1
London
fra1
Frankfurt
sgp1
Singapore
doctl compute region list
List all regions

SSH Keys

doctl compute ssh-key list
List SSH keys
doctl compute ssh-key create my-key --public-key "ssh-rsa ..."
Add SSH key
doctl compute ssh-key delete key-id
Delete SSH key
--ssh-keys key-id
Add SSH key to droplet on creation

Spaces (Object Storage)

doctl compute space list
List all spaces (S3-compatible)
s3cmd put file.txt s3://my-space/
Upload file to space (with s3cmd)
s3cmd ls s3://my-space/
List objects in space
https://space-name.nyc3.digitaloceanspaces.com
Space endpoint URL
https://space-name.nyc3.cdn.digitaloceanspaces.com
CDN-enabled space URL

App Platform

doctl apps list
List all apps
doctl apps create --spec app.yaml
Create app from spec file
doctl apps update app-id --spec app.yaml
Update app configuration
doctl apps get app-id
Get app details
doctl apps delete app-id
Delete app
doctl apps logs app-id
Stream app logs
doctl apps create-deployment app-id
Trigger new deployment

Databases

doctl databases list
List database clusters
doctl databases create my-db --engine pg --region nyc1
Create PostgreSQL database
--engine mysql
Create MySQL database
--engine redis
Create Redis database
--engine mongodb
Create MongoDB database
doctl databases connection db-id
Get connection details
doctl databases db list db-id
List databases in cluster
doctl databases db create db-id my-database
Create new database

Kubernetes

doctl kubernetes cluster list
List Kubernetes clusters
doctl kubernetes cluster create my-cluster --region nyc1
Create K8s cluster
doctl kubernetes cluster kubeconfig save cluster-id
Download kubeconfig
doctl kubernetes cluster delete cluster-id
Delete cluster

Firewalls

doctl compute firewall list
List firewalls
doctl compute firewall create --name my-fw --inbound-rules "protocol:tcp,ports:22,sources:addresses:0.0.0.0/0"
Create firewall rule
doctl compute firewall add-droplets firewall-id --droplet-ids droplet-id
Apply firewall to droplet

Load Balancers

doctl compute load-balancer list
List load balancers
doctl compute load-balancer create --name my-lb --region nyc1
Create load balancer
doctl compute load-balancer add-droplets lb-id --droplet-ids id1,id2
Add droplets to load balancer

Volumes (Block Storage)

doctl compute volume list
List volumes
doctl compute volume create my-volume --size 100GiB --region nyc1
Create 100GB volume
doctl compute volume-action attach volume-id droplet-id
Attach volume to droplet
doctl compute volume-action detach volume-id
Detach volume
doctl compute volume delete volume-id
Delete volume

Snapshots & Images

doctl compute snapshot list
List snapshots
doctl compute image list
List available images
doctl compute image list-user
List your custom images
doctl compute snapshot delete snapshot-id
Delete snapshot

Monitoring & Alerts

doctl monitoring alert list
List alert policies
doctl monitoring alert create
Create alert policy
💡 Pro Tip: Use doctl for command-line management. Spaces are S3-compatible - use existing S3 tools! Enable CDN on Spaces for faster global delivery!
← Back to DevOps & Cloud | Browse all categories | View all cheat sheets