Code Tycoon Get Code Tycoon

Blog / Remote

The Cost of Running Claude Code on a VPS 24/7

What a Claude Code VPS really costs per month: server price on Hetzner, DigitalOcean and Linode, plus the Claude plan that is the bigger bill. Dated numbers.

The Cost of Running Claude Code on a VPS 24/7

The server is the small part: a box that runs Claude Code costs about as much as a lunch, and your Claude plan or API usage costs several times that.

If you want Claude Code to keep working while your laptop is closed, you need a machine that stays on. A VPS is the usual answer. The question people type is "how much will that cost me a month?" The honest answer has two parts, and most posts only count one.

The first part is the server rental. The second is whatever pays for Claude: a subscription, or API usage billed per token. Add a few small extras (backups, a domain, a private network) and you have the number.

The verdict up front: for one person running a few sessions, the server lands at roughly 5 to 25 dollars or euros a month, depending on the host and the size. The Claude side lands anywhere from a $20 Pro plan to $200 for the top Max plan, or more on the API. So the VPS is not where the money goes. Pick the server for reliability and RAM, and spend your attention on the Claude bill.

The cost table also includes Code Tycoon's hosted plans, which run your Claude Code setup on a dedicated server, and it shows where self-managing a VPS is cheaper, because it often is. Every price below was read from the vendor's page on 2026-11-23. Prices change often; check the linked pages.

Table of contents

The two bills

Think of the monthly cost as a sum:

total = server + Claude (subscription or API) + extras

Server and extras are fixed and predictable. The Claude part is the variable. On a subscription it is fixed too, but you hit usage limits; on the API it has no limit and no ceiling. That difference is the main reason the Claude side dominates the total. We go deeper on it in What Claude Code really costs per month and Claude Code usage limits explained.

Server cost: what the three big hosts charge

These are the entry and mid sizes that make sense for a Claude Code box. Specs and prices are quoted from each host's pricing page on 2026-11-23. Our next post compares the three hosts in more depth.

Host Plan Specs Monthly price Source
Hetzner CPX12 (EU) 1 vCPU, 2 GB, 40 GB NVMe, 20 TB traffic EUR 11.99 (EUR 9.99 at HEL1), excl. VAT Hetzner
Hetzner CPX22 (EU) 2 vCPU, 4 GB, 80 GB NVMe, 20 TB traffic EUR 19.99 at NBG1 (EUR 16.99 at HEL1), excl. VAT Hetzner
DigitalOcean Basic Droplet 2 GiB, 1 vCPU, 50 GiB, 2,000 GiB transfer $12 DigitalOcean
DigitalOcean Basic Droplet 4 GiB, 2 vCPU, 80 GiB, 4,000 GiB transfer $24 DigitalOcean
Linode (Akamai) Linode 2 GB 1 CPU, 50 GB, 2 TB transfer $12 Akamai
Linode (Akamai) Linode 4 GB 2 CPU, 80 GB, 4 TB transfer $24 Akamai

Two notes on reading it. Hetzner quotes euros without VAT, so your price depends on your country. DigitalOcean and Linode quote dollars. Hetzner also says "Your server's bill will never exceed its monthly price cap" for a month, and a server deleted before the end of the billing month is billed only at the hourly rate, and one that exists is billed even when powered off.

The cheaper plans exist too: a $4 Droplet with 512 MiB, a $5 Nanode with 1 GB, and Hetzner's listings from EUR 5.49. We list them for completeness and don't recommend them for this job, for the reason in the next section.

How much server Claude Code needs

Claude Code does the thinking on Anthropic's side. Your server runs the CLI, your repository, your build and your test commands. So size the box for your project's own tooling, then add headroom for several sessions.

We measured nine live Claude Code sessions on 2026-11-26: each held 503 to 846 MB of memory, 549 MB at the median, and used about 1% of one CPU core on average (full numbers). Budget about 0.85 GB per session plus 1 GB for the system: 4 GB fits one or two sessions, 8 GB three to five, 16 GB six to ten. Builds, tests and language servers come on top of that. A swap file is a cheap way to avoid the process being killed when memory runs out.

CPU matters when you run builds and tests in parallel. Disk matters more than people expect: node_modules, Docker images and git history add up, so 40 GB is a floor and 80 GB is comfortable. Bandwidth is almost never the limit. The included transfer on all three hosts (from 2 TB up on the mid sizes) is far more than a coding box uses.

The practical pick for one person running one or two sessions: 4 GB, 2 vCPU; for three to five, 8 GB. On the tables above that is EUR 16.99 to 19.99 at Hetzner, or $24 at DigitalOcean or Linode.

Claude cost: subscription or API

Claude Code needs either a Claude plan that includes it or API credit. From the Claude pricing page on 2026-11-23:

Plan Price Claude Code
Pro $17 per month with annual subscription ($200 billed up front), $20 if billed monthly Included
Max $100 per month, "5x Pro usage" Included
Ultra (top Max tier) $200 per month Included

The page also lists a free tier with Claude Code marked "No." The sign-up link for the $200 tier is labeled max_20x, and the page text calls it a higher usage tier; we explain the tiers in Claude Pro vs Max 5x vs Max 20x. Anthropic changes plan names, prices and limits often, so check the page and the help center before you buy.

The API is billed per token with no monthly cap. We deliberately don't print token prices here, because they change and because the cost per task depends on context size and caching. Run /cost in a session, or use the tracking approach in our cost-per-month post, to see your own numbers.

The subscription side matters for a 24/7 box. A server that runs sessions while you sleep uses your plan's limits just as you do. Running more agents does not cost more server money; it burns the same limit faster. If you are heading to the cap, see habits that burn usage limits.

A word on what 24/7 means. A server that is on all day is not a server that is working all day. Most of the hours it sits idle, waiting for you to hand it a task or answer a question, and idle hours cost rent but no Claude usage. The cost only climbs when sessions run, so the habit that matters is what you ask the box to do overnight. Long unattended runs are where a subscription limit gets used up quickly, or where an API bill grows without a ceiling, so decide up front how much unattended work you are willing to pay for.

Small extras

  • Backups. Check what your host charges. DigitalOcean lists snapshots at $0.06 per GB per month, which is a few cents for a small disk. Git already backs up your code, so the real thing to protect is the setup: CLAUDE.md files, skills, hooks and settings. A dotfiles repo is one way to keep that copy; this comparison of ways to sync Claude Code skills between machines covers others.
  • A domain, if you want a stable name for web previews. Priced separately by your registrar.
  • A private network path so you don't expose SSH. Tailscale's Personal plan is $0 for up to 6 users on its pricing page; see Tailscale vs Cloudflare Tunnel vs WireGuard.
  • A phone terminal. Blink is $19.99 per year, Termius Starter and Termux are free; see Termius vs Blink Shell vs Termux.

None of these is a large number. Added together they come to a few dollars a month at most, mostly the terminal app.

Worked examples

The examples use the prices above and show the pieces, not a guarantee. They mix euros and dollars where the host does, so we don't convert.

Setup Server Claude Extras Total (approx)
Light: one session, Pro plan Droplet or Linode 2 GB at $12 Pro $20 monthly $0 $32
Daily driver: a few sessions, Pro plan, Hetzner CPX22 EUR 16.99 to 19.99 Pro $20 monthly $0 EUR 17 to 20 plus $20
Heavy: several sessions, Max 4 GB at $24 Max $100 $0 to $2 $124 to $126
Heaviest: top plan 4 GB at $24 $200 $0 to $2 $224 to $226

The pattern is clear. Moving from the smallest to the largest server in this table changes the monthly total by about $12. Moving from Pro to the $200 plan changes it by $180. Choose the server by reliability and RAM. Choose the Claude plan by your limits.

Hosted instead of a VPS

Renting a VPS means you set it up and maintain it: users, SSH, updates, tmux, your Claude Code config, and a way to reach it from your phone. The setup is covered in How to run Claude Code on a dedicated server. It is a few hours the first time, and an hour here and there afterward.

Code Tycoon's hosted plans put your Claude Code setup on a server we run. From the live page on 2026-11-23: Solo is $39 per month, Team $69 and Max $129. We don't list what each plan includes beyond the price on this page, so read the pricing section before comparing. The Claude plan is separate: your Claude Code runs on your own Claude plan or API usage, so these prices don't replace the Claude column above.

When a VPS is cheaper: if you are comfortable with Linux and one session at a time is enough, a $12 to $24 server beats a $39 plan on price alone. When hosted makes sense: you run several sessions across projects, you want the task list, alerts and cost views in a browser, and you'd rather not maintain the box. The free self-hosted version is open source under AGPL-3.0 and installs with npx code-tycoon; see self-hosting. It runs on whatever server you rent from the table above.

Ways to spend less

  • Right-size the server. Start at 4 GB and look at actual memory use before you upgrade. Going down is a rebuild; going up is usually a resize.
  • Shut the box when you don't need it, if your host bills hourly and you don't need sessions running overnight. Check how your host bills a powered-off server first; some still charge for the reserved resources.
  • Spend your effort on the Claude side. Context size and cold resumes cost more than server hours. See Claude Code usage limits explained for the limits side and the cost-per-month post for the money side.
  • Use an annual plan if you are sure. The Pro plan is $17 per month on annual billing against $20 monthly.
  • Keep one box, not three. A single 4 GB server running several sessions is cheaper than three small ones, as long as the memory holds.

The bottom line

Budget for the Claude plan first and the server second. A 4 GB server costs somewhere between EUR 17 and $24 a month on the providers' pricing pages (2026-11-23), while the Claude plan runs from $17 or $20 up to $200. A 24/7 box does not change what Claude costs you per task; it only lets sessions run while you are away, which uses your limits sooner.

If you can manage a Linux box, rent a 4 GB server, use a private network path, keep one box rather than three, and watch your usage. If you would rather not maintain it, compare the hosted plan prices against the hours you would spend. Either way, record your own numbers for a month before you change plans. Our estimates are only as good as the prices on the day we read them, 2026-11-23, and every one of them will move.

FAQ

What is the cheapest VPS for Claude Code?

The cheapest listings are a $4 Droplet with 512 MiB and a $5 Nanode with 1 GB, with Hetzner shared plans from EUR 5.49. They are tight for real work. A 2 GB plan at $12 (DigitalOcean, Linode) or EUR 9.99 to 11.99 (Hetzner CPX12) is a more realistic floor.

How much RAM does Claude Code need on a server?

About 0.55 GB per session at the median in our measurement of nine live sessions (503 to 846 MB each), so budget 0.85 GB per session plus 1 GB for the system: 4 GB for one or two sessions, 8 GB for three to five. Builds, tests and language servers use memory on top of that.

Do I pay for Claude Code separately from the server?

Yes. The server rents compute. Claude Code needs a Claude plan that includes it (Pro and above on Anthropic's pricing page, 2026-11-23) or API credit. They are two separate bills.

Does running Claude Code 24/7 cost more in Claude usage?

Only if sessions are actually working. An idle server costs rent but no tokens. Sessions that run overnight use your plan's limits or API credit, exactly as they would at your desk.

Is Hetzner cheaper than DigitalOcean?

On the 4 GB tier we read, Hetzner's CPX22 is EUR 16.99 to 19.99 excluding VAT against $24 at DigitalOcean, but the currencies and VAT differ, so convert with your own rate. Hetzner's US locations are priced much higher than its EU ones.

Should I pay for hosted instead of a VPS?

If you are comfortable maintaining a Linux box, a VPS is cheaper. Hosted plans, such as Code Tycoon's at $39, $69 and $129 per month, trade money for not maintaining the server. Hosted does not replace your Claude plan.

Can I stop paying for the server on weekends?

Depends on the host. Hetzner says a server deleted before the end of the billing month is billed only at the hourly rate, a server that exists is billed even when powered off, and it caps a month's bill at the monthly price. Check how your host bills powered-off servers before you rely on it.

Related articles

About this research

Anton Goldshtein is a two-time founder who previously bootstrapped a company to $100M in revenue. His team runs its own products on Code Tycoon every day.

This article is based on the pricing pages of Hetzner, DigitalOcean, Akamai (Linode) and Claude, and on Code Tycoon's own pricing, all read on 2026-11-23. We ran no cost test of our own for this post. Prices change often; confirm them on the linked pages.

Content reviewed and updated: 2026-11-26

Keep reading