Hetzner Cloud sells cheap VMs with generous traffic from European and US locations. DigitalOcean adds managed databases, App Platform and Kubernetes on top of Droplets. How they compare for a typical backend, and when AWS or GCP is the better target.
Hetzner and DigitalOcean both sell cloud VMs that a small team can stand up in minutes, and they sit in a different price band from AWS and GCP. Hetzner Cloud is known for low server prices and high included traffic from locations in Germany, Finland, the US and Singapore. DigitalOcean pairs Droplets with a short list of managed products, including databases, Spaces, App Platform and DOKS.
For a backend with a database, object storage and more than one service, the comparison is less about the cheapest 2 vCPU box and more about what you still have to operate yourself. This guide compares pricing, regions and managed offerings, then notes where Encore fits when the target cloud is AWS or GCP rather than either of these two.
Hetzner Cloud sells Cloud Servers with shared or dedicated vCPU plans, plus volumes, load balancers, networks, firewalls, snapshots and object storage. Shared plans start near €5.99 a month for cost-optimized shapes, and regular shared plans start near €6.49, with dedicated general-purpose shapes starting near €43.49, all excluding VAT, as listed on the Cloud product page. Inclusive traffic is high by hyperscaler standards, which is why bandwidth-heavy European workloads often land here.
Locations are Falkenstein and Nuremberg in Germany, Helsinki in Finland, Ashburn in Virginia, Hillsboro in Oregon, and Singapore. Object storage is available in the European locations only. There is no first-party managed Kubernetes product; community tutorials wire clusters onto Cloud Servers with tools such as Edka or Cloudfleet.
Hetzner documents Managed Databases under its Managed Hosting line for MariaDB/MySQL and PostgreSQL next to CMS-style apps, which is not the same as a Cloud-native managed database with standby nodes and point-in-time recovery in every Cloud location. For a production API on Hetzner Cloud, you usually install Postgres on a Cloud Server and own backups, upgrades and failover.
Best fit: teams that want maximum CPU and traffic per euro, are comfortable operating the database, and whose users sit well in Hetzner's six locations.
DigitalOcean's Droplets are Linux VMs with Basic, General Purpose, CPU-Optimized and related shapes. A Basic Droplet with 2 vCPU and 4 GiB RAM is $24 a month with 80 GiB SSD and 4,000 GiB transfer, per Droplet pricing. App Platform deploys from Git or a container image for teams that want a PaaS path, and DOKS runs managed Kubernetes with a free control plane option and paid high availability.
Managed Databases cover PostgreSQL, MySQL, MongoDB, Kafka and caching, with a single-node Standard PostgreSQL starting at about $15.15 a month for 1 GiB RAM and larger plans, standbys and Advanced Edition for higher concurrency. Spaces provides S3-compatible object storage with a CDN. DigitalOcean operates 20 datacenters across 13 regions, with 16 locations where you can create new Droplets, including New York, San Francisco, Amsterdam, London, Frankfurt, Toronto, Singapore, Bangalore, Sydney and several newer US sites.
You pay more per vCPU than on Hetzner and still lack the long AWS or GCP catalog of messaging, IAM and compliance programs, and what you buy is a shorter path to a patched database and a documented PaaS or Kubernetes option beside the VM.
Best fit: small teams that want managed Postgres, Spaces and a deploy path that is not "SSH and systemd," and that accept a higher VM price for that surface area.
On a like-for-like VM, Hetzner usually wins on list price and included traffic, especially in Europe. On a like-for-like production backend with a managed database, DigitalOcean's Managed Databases and Spaces close the gap because Hetzner Cloud leaves Postgres and (outside Europe) object storage as your problem. Region coverage favors DigitalOcean for US multi-site, Canada, India and Australia; Hetzner is strong when Germany, Finland or a single US/Singapore edge is enough.
Neither provider is AWS or GCP: fine-grained IAM, the full messaging catalog and the compliance programs enterprise buyers ask for still live with the hyperscalers.
Encore is infrastructure from code that provisions and deploys into your own AWS or GCP account. It does not deploy to Hetzner or DigitalOcean today. If the backend must stay on those clouds, use their native products. If the team is choosing a cloud for managed databases, queues, object storage and IAM, and that cloud is AWS or GCP, Encore is the path that keeps infrastructure in application code.

A Go service that records uploads in Postgres and returns a signed upload URL looks like this:
// media/media.go
package media
import (
"context"
"fmt"
"time"
"encore.dev/storage/objects"
"encore.dev/storage/sqldb"
)
// S3 on AWS, Cloud Storage on GCP, a local emulator with encore run.
var Uploads = objects.NewBucket("uploads", objects.BucketConfig{})
var db = sqldb.NewDatabase("media", sqldb.DatabaseConfig{
Migrations: "./migrations",
})
type UploadURLParams struct {
Filename string `json:"filename"`
}
type UploadURLResponse struct {
ID int64 `json:"id"`
URL string `json:"url"`
}
//encore:api public method=POST path=/uploads
func CreateUploadURL(ctx context.Context, p *UploadURLParams) (*UploadURLResponse, error) {
key := fmt.Sprintf("%d-%s", time.Now().UnixNano(), p.Filename)
var id int64
err := db.QueryRow(ctx,
`INSERT INTO uploads (object_key) VALUES ($1) RETURNING id`, key,
).Scan(&id)
if err != nil {
return nil, err
}
signed, err := Uploads.SignedUploadURL(ctx, key, objects.WithTTL(15*time.Minute))
if err != nil {
return nil, err
}
return &UploadURLResponse{ID: id, URL: signed.URL}, nil
}
Run in your terminal to get started locally.
encore run starts Postgres locally along with an object storage emulator. After you connect your cloud account, the same declarations become RDS and S3 on AWS, or Cloud SQL and Cloud Storage on GCP, and Encore provisions an IAM role for the service. An AI coding agent that adds the bucket writes one declaration in the same change and never handles long-lived cloud access keys.
Best fit: teams that need AWS or GCP for regions, IAM or managed services, and want the backend's databases, buckets and related infra defined in TypeScript or Go.
Choose Hetzner Cloud when raw compute and traffic price dominate, you will run the database yourself, and six locations cover your users. Choose DigitalOcean when managed Postgres, Spaces, App Platform or DOKS matter more than the cheapest VM. Choose Encore on AWS or GCP when the backend belongs on a hyperscaler and you want that infrastructure provisioned from application code rather than assembled by hand on either VPS cloud.
For raw VMs Hetzner is usually cheaper: a Cloud shared plan around 2 vCPU and 4 GB often lands near €5 to €6 a month in Europe, while a DigitalOcean Basic Droplet at 2 vCPU and 4 GiB is $24 a month. The gap narrows once you add a managed database, object storage outside Europe, or staff time to run Postgres yourself on Hetzner.
Hetzner Cloud does not ship a first-party managed Postgres or MySQL product comparable to DigitalOcean Managed Databases. You run the database on a Cloud Server, or use Hetzner's separate Managed Hosting database offering aimed at CMS-style apps. DigitalOcean Managed Databases cover PostgreSQL, MySQL, MongoDB, Kafka and caching with backups and standby options.
DigitalOcean operates datacenters across 13 regions with 16 locations where you can create new Droplets, including several US sites plus Amsterdam, London, Frankfurt, Toronto, Singapore, Bangalore and Sydney. Hetzner Cloud has six locations: Falkenstein, Nuremberg, Helsinki, Ashburn, Hillsboro and Singapore.
Encore currently provisions and deploys into your own AWS or GCP account, not Hetzner or DigitalOcean. If the backend needs to land on those clouds, use their native products or your own automation. If the goal is AWS or GCP with databases, queues, storage and cron declared in application code, Encore is the fit.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.