Tutorials Search / Shipping & infrastructure / Buy a server from Hetzner
📝 Written ● Beginner Updated 2026-05-13

Buy a server from Hetzner

Hetzner is the European cloud nobody outside Europe used to talk about, which is shifting because the prices are obviously the best in the market. You get more RAM and more CPU per dollar than at DigitalOcean, Linode, or Vultr — sometimes 2× more. The cost is a slightly drier UI and a colder onboarding.

The VPS market has converged on similar shapes and similar prices over the last decade — DigitalOcean, Linode (now Akamai), Vultr, and the big-three cloud providers all charge roughly the same for roughly the same droplet. The exception is Hetzner. A German hosting company that's been around since 1997, Hetzner has a structural cost advantage from running their own data centers and a long history of selling cheap, capable Linux servers to a primarily European market. They expanded to a US data center in 2021 and the same prices traveled with them.

What this means concretely: their entry-tier server (CX22) is €3.79/month for 2 vCPUs, 4GB RAM, 40GB NVMe storage. DigitalOcean's roughly equivalent droplet (4GB) is $24/month — six times the price for the same RAM tier. The math gets more interesting as you go up: an 8GB / 4-core Hetzner server is roughly €8/month; the same at most US clouds is $40+. For workloads that need real RAM (databases, caches, builds), the savings are enormous.

The trade-offs are honest. The UI is functional but plain. Documentation is good but doesn't have the polish of DigitalOcean's tutorials. The European regions are first-class; the US region is competent but newer. Customer support is responsive but in business hours. None of this matters once you're running. It matters in the first hour of using the platform.

What you'll learn

Step 1: Hetzner Cloud, not Hetzner Robot

1

Two product lines, one company

Hetzner sells two things:

  • Hetzner Cloud at console.hetzner.cloud. VPSs (virtual machines), pay-by-the-hour, snapshots, similar shape to DigitalOcean. This is what you want.
  • Hetzner Robot at robot.hetzner.com. Dedicated bare-metal servers, contracts, fixed monthly. Different product, different audience (people running enormous workloads on physical hardware).

Sign up at hetzner.com/cloud (the verification process is slightly slower than DO — they sometimes ask for ID or a small initial payment to verify you're real; this is normal, not a flag).

Step 2: Pick a region

2

Five locations, all worth their respective markets

Hetzner's data centers:

  • Falkenstein, Nuremberg, Helsinki — European; lowest latency from EU users.
  • Ashburn (US East) — solid for North American users; opened 2021.
  • Hillsboro (US West) — opened later; same shape.
  • Singapore — for APAC users.

Pick whichever's nearest your users. If you're in the US, the Ashburn or Hillsboro data center is fine — latency to US users is comparable to DigitalOcean. Don't be put off by "European-feeling" company branding; the US infrastructure works.

Step 3: Pick a server type

3

The shared-CPU tier is the headline value

The CX series (shared-CPU Intel) and CAX series (shared-CPU Ampere/ARM) are where the price advantage lives:

  • CX22: 2 vCPU / 4 GB / 40 GB SSD — ~€4/mo. Entry tier; usable for real apps.
  • CX32: 4 vCPU / 8 GB / 80 GB SSD — ~€7/mo. Sweet spot for many projects.
  • CX42: 8 vCPU / 16 GB / 160 GB SSD — ~€16/mo.
  • CAX (ARM): the ARM tiers are even cheaper if your software runs on ARM (most modern things do). Same shape, ~30% cheaper than their CX equivalents.

Dedicated-CPU tiers (CCX) exist for workloads that don't tolerate noisy neighbors, at ~3× the price. Don't start there.

The 20TB included egress. Each cloud server includes 20TB of outbound traffic per month at no extra charge. At AWS or DO, that traffic would cost $1.80/TB after their (lower) included allowance — Hetzner's bandwidth allowance alone saves you $20–50/month at modest scale.

Step 4: SSH key, image, name, create

4

Same shape as any other VPS

In Security → SSH Keys, paste your public key (~/.ssh/id_ed25519.pub on your Mac). Then Servers → Add Server:

  • Location: from Step 2.
  • Image: Ubuntu 24.04 LTS.
  • Type: from Step 3.
  • SSH keys: the one you just added.
  • Name: web-1 or similar.

Click Create & Buy Now. The server is up in roughly 30 seconds. You'll see its IPv4 (and a free IPv6) in the dashboard.

Step 5: SSH in, harden, point DNS

5

Same first-ten-minutes routine

The hardening steps are identical to any other VPS:

ssh root@<server-ip>

# Update packages
apt update && apt upgrade -y

# Create non-root user
adduser deploy
usermod -aG sudo deploy
rsync --archive --chown=deploy:deploy ~/.ssh /home/deploy

# Turn on firewall
ufw allow OpenSSH
ufw enable

# Disable root SSH (after verifying deploy user works in another terminal)
# Edit /etc/ssh/sshd_config: PermitRootLogin no
systemctl restart sshd

Point your domain — A record at your DNS provider, value = the Hetzner server IP. See Connect your domain to a server for the DNS details. Within minutes, your domain reaches Hetzner.

Step 6: Firewalls — Hetzner-specific

6

Cloud Firewall vs. ufw

You have two layers of firewall available:

  • ufw on the server itself — runs at the OS level. Standard, works everywhere, requires being on the server to change.
  • Hetzner Cloud Firewall — runs at Hetzner's network edge before traffic reaches the server. Configured in the dashboard. Free.

Use both. Cloud Firewall blocks scans before they hit your VM; ufw is your local last line. They cost nothing and they're independent.

Step 7: When Hetzner is the wrong pick

7

Two honest cases

  • You want US polish, US support hours, US-first documentation. DigitalOcean's docs are written for US developers; Hetzner's are written for everyone. The difference shows up in subtle phrasing and "first thing you'd Google" coverage.
  • You need many regions. Hetzner has five data centers. AWS has 30+. For latency-sensitive global products, AWS or Cloudflare Workers wins.

For everything else — personal projects, small apps, side businesses, even production at modest scale — Hetzner is a price advantage that doesn't have a hidden cost.

Hetzner is strict about abuse. Running anything that could look like spam, mass-scraping, or sketchy commercial activity will get the account suspended fast. This is a feature for the platform's reliability, an annoyance if your project is at the edge of acceptable use. Read their AUP before deploying anything unusual.

What's next