Best VPS for AI Agents: How to Pick Specs and Cost
The best VPS for AI agents is the one sized for the agent's workload, and RAM is the spec that decides it. A coding agent that calls a hosted model needs at least 4 GB of RAM and 2 vCPUs (Claude Code's documented minimum), an agent that drives a browser needs about 8 GB and 4 vCPUs, and a chat agent fits in 2 GB. You don't need a GPU when the model runs on the provider's side.
Here's the failure we see most: someone starts on a 2 GB box "to try it out," the agent kicks off npm install and a build three minutes in, the kernel kills the process, and the session loses its context. Below: what agent docs actually require, where our estimates start, a workload-to-plan table, and how to measure your own case in one evening.
Short answer for a coding agent: the 0x.cloud s2-4 (2 vCPU, 4 GB RAM, 60 GB NVMe) is $15.99/mo, or about $0.109520 an hour. Testing whether it fits your project for 4 hours costs around $0.44.
Where an AI agent spends server resources
With Claude, GPT or another hosted model, inference happens on the provider's hardware. Your VPS runs the harness:
- The agent runtime. A Node.js or Python process that holds the session, calls the model API and runs tools.
- Tools. Git, package managers, compilers, test runners. They cause the spikes: an install, a frontend build or a test run can briefly need more memory than the agent itself.
- A browser. Agents that browse through Playwright or Chromium usually spend most of their memory on the browser. The Hermes Agent docs say this outright (see below).
- Containers. Docker images, databases and services the agent starts to check its own work.
- Local models. Running a model on the server itself (for example with Ollama) changes the math entirely.
The agent doesn't set your server size. The agent's workload does.
VPS requirements for AI agents, per the official docs
We checked each project's docs on November 20, 2026. Where there's no published RAM figure, we say so and label our own number as an estimate.
| Agent | What the official docs say | Our take |
|---|---|---|
| Claude Code | 4 GB+ RAM, x64 or ARM64, Ubuntu 20.04+ or Debian 10+ (docs) | 4 GB minimum, s2-4 |
| OpenClaw | Node.js 24.16+ or 26.1+, Node 26 recommended; at least 6 GB RAM only for building the Docker image locally, prebuilt images skip that (docs). No runtime RAM minimum | estimate: 4 GB to run, 8 GB with a browser or an on-server image build |
| Hermes Agent | in Docker, 1 GB and 1 core minimum, 2–4 GB and 2 cores recommended; at least 2 GB with browser tools (docs) | 2 GB without a browser, 4 GB with one |
| Codex CLI | the README covers install methods, no RAM requirement | estimate: size for your project's builds and tests, not the CLI |
| Playwright (the agent's browser) | system requirements list Node.js and OS versions (Ubuntu 22.04/24.04, Debian 12/13), no RAM figure | estimate: add 2–4 GB to the agent's base, then measure |
Setup guides for specific agents: Claude Code VPS and OpenClaw VPS hosting.
Sizing table: agent workload to plan
Find your workload and read across. Row 3 rests on Claude Code's documented minimum; the others are our estimates.
| Agent workload | RAM | vCPU | Disk | 0x.cloud plan | Price/mo |
|---|---|---|---|---|---|
| Script or bot that calls a model API, no builds | 1 GB | 1 | 15 GB | s1-1 | $4.49 |
| Chat agent, Telegram bot with an LLM, Hermes without a browser | 2 GB | 1 | 30 GB | s1-2 | $7.99 |
| Coding agent (Claude Code, Codex) on one or two repos | 4 GB | 2 | 60 GB | s2-4 | $15.99 |
| Agent with a browser and tools, OpenClaw on several channels | 8 GB | 4 | 120 GB | s4-8 | $31.99 |
| Several agents in parallel, heavy builds | 12 GB+ | 6+ | as needed | s6-12, s8-16 | on request |
Between two rows? Pick the bigger one. Going from s2-4 to s4-8 adds $16 a month. An out-of-memory kill mid-task costs the agent's context and every token it already spent.
For a general plan cheat sheet beyond agents, see which VPS plan do I need.
What makes a VPS good for AI agents
Specs are only part of it. When you compare providers, check these six things:
- RAM per dollar. Memory is the real limit for agents, so compare price per GB, not per vCPU.
- NVMe storage. Agents churn through thousands of small files (
node_modules, Python venvs, image layers). - Unmetered traffic. Browsing agents and frequent
git cloneadd up. 0x.cloud includes unmetered traffic at up to 1 Gbps on every plan. - Hourly billing. Agents work in bursts. Paying by the hour lets you test a size, scale up or tear a box down without paying for a month.
- An API, ideally MCP. If your agent can create and delete servers itself, it can spin up a clean box per task.
- Guardrails. Scoped API keys and a spending cap, so an agent with provisioning rights can't run up a bill.
RAM: the spec that matters most
Most of the time an agent is waiting on the model over the network. The CPU idles during those seconds, but memory stays allocated: the session, open files, package caches and services running alongside.
To estimate your number (then confirm by measuring):
- Start with a base: 4 GB for a coding agent, 2 GB for a chat agent.
- Add 1–2 GB for each always-on service next to it (a database, n8n, a web app).
- Add 2–4 GB if the agent drives a browser.
- Run your project's heaviest commands by hand and watch memory in a second terminal:
# Server memory: look at "available" in the Mem row
free -h
# Top five processes by memory (RSS in KB)
ps -eo pid,rss,cmd --sort=-rss | head -6
# Total memory of all Chromium processes while the agent has a browser open
ps -eo rss,comm | awk '/chrom/ {s+=$1} END {print s/1024 " MB"}'
A 1–2 GB swap file is a good safety net for rare spikes: the server slows down instead of killing the process. If the agent lives in swap all day, move up a plan.
CPU: how many vCPUs
Two vCPUs cover one coding agent: one for the agent and the system, one for tools. It runs on 1 vCPU, but every build and install takes longer while the agent sits waiting.
Go to 4 vCPUs if the agent runs a browser while executing commands, your project has long builds (large TypeScript monorepos, Rust, big Docker images), you run several agents or sessions at once, or your tests run in parallel.
Disk and network
Rough disk sizes (our estimate): 15–30 GB for a bot or script without Docker, 60 GB for a coding agent with a few projects and Docker, 120 GB for an agent with a browser, images and a database. Agent logs grow fast, so set up log rotation on day one. If you run short, extra NVMe on 0x.cloud is $0.08 per GB.
0x.cloud servers run in Warsaw, Poland. They have no public address: the agent works over outgoing connections, and you follow it in the web console in your dashboard.
Do you need a GPU or local models?
Not if the model runs through an API. That's the most common and cheapest setup: you pay for the server, and separately pay the model provider for tokens.
On a CPU-only server, Ollama keeps the whole model in system RAM, and the project doesn't publish a model-to-RAM table. To see what a loaded model really takes, run ollama ps: check the SIZE column, and PROCESSOR will read 100% CPU. Our estimate: an 8 GB plan (s4-8) runs a small quantized model for classification or rough text cleanup, but it won't replace a hosted model for coding and it answers noticeably slower.
Cheap VPS for AI agents: monthly vs hourly
| Plan | Monthly | Hourly (≈) | 8 h/day, 22 days |
|---|---|---|---|
| s1-2 (2 GB) | $7.99 | $0.054725 | $7.99 (monthly cap) |
| s2-4 (4 GB) | $15.99 | $0.109520 | $15.99 (monthly cap) |
| s4-8 (8 GB) | $31.99 | $0.219105 | $31.99 (monthly cap) |
The hourly rate is the monthly price divided by 730 and multiplied by 5 (decimals beyond the sixth are dropped), and an hourly server never costs more than its monthly price in a calendar month. Your first paid server needs one top-up of at least $5. Delete a server and billing stops right away, with the remainder kept on your balance. For an always-on agent, prepay 3, 6 or 12 months for up to 12% off. Every plan is on the pricing page.
The ready-made setup is on VPS for AI agents: the "For AI agents" image ships with Node, Python, Git, tmux and Docker, and you add your own model keys. Setup is $0.
Let the agent pick and create its own server
On 0x.cloud an agent (Claude Code, Codex, Cursor, ChatGPT) can get a quote and create a server itself through MCP or the REST API, in your account. You stay in control through the API key: scopes (read, create, delete; the default key can do everything including root commands, so give the agent its own key with the minimum) and a monthly spend limit on new purchases (hourly servers the agent already created keep billing and count toward it). Any create request can run with dry_run first, which returns the exact price and creates nothing.
Paste this to your agent:
Pick a 0x.cloud VPS for a coding agent: I want to run Claude Code on one Node.js project with tests. Compare s1-2 and s2-4 against Claude Code's requirements, then use dry_run to show the hourly and monthly price of s2-4 with Ubuntu 24.04. Don't create anything until I confirm.
FAQ about the best VPS for AI agents
How much RAM does an AI agent need on a VPS? A coding agent that calls a hosted model needs at least 4 GB, which is Claude Code's documented requirement. Plan about 8 GB if the agent drives a browser (our estimate; the browser is the hungriest part). A chat agent with no builds or browser fits in 2 GB.
Do I need a GPU to run an AI agent? No, as long as the model runs through an API such as Claude or GPT. The server only runs the agent and its tools, so a regular CPU VPS is enough. You need a GPU only to run large models yourself at a usable speed.
How many vCPUs does an AI agent need? Two vCPUs cover one coding agent. Go to four if the agent runs a browser, long builds, parallel tests or several sessions at the same time.
Is there a free VPS for AI agents? 0x.cloud has no free plan, but hourly billing suits a short check: an s2-4 (2 vCPU, 4 GB) costs $0.109520 an hour, so a 4-hour trial run is around $0.44. Delete the server and billing stops, with the rest kept on your balance.
Can an AI agent run on a 1 GB VPS? Not a coding agent. Claude Code requires 4 GB, and package installs and builds run out of memory fast. A 1 GB server fits a small script or bot that calls a model API.