BlogHudson Griffith
The best VPS for Claude Code, and when a Prized box beats one
If Claude Code works while you do, the best server for it is a Prized box: $12.23 a month at 8 hours a day, less than any hourly VPS here, with Claude Code installed, your folder synced and its memory kept while it sleeps. For a VPS you run yourself, take 2 vCPUs and 4 GB: OVHcloud’s VPS-1 is $5.35 a month, and billed hourly, Hetzner’s CPX22 (€16.99 in Helsinki) and Vultr ($20) cost least.
A VPS bills around the clock and leaves its setup and security to you; a box sleeps when idle and opens no public SSH port. New accounts get $30 of credit with no card (sign up). Prices are pre-tax list prices read on November 30, 2026; sources are at the end.
What Claude Code needs from a server
Anthropic asks for at least 4 GB of memory, an x64 or ARM64 processor and Ubuntu 20.04 or Debian 10 or later, with no GPU. Two vCPUs fit one session; use 8 GB for several sessions, builds, heavy test suites, Docker or headless browsers.
A Prized box against a VPS
Auto-pause sleeps a Micro after your idle window: $0.008 an hour asleep (disk only), $0.034 awake. A working agent keeps it awake. A Micro keeps its memory while it sleeps, so reconnecting resumes tmux, Claude Code and half-finished builds where they were.
| Prized, 4 hours a day, Micro, asleep the rest of the day | $9.03 |
|---|---|
| Prized, 8 hours a day, Micro, asleep the rest of the day | $12.23 |
| Prized, 12 hours a day, Micro, asleep the rest of the day | $15.42 |
| Hetzner, CPX22, billed every hour | $18.51 |
| Vultr, Billed every hour | $20.00 |
| DigitalOcean, Billed every hour | $24.00 |
A Prized Micro box, 2 vCPUs and 4 GB, awake for 4, 8 or 12 hours a day and asleep the rest of a 730-hour month, at its awake and asleep hourly rates. Against it, a Hetzner CPX22 (2 vCPU, 4 GB, €16.99 in Helsinki), a Vultr 2 vCPU, 4 GB server at $20 a month and a DigitalOcean 2 vCPU, 4 GB Droplet at $24 a month, all of which bill while stopped.
A Micro is $9.03 a month at 4 hours a day, $12.23 at 8, $15.42 at 12 (under Hetzner, Vultr and DigitalOcean) or $25 around the clock.
One command in your project folder sets up a box, copies your Claude Code sign-in and settings, and starts Claude Code in tmux:
cd ~/code/myproject
prized setup --sync --agent claude --attachIt runs with your lid closed; reconnect via prized ssh -s claude, the dashboard’s browser terminal or /remote-control in the Claude app. $30 of credit covers about five weeks around the clock on a Micro (Quickstart).
VPS prices at 4 GB and 8 GB
| OVHcloud, VPS-1; $4.54 paid a year ahead | $5.35 |
|---|---|
| Hetzner, CPX22; €16.99 in Helsinki | $18.51 |
| Vultr | $20.00 |
| AWS Lightsail | $24.00 |
| DigitalOcean | $24.00 |
| Akamai (Linode) | $24.00 |
The list price of one month of the cheapest plan with at least 4 GB of memory at each vendor, before tax, read from each vendor on November 30, 2026. OVHcloud also prints a rate for a 12-month term; the detail line says so. Hetzner prices in euros, converted at the ECB reference rate of November 30, 2026.
Hetzner uses the European Central Bank’s November 30, 2026 rate ($1.0894). Hostinger and Contabo are excluded: headline prices require 24 months paid or committed up front.
What each price is for
- Prized: a Micro has 2 burstable vCPUs, 4 GB and a 80 GB disk; an Extra Small has 2 vCPUs, 8 GB and 150 GB (Pricing, Machines).
- OVHcloud: $5.35 month to month, or $5.08 a month for 6 months and $4.54 for 12 paid up front, in US, Canadian, European and Asia-Pacific data centers; Local Zones are $6.54. The VPS-2 is $10, or $8.50 on 12 months (order catalog).
- Hetzner: prices exclude VAT. The CPX22 is €16.99 in Helsinki, €19.99 in Nuremberg and €26.99 in Singapore; the CPX32 is €30.49, €35.99 and €49.49. US locations lack a 2 vCPU, 4 GB plan: the CPX21 (3 vCPU, 4 GB) is €32.49 (Hetzner).
- Vultr, DigitalOcean, Akamai: regular shared-CPU plans with 80 GB of disk at 4 GB and 160 GB at 8 GB (Vultr, DigitalOcean, Akamai). Akamai charges more in Jakarta ($28.80) and São Paulo ($33.60).
- AWS Lightsail: Linux bundles with a public IPv4 address; the 8 GB bundle has 2 vCPUs (Lightsail).
Billing, disk and regions
Stopping a VPS kills every process; DigitalOcean, Vultr, Akamai, Lightsail and Hetzner bill until you delete it.
Which one to pick
Best for most people: a Prized box. A full VM with Claude Code, Codex, sudo and Docker preinstalled, your folder synced, ports on your localhost and no firewall or SSH keys to manage (above).
The cheapest server to run yourself: OVHcloud. VPS-1 has 2 vCores, 40 GB NVMe, daily backup and unlimited traffic (1 TB a month in Mumbai, Singapore and Sydney). It bills monthly only; non-US servers can’t upgrade after delivery.
Hourly in Europe: Hetzner. The CPX22 has 2 AMD vCPUs, 80 GB and 20 TB of EU traffic, billed hourly up to €16.99 a month in Helsinki. Ashburn and Hillsboro start at CPX21; cheaper Cost-Optimized plans were unavailable on November 30, 2026.
Hourly, in many regions: Vultr, DigitalOcean, Akamai or Lightsail. All four include 80 GB and an API: Vultr is $20 in 31 regions and the others are $24. Pick Lightsail for AWS teams.
What running Claude Code on a VPS takes
On Ubuntu 24.04 as root, add an agent user with your SSH key and limit the firewall to SSH only:
adduser dev
usermod -aG sudo dev
rsync --archive --chown=dev:dev ~/.ssh /home/dev
ufw allow OpenSSH
ufw enableAs that user, run Anthropic’s installer and start Claude Code in tmux so disconnects don’t stop it:
curl -fsSL https://claude.ai/install.sh | bash
tmux new -s claude
claudeSign in with /login (open the printed link locally and paste the code), an API key or claude setup-token for unattended runs. Clone with git, patch the server and reconnect via ssh and tmux attach -t claude. On a Prized box, prized setup does all of this.
Common questions
What is the best VPS for Claude Code?
A Prized Micro for workdays ($12.23 a month at 8 hours a day). For a self-managed 2 vCPU, 4 GB VPS, pick OVHcloud’s VPS-1 ($5.35 a month), or Hetzner’s CPX22 (€16.99 in Helsinki) and Vultr ($20) hourly.
How much RAM does Claude Code need?
At least 4 GB (Anthropic), or 8 GB for several sessions, builds, Docker or headless browsers.
Does Claude Code need a GPU?
No. The model runs at Anthropic, so you only need RAM and an x64 or ARM64 CPU.
Can I use my Claude Pro or Max plan on a server?
Yes. Use /login or a long-lived claude setup-token on a VPS (Anthropic); prized setup copies your login. Token-billed API keys work too.
Can Claude Code keep its session while the server sleeps?
Not on a VPS, where stopping kills processes. A Prized Micro resumes memory, tmux and Claude Code; after 3 days asleep, claude --continue resumes on a fresh boot.
Does a stopped VPS still cost money?
Yes. DigitalOcean, Vultr, Akamai, Lightsail and Hetzner bill until you delete them. Sleeping Prized Micros bill disk only at $0.008 an hour.
When is a VPS the better choice?
When you need around-the-clock runs, regions outside the US and Frankfurt, an OS besides Ubuntu 24.04 or a fixed IP (a box’s IP changes on pause; Machines).
Sources
We read every page on November 30, 2026.
- OVHcloud: VPS, order catalog.
- Hetzner: Regular Performance, Cost-Optimized, locations.
- Vultr: plans API, regions API, how servers are billed.
- AWS: Lightsail pricing, Lightsail billing, Lightsail regions.
- DigitalOcean: Droplet pricing, how Droplets are billed, regional availability.
- Akamai: shared CPU plans, how billing works, regions API.
- Anthropic: Claude Code setup, authentication.
- European Central Bank: euro reference rates.
- Prized: Pricing, Billing, Pause and resume, Security, Machines. More costs, VPS and cloud, are in What it costs to run a coding agent 24/7.