Skip to main content
DigitalOceanComputebeginner

DigitalOcean Droplets Guide

Comprehensive guide to DigitalOcean Droplets covering types, sizing, creation, networking, storage, backups, resizing, and production best practices.

CloudToolStack Team22 min readPublished Mar 14, 2026

Prerequisites

Understanding DigitalOcean Droplets

Droplets are DigitalOcean's virtual machines, and they are the foundational compute unit of the platform. Unlike AWS EC2 instances or Azure VMs, which offer hundreds of instance types with complex pricing models, DigitalOcean Droplets use a straightforward sizing model with five categories, each optimized for specific workload types. Every Droplet runs on enterprise-grade hardware with SSD storage, includes a public IPv4 and IPv6 address, and offers predictable flat-rate pricing with a monthly cap.

Droplets are built on KVM virtualization and run on top of high-performance hardware with Intel and AMD processors. The underlying hypervisor provides strong isolation between tenants, and the network architecture delivers consistent performance regardless of neighboring workloads. This guide covers Droplet types, sizing strategies, creation options, networking, storage, backups, and operational best practices for running production workloads.

Droplet Types and Sizing

Basic Droplets

Basic Droplets use shared CPU cores and are DigitalOcean's most affordable option, starting at $4/month for 512 MB RAM and 1 vCPU. They are suitable for development environments, small websites, blogs, test servers, and low-traffic applications. Basic Droplets come in Regular (SSD) and Premium (NVMe SSD) variants. Premium Basic Droplets offer faster storage I/O at a slightly higher price point.

bash
# List Basic Droplet sizes
doctl compute size list --output json | \
  jq '[.[] | select(.slug | startswith("s-"))]'

# Common Basic sizes:
# s-1vcpu-512mb-10gb  - $4/mo   (512 MB, 1 vCPU, 10 GB SSD)
# s-1vcpu-1gb         - $6/mo   (1 GB, 1 vCPU, 25 GB SSD)
# s-1vcpu-2gb         - $12/mo  (2 GB, 1 vCPU, 50 GB SSD)
# s-2vcpu-4gb         - $24/mo  (4 GB, 2 vCPU, 80 GB SSD)
# s-4vcpu-8gb         - $48/mo  (8 GB, 4 vCPU, 160 GB SSD)

General Purpose Droplets

General Purpose Droplets provide dedicated CPU cores with a balanced ratio of CPU, memory, and NVMe SSD storage. They use a 1:4 vCPU-to-RAM ratio (2 vCPU / 8 GB, 4 vCPU / 16 GB, etc.) and are the recommended choice for production web servers, application servers, CI/CD runners, and medium-traffic APIs. The dedicated CPU guarantee means your performance is not affected by other tenants on the same physical host.

bash
# General Purpose sizes (g- prefix):
# g-2vcpu-8gb    - $68/mo   (8 GB, 2 dedicated vCPU)
# g-4vcpu-16gb   - $136/mo  (16 GB, 4 dedicated vCPU)
# g-8vcpu-32gb   - $272/mo  (32 GB, 8 dedicated vCPU)
# g-16vcpu-64gb  - $544/mo  (64 GB, 16 dedicated vCPU)
# g-32vcpu-128gb - $1088/mo (128 GB, 32 dedicated vCPU)
# g-40vcpu-160gb - $1360/mo (160 GB, 40 dedicated vCPU)

CPU-Optimized Droplets

CPU-Optimized Droplets deliver the highest per-core performance with dedicated Intel or AMD processors running at high clock speeds. They use a 1:2 vCPU-to-RAM ratio (2 vCPU / 4 GB, 4 vCPU / 8 GB) and are ideal for CPU-intensive workloads like batch processing, machine learning inference, video encoding, gaming servers, and high-performance computing tasks.

Memory-Optimized Droplets

Memory-Optimized Droplets provide a high RAM-to-CPU ratio (1:8 vCPU-to-RAM) with dedicated CPU cores. Starting at 2 vCPU / 16 GB and scaling up to 32 vCPU / 256 GB, they are designed for in-memory databases (Redis, Memcached), large dataset processing, real-time analytics, and applications that require large working sets in memory. All Memory-Optimized Droplets include NVMe SSD storage.

Storage-Optimized Droplets

Storage-Optimized Droplets include large local NVMe SSD volumes for I/O-intensive workloads. They are ideal for time-series databases (InfluxDB, TimescaleDB), distributed filesystems (Ceph, MinIO), data warehousing, and log aggregation systems where storage throughput and IOPS are the primary bottleneck.

Droplet Pricing Model

DigitalOcean charges Droplets by the hour with a monthly cap. For example, a $24/month Droplet costs $0.03571/hour. If you run it for 10 hours and destroy it, you pay approximately $0.36. The monthly cap ensures you never pay more than the listed monthly price. Bandwidth is included: every Droplet gets between 1-11 TB of outbound transfer depending on size (pooled across all Droplets in your account).

Creating Droplets

Using the Control Panel

The DigitalOcean control panel provides a guided Droplet creation flow. Navigate to Create > Droplets, select your region, image (OS or marketplace application), size, authentication method (SSH keys recommended), and optional features like monitoring, backups, VPC, and user data scripts. The control panel shows real-time pricing as you configure options.

Using doctl CLI

bash
# Create a production Droplet with all recommended options
doctl compute droplet create app-server-01 \
  --region nyc3 \
  --size g-2vcpu-8gb \
  --image ubuntu-24-04-x64 \
  --ssh-keys <fingerprint-1>,<fingerprint-2> \
  --vpc-uuid <vpc-uuid> \
  --tag-names "app,production,nyc3" \
  --enable-monitoring \
  --enable-backups \
  --enable-ipv6 \
  --user-data-file ./cloud-init.yaml \
  --wait

# Create multiple Droplets at once
doctl compute droplet create web-01 web-02 web-03 \
  --region nyc3 \
  --size s-2vcpu-4gb \
  --image ubuntu-24-04-x64 \
  --ssh-keys <fingerprint> \
  --tag-names "web,production" \
  --enable-monitoring \
  --wait

Using Cloud-Init User Data

Cloud-init scripts run automatically when a Droplet boots for the first time. Use them to install packages, configure services, set up users, and bootstrap your application. This is essential for automation and Infrastructure as Code workflows.

yaml
#cloud-config
package_update: true
package_upgrade: true
packages:
  - nginx
  - certbot
  - python3-certbot-nginx
  - fail2ban
  - ufw

runcmd:
  - ufw allow 'Nginx Full'
  - ufw allow OpenSSH
  - ufw --force enable
  - systemctl enable nginx
  - systemctl start nginx
  - systemctl enable fail2ban
  - systemctl start fail2ban

Droplet Networking

Public and Private Networking

Every Droplet receives a public IPv4 address and optionally a public IPv6 address. When placed in a VPC, Droplets also receive a private IP address for internal communication. Private networking traffic is free and does not count against your bandwidth allowance. Always use private IP addresses for database connections, inter-service communication, and any traffic that does not need to traverse the public internet.

Floating IPs (Reserved IPs)

Reserved IPs (formerly Floating IPs) are static public IP addresses that you can assign to any Droplet in the same datacenter region. They are essential for high availability configurations because you can instantly reassign the IP to a standby Droplet during failover. Reserved IPs are free when assigned to a Droplet and cost $5/month when unassigned.

bash
# Create a reserved IP
doctl compute reserved-ip create --region nyc3

# Assign to a Droplet
doctl compute reserved-ip-action assign <ip> <droplet-id>

# Reassign to another Droplet (instant failover)
doctl compute reserved-ip-action assign <ip> <new-droplet-id>

Storage Options

Local SSD Storage

Every Droplet includes local SSD storage that scales with the Droplet size. This storage is fast and included in the price, but it is ephemeral for Basic Droplets if the underlying hardware fails. For production data, always use additional block storage volumes or external storage services.

Block Storage Volumes

Block Storage Volumes are network-attached SSD volumes that you can attach to Droplets. They provide persistent storage that survives Droplet destruction, can be detached and reattached to different Droplets (in the same region), and support snapshots for backups. Volumes range from 1 GB to 16 TB and cost $0.10/GB/month.

bash
# Create a volume
doctl compute volume create data-vol \
  --region nyc3 \
  --size 100GiB \
  --desc "Application data volume" \
  --fs-type ext4 \
  --fs-label data

# Attach to a Droplet
doctl compute volume-action attach <volume-id> <droplet-id>

# On the Droplet, mount the volume
sudo mount -o defaults,nofail,discard,noatime /dev/disk/by-id/scsi-0DO_Volume_data-vol /mnt/data

Backups and Snapshots

Automated Backups

DigitalOcean offers automated weekly backups for Droplets at 20% of the Droplet price. Four weekly backups are retained. For a $24/month Droplet, backups cost $4.80/month. Backups capture the entire Droplet disk and can be used to restore the Droplet or create new Droplets from the backup image.

On-Demand Snapshots

Snapshots are point-in-time images of your Droplet or volume that you create manually. They cost $0.06/GB/month based on the used disk space (not the allocated size). Snapshots are useful for creating golden images, pre-deployment checkpoints, and migrating Droplets between regions.

bash
# Create a Droplet snapshot (power off recommended for consistency)
doctl compute droplet-action snapshot <droplet-id> \
  --snapshot-name "pre-deploy-$(date +%Y%m%d)"

# List snapshots
doctl compute snapshot list

# Create a new Droplet from a snapshot
doctl compute droplet create restored-server \
  --region nyc3 \
  --size s-2vcpu-4gb \
  --image <snapshot-id> \
  --ssh-keys <fingerprint>

Snapshot Consistency

For the most consistent snapshots, power off your Droplet before creating a snapshot. Live snapshots are supported but may result in filesystem inconsistencies, especially for databases. For database servers, use the database's native backup tools (pg_dump, mysqldump) in addition to Droplet snapshots.

Resizing Droplets

DigitalOcean supports both temporary (CPU/RAM only) and permanent (CPU/RAM + disk) resizing. Temporary resizing allows you to scale up and back down, while permanent resizing increases disk size which cannot be reversed. Resizing requires a brief downtime (typically 1-2 minutes) as the Droplet is migrated to new hardware.

bash
# Resize (CPU/RAM only, reversible)
doctl compute droplet-action resize <droplet-id> \
  --size g-4vcpu-16gb \
  --resize-disk=false \
  --wait

# Resize (with disk, permanent)
doctl compute droplet-action resize <droplet-id> \
  --size g-4vcpu-16gb \
  --resize-disk=true \
  --wait

Production Best Practices

  • Use dedicated CPU Droplets (General Purpose, CPU-Optimized, or Memory-Optimized) for production workloads to avoid noisy neighbor issues.
  • Enable monitoring on every Droplet and set up alerts for CPU, memory, and disk usage.
  • Use Cloud Firewalls to restrict network access. Never expose SSH, database ports, or admin interfaces to the public internet.
  • Deploy in a VPC and use private IP addresses for all internal communication.
  • Enable automated backups for all production Droplets. The 20% premium is inexpensive insurance.
  • Use tags consistently to organize Droplets and apply firewalls, monitoring alerts, and load balancer backends by tag.
  • Automate provisioning with cloud-init user data, Ansible, or Terraform to ensure reproducible deployments.
  • Consider reserved Droplets for steady-state workloads to save up to 20% compared to on-demand pricing.

Terraform Integration

DigitalOcean has an official Terraform provider that supports all major resources. Infrastructure as Code is strongly recommended for production environments to ensure reproducibility, version control, and automated deployment.

hcl
resource "digitalocean_droplet" "web" {
  count    = 3
  name     = "web-${count.index + 1}"
  region   = "nyc3"
  size     = "g-2vcpu-8gb"
  image    = "ubuntu-24-04-x64"
  vpc_uuid = digitalocean_vpc.prod.id
  ssh_keys = [digitalocean_ssh_key.deploy.fingerprint]
  tags     = ["web", "production"]

  monitoring = true
  backups    = true

  user_data = file("cloud-init.yaml")
}

Key Takeaways

  1. 1Droplets come in five types: Basic, General Purpose, CPU-Optimized, Memory-Optimized, and Storage-Optimized.
  2. 2Basic Droplets use shared CPU; dedicated types guarantee CPU performance.
  3. 3Cloud-init user data automates Droplet provisioning at boot time.
  4. 4Block Storage Volumes provide persistent, detachable storage at $0.10/GB/month.
  5. 5Automated backups cost 20% of Droplet price and retain 4 weekly snapshots.
  6. 6Droplets can be resized with or without disk expansion.

Frequently Asked Questions

What is the difference between Basic and General Purpose Droplets?
Basic Droplets use shared CPU cores and are cheaper. General Purpose Droplets provide dedicated CPU cores with guaranteed performance. Use Basic for development and low-traffic sites; use General Purpose for production workloads.
Can I resize a Droplet without downtime?
No. Droplet resizing requires a brief downtime (typically 1-2 minutes) as the Droplet is migrated to new hardware. For zero-downtime scaling, use Load Balancers with multiple Droplets or DOKS with horizontal pod autoscaling.
How do Droplet backups work?
Automated backups create weekly snapshots of your entire Droplet disk. Four backups are retained (rolling). Backups cost 20% of the Droplet monthly price. You can restore a Droplet from a backup or create a new Droplet from a backup image.

Written by CloudToolStack Team

Cloud engineers and architects with hands-on experience across AWS, Azure, and GCP. We write guides based on real-world production patterns, not just documentation rewrites.

Disclaimer: This guide is for educational purposes. Cloud services change frequently; always refer to official documentation for the latest information. AWS, Azure, and GCP are trademarks of their respective owners.