Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Best VPS for Claude Code: How to Choose

· 6 min read · Home Tech

In this article
  1. What to Look For
  2. Hetzner CX32
  3. DigitalOcean Droplet (Premium Intel/AMD)
  4. Vultr High Frequency Compute
  5. Linode (Akamai) Shared Compute
  6. AWS Lightsail
  7. OVHcloud VPS
  8. How to Choose
  9. Frequently Asked Questions
  10. Bottom Line

For running Claude Code reliably, the top pick is a Hetzner CX32 (or similar) with 4 vCPU, 8 GB RAM, and an NVMe SSD, because it offers the best balance of performance, cost, and low latency for API-driven coding tasks. Claude Code itself is lightweight, but your terminal, editor, and any local tools benefit from a responsive CPU and fast disk. Hetzner's pricing is roughly $10–15/month, making it the sweet spot for most developers.

What to Look For

Claude Code runs as a CLI tool that sends prompts to Anthropic's API, so the VPS doesn't need a GPU or massive RAM. The real requirements are:

  • CPU performance – A modern 2–4 vCPU (AMD EPYC or Intel Xeon) is enough; single-thread speed matters for terminal responsiveness.
  • RAM – 4 GB minimum, 8 GB comfortable if you run multiple sessions or a local editor like VS Code Server.
  • Storage – NVMe SSD is essential; avoid cheap HDD VPS. 40–80 GB is plenty for code and tools.
  • Network – Low latency to Anthropic's API (us-east or us-west) and a stable connection. 1 Gbps port is standard.
  • Reliability and support – Uptime SLA, good reputation, and responsive support for when things break.
  • Pricing – You should not pay more than $20/month for a Claude Code VPS unless you need high availability or geographic redundancy.

Hetzner CX32

Strengths: Excellent price-to-performance, NVMe storage, 4 vCPU (AMD EPYC), 8 GB RAM, 40 GB disk, 20 TB traffic. Data centers in US and EU, so you can pick the one closest to Anthropic's API. The control panel and API are clean, and setup takes minutes.

Trade-offs: No managed backups by default (you can add them), and support is ticket-only (no phone). The interface is minimal, which some users find less friendly.

Best for: Developers who want maximum value and are comfortable with a DIY setup. It's the default recommendation for most Claude Code users.

DigitalOcean Droplet (Premium Intel/AMD)

Strengths: Predictable pricing ($12–18/month for 2–4 vCPU, 4–8 GB RAM), excellent documentation, and a user-friendly control panel. The Premium AMD droplets use fast NVMe and have good network throughput. DigitalOcean also offers one-click apps and easy scaling.

Trade-offs: Slightly more expensive than Hetzner for similar specs. Bandwidth is capped (e.g., 2–4 TB) and overage charges apply. No free tier.

Best for: Teams or individuals who prefer a polished UI, want to avoid surprises, and need reliable customer support (24/7 chat).

Vultr High Frequency Compute

Strengths: High-frequency Intel/AMD CPUs with clock speeds up to 3.5 GHz, which makes terminal and editor interactions snappy. NVMe storage, 10 Gbps network (shared), and data centers worldwide. Plans start around $6/month for 1 vCPU/2 GB, but for Claude Code you'd want the 4 GB or 8 GB tier ($24–48/month).

Trade-offs: Higher cost per GB of RAM compared to Hetzner. The high-frequency line is more expensive, and the 10 Gbps port is shared, so real-world throughput varies.

Best for: Users who notice lag in their terminal and want the fastest CPU possible without moving to a dedicated server.

Linode (Akamai) Shared Compute

Strengths: Reliable network, good support, and a simple pricing model (e.g., $20/month for 4 vCPU, 8 GB RAM). Linode's infrastructure is solid, and they offer long-term discounts (hourly billing).

Trade-offs: Storage is SSD but not always NVMe (older plans may use SATA SSD). The CPU is not as fast as Vultr's high-frequency. Slightly less flexible than DigitalOcean in terms of add-ons.

Best for: Developers who value stability and a long track record, and who don't need bleeding-edge CPU performance.

AWS Lightsail

Strengths: Familiar AWS ecosystem, predictable pricing (e.g., $20/month for 4 vCPU, 8 GB RAM), and integrated with other AWS services. Good global presence.

Trade-offs: Limited instance types compared to EC2, and the CPU is often older (Intel Xeon). Network performance can be inconsistent. The console is more complex than needed for a simple VPS.

Best for: Users already invested in AWS who want to keep everything in one place, or who need easy access to S3, CloudWatch, etc.

OVHcloud VPS

Strengths: Competitive pricing, especially in Europe. NVMe storage on higher tiers, and unmetered bandwidth on some plans. Data centers in EU, US, and Asia.

Trade-offs: Support is often rated poorly, and the control panel is dated. Some users report longer setup times. The cheapest plans have limited CPU performance.

Best for: Budget-conscious users in Europe who don't need hand-holding and can troubleshoot on their own.

How to Choose

Start with your budget. If you want to spend under $15/month, Hetzner CX32 or a DigitalOcean Premium AMD (2 vCPU/4 GB) are the best. If you need more RAM for multiple sessions or a local IDE, look at the 8 GB tiers from Hetzner, DigitalOcean, or Linode ($20–30/month).

Consider your use case: if you're just running Claude Code in a terminal, 4 GB RAM is plenty. If you also run a language server, a web server, or a database, go for 8 GB. If you're collaborating with a team, choose a provider with a good API and team management features (DigitalOcean, AWS).

Common trade-offs: cheaper providers (Hetzner, OVH) have less support; premium providers (DigitalOcean, Vultr) cost more but offer better UI and support. Network latency to Anthropic's API matters – pick a data center in the same region as your API endpoint (usually us-east or us-west). Always choose NVMe storage; it makes a noticeable difference in package installs and file operations.

Frequently Asked Questions

Do I need a GPU for Claude Code?

No. Claude Code runs locally and sends requests to Anthropic's API, so a GPU is unnecessary. A standard CPU with 4 GB RAM is sufficient.

How much RAM do I really need?

4 GB is the minimum for a single session. 8 GB gives you headroom for multiple sessions, a local editor, or background services. Avoid going below 2 GB.

Can I use a shared hosting plan instead?

No. Shared hosting typically doesn't allow running CLI tools or persistent processes, and you need root access to install Node.js and other dependencies.

What about managed services like Railway or Render?

Those are for deploying apps, not for running an interactive CLI. You need a persistent shell, so a VPS is the right choice.

How do I set up Claude Code on a VPS?

SSH into your VPS, install Node.js (v18+), then run npm install -g @anthropic-ai/claude-code. Authenticate with your Anthropic API key, and you're ready.

Should I choose a provider in the same country as Anthropic's API?

Not necessarily, but lower latency helps. Choose a data center in the same region (e.g., US East) to reduce response times.

Bottom Line

For most developers, the Hetzner CX32 is the best VPS for Claude Code due to its unbeatable price-to-performance ratio. If you prefer a more polished provider with better support, go with DigitalOcean's Premium AMD droplets. For the absolute fastest CPU, consider Vultr High Frequency, but be prepared to pay more. Avoid shared hosting and always prioritize NVMe storage and at least 4 GB RAM. Start small, test your workflow, and scale up only if needed.