Skip to content
Tutorials Center
My learning

Topics

Lesson 32 of 35 ยท Operations and Cost

Pricing and Cost Control on DigitalOcean

Understand and control your DigitalOcean bill: hourly billing with a monthly cap, what keeps costing when stopped, bandwidth, tags and projects, billing alerts and right-sizing.

Cloud bills surprise people for the same few reasons: forgotten resources, over-sized machines and extras that were never planned. DigitalOcean pricing is simpler than the big clouds: fixed monthly prices, billed by the hour with a monthly cap, and a generous bandwidth allowance. This lesson explains the rules and shows how to estimate a bill before you create anything.

All prices below are examples used for arithmetic, not a quote: they change, differ by plan type and region, and you must read the current pricing page before deciding. DigitalOcean itself is not available on this site, so commands are text and the calculators are Python stand-ins.

How billing works

  • Hourly metering, monthly cap. Droplets show a monthly price and an hourly price. You pay per hour used, and never more than the monthly price in a month. Destroy a Droplet after ten hours and you pay for ten hours.
  • Powered-off is not free. A Droplet that is off still reserves CPU, RAM and disk, so it keeps billing. To stop paying, destroy it (after taking a snapshot if you need the data).
  • Billing is per resource per hour for Load Balancers, volumes, reserved IPs not attached to a Droplet, managed databases and Kubernetes worker nodes.
  • Storage is separate: snapshots and volumes are billed per GiB per month, backups as a percentage of the Droplet price, Spaces as a base fee including a storage and transfer allowance, with overage per GiB.
  • Bandwidth. Each Droplet plan includes outbound data transfer, and the allowances of all your Droplets in a month are pooled for the team. Inbound traffic is free, and traffic over the private network inside a datacenter is free. Overage is billed per GiB, so check the current rates.
  • Invoices are issued monthly, and you can see a running month-to-date estimate in the control panel (Billing).
Terminal
doctl balance get
doctl invoice list
doctl invoice summary latest
doctl billing-history list

Estimating a bill

Add up everything that runs. This stand-in uses example monthly prices and hours to show how the cap and the extras combine.

Python Stand-in: monthly bill estimator

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice the test Droplet: ten hours cost a small fraction of the monthly price. That is why creating a temporary machine to try something is cheap, as long as you remember to destroy it.

Where money leaks

  • Forgotten test Droplets and old snapshots (you pay for every GiB).
  • Unattached volumes and reserved IPs left after deleting a Droplet.
  • A Load Balancer per app where one ingress or one balancer would do (see Ingress).
  • Over-sized machines that idle at 5 percent CPU.
  • Non-production environments running all night and weekend.
  • Managed services (a database cluster with more nodes than needed).
  • Bandwidth overage from a public download or a hot-linked file; put a CDN in front of static files.
  • Kubernetes node pools with autoscaling and no maximum.

Habits that keep the bill predictable

  1. Use Projects and tags. Group resources by project (prod, staging, experiments) and tag everything with an owner. The bill is easier to read, and you can find orphans.
  2. Set a billing alert in the control panel so you get an email when month-to-date charges pass a number you choose.
  3. Right-size. Use the monitoring graphs: if CPU and memory stay below 30 percent for weeks, resize down; if they spike, resize up or scale out. A Droplet can be resized (CPU and RAM only, which is reversible, or including disk, which is permanent).
  4. Schedule non-production machines: destroy and recreate from a snapshot or Terraform config, rather than leaving them powered off (which still bills).
  5. Review monthly. List everything with doctl compute droplet list, volume list, snapshot list, load-balancer list and reserved-ip list, and delete what nobody can explain.
  6. Choose the right plan type. Basic (shared CPU) Droplets suit most small apps. General Purpose, CPU-Optimized and Memory-Optimized use dedicated CPUs and cost more; pick them only after measuring.
Python Stand-in: find idle resources

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The thresholds are examples; real decisions need weeks of data and a look at memory, disk and peak load, not only average CPU.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. You power off a Droplet. Do you still pay for it?

    A powered-off Droplet still reserves its CPU, RAM and disk, so it keeps billing; destroy it to stop.
  2. 2. What is the maximum you pay for a Droplet in one month?

    Billing is hourly but capped at the monthly price.
  3. 3. Which helps you find forgotten resources?

    Grouping and tagging make orphans visible, and regular reviews delete them.
  4. 4. Which data transfer is free?

    Inbound and intra-datacenter private traffic are not billed; outbound beyond the allowance is.

Summary

  • Droplets bill by the hour up to a monthly cap, and stopping a Droplet does not stop the charge; destroying it does.
  • Volumes, snapshots, backups, reserved IPs, Load Balancers, databases and Kubernetes nodes all add to the bill.
  • Estimate with simple arithmetic, tag everything, set billing alerts and review the resource list monthly.
  • Right-size from monitoring data and treat prices here as examples; read the live pricing page.

Next: Project: A Web App on a Droplet