
You want Claude Code, Codex CLI or OpenClaw on a server that stays on, and the VPS plans you compare list vCores, RAM and NVMe storage but no graphics card. The word AI makes it sound as if you need one. Will an agent on a plain VPS be slow, or not work at all? It comes down to one question: where does the model run? This guide shows how to tell, when a GPU really matters, and what to size instead.
Quick answer: You don't need a GPU when the agent uses a hosted model. Claude Code, Codex CLI and OpenClaw connected to Anthropic or OpenAI send your prompt over the network, and the model answers from the provider's hardware. Your VPS runs the agent, your code and the commands it starts, so size RAM and CPU: Claude Code lists 4 GB of RAM or more, Codex CLI 4 GB minimum and 8 GB recommended, OpenClaw 1 GB minimum and 2 GB or more recommended. A GPU matters once you run the model yourself, for example with codex --oss and Ollama. Ollama asks for a context window of at least 64,000 tokens for agents and coding tools, and for best performance it advises against running the model on the CPU.
Where the Model Runs
Anthropic's data usage page describes the split: "Claude Code runs locally. To interact with the LLM, Claude Code sends data over the network. This data includes all user prompts and model outputs, encrypted in transit via TLS 1.2+." On a VPS, "locally" means the VPS. The answers come from api.anthropic.com, the host the network requirements list for "Claude API requests".
Codex CLI works the same way. Its README calls it "a coding agent from OpenAI that runs locally on your computer", and its model provider defaults to openai, says the configuration reference. OpenClaw's Gateway uses the model provider you set up, for example with an Anthropic or OpenAI API key.
None of the three names a GPU in its requirements (Claude Code setup, Codex install, OpenClaw hosting FAQ):
| Tool | What runs on your VPS | Hardware in its docs |
|---|---|---|
| Claude Code | The claude program, its file edits and the commands it runs | 4 GB+ RAM, x64 or ARM64 processor |
| Codex CLI | The codex program and the commands it runs | 4 GB RAM minimum, 8 GB recommended |
| OpenClaw | The Gateway, its chat channels, logs, media and browser automation | 1 vCPU and 1 GB RAM minimum, 2 GB+ recommended |
A GPU in that server would have nothing to do. How fast the model writes its answer is up to the provider; your hardware decides how fast the agent's own work runs. Our guides to Claude Code and OpenClaw on a VPS cover the setup.
What Uses the RAM and CPU Instead
The minimums cover the tool itself. The real load comes from what the agent starts. Claude Code can run "Any command you could run: build tools, git, package managers, system utilities, scripts", in the words of How Claude Code works. OpenClaw's FAQ adds: "Node tools and browser automation can be resource hungry." Docker containers, a database or a dev server next to the agent all take their own share.
Sessions add up too. Claude Code's supervisor "runs each background session's terminal in its own host process", and when memory stays low it stops idle sessions to free resources, according to the agent view docs. The same page warns that "running ten agents in parallel uses quota roughly ten times as fast as running one", so extra sessions cost plan usage as well as RAM.
The CPU works when the agent does, not while the model thinks. While the provider works on an answer, the agent waits for the reply. Your vCores get busy when the agent compiles code, installs packages or runs a test suite.
To see what your agent really uses, run these while it is busy with a build or a test run:
free -h
ps -eo pid,rss,comm --sort=-rss | head -n 10
nproc
uptime
availableinfree -his an "Estimation of how much memory is available for starting new applications, without swapping" (free(1)).- The
psline lists the processes holding the most memory, with RSS in kilobytes (ps(1)). Expect the agent near the top, along with whatever it started. nprocprints the number of processing units you have.uptimeprints the load averages of the past 1, 5 and 15 minutes, which are "not normalized for the number of CPUs in a system": a load of 1 keeps a single CPU busy all the time, but leaves a 4 CPU system idle 75% of the time (uptime(1)). A load that stays above yournprocnumber during builds means processes are queuing for the CPU or waiting on the disk.
Our guides to VPS RAM and when to upgrade turn these numbers into a plan size, and the shared vCPU guide explains steal time on shared cores.
When a GPU Matters: You Run the Model Yourself
All three agents can also talk to a model on your own hardware:
- Codex CLI "can run against a local 'open source' provider such as Ollama or LM Studio when you pass
--oss" (advanced configuration). With Ollama and no model set, Codex usesgpt-oss:20band pulls it if it is missing, as its source code shows. - Claude Code can go through Ollama, which "connects Claude Code to local and cloud models through its Anthropic-compatible API" (Ollama's Claude Code guide).
- OpenClaw works with local backends such as Ollama, LM Studio, llama.cpp and vLLM (local models).
Then the model has to fit in your own machine's memory, and three things decide whether that works.
The weights. Ollama's library lists gpt-oss:20b, the Codex default, as a 14GB download. Its model card says it runs "within 16GB of memory", while the bigger gpt-oss-120b is sized for "a single 80GB GPU (like NVIDIA H100 or AMD MI300X)". Without a GPU, every byte of the model sits in RAM next to the agent.
The context. An agent sends far more than your question. Claude Code's context window "holds your conversation history, file contents, command outputs, CLAUDE.md, auto memory, loaded skills, and system instructions." Ollama's context length page says "Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens", and its guides for Codex and OpenClaw repeat the 64k minimum. Yet Ollama only defaults to 32k context from 24 GiB of VRAM and 256k from 48 GiB. Below 24 GiB, and on a server without a GPU, you get 4k (4096 tokens, per the FAQ). Raising it costs memory: "Setting a larger context length will increase the amount of memory required to run a model." Parallel requests multiply it: Ollama's FAQ says the RAM needed scales with OLLAMA_NUM_PARALLEL times OLLAMA_CONTEXT_LENGTH.
The speed. For best performance, Ollama's advice is to "avoid offloading the model to CPU". On a VPS without a GPU there is nowhere else to put it. Our Ollama guide covers what CPU-only models are good for, and which jobs, such as image generation and training, not to attempt without a GPU.
One more limit has nothing to do with hardware. OpenClaw's docs warn that "A model that loads or answers a short prompt may still fail an agent turn" and that local models "do not provide hosted providers' safety filters". Its FAQ adds that "Smaller/quantized models raise prompt-injection risk". Its managed llama.cpp recipes use a 64K context, the smallest with an 8 GiB host-memory floor, and "These floors do not guarantee fit or speed."
Check It on Your Own VPS
To try a local model on a server without a GPU, install Ollama with the command from its Linux docs:
curl -fsSL https://ollama.com/install.sh | sh
The install script prints The Ollama API is now available at 127.0.0.1:11434. and then WARNING: No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode. That warning is expected on a VPS. If neither lspci nor lshw is installed, it prints a warning that it is unable to detect an NVIDIA/AMD GPU instead.
Load a small model, llama3.2 (a 2.0GB download in the library), and check where it landed:
ollama run llama3.2 "Reply with one word"
ollama ps
Under PROCESSOR, 100% CPU means "the model was loaded entirely in system memory", and CONTEXT shows the context it got. To give it the 64000 tokens Ollama recommends for agents, set the variable for the service, as the Linux docs and FAQ show:
sudo systemctl edit ollama
[Service]
Environment="OLLAMA_CONTEXT_LENGTH=64000"
sudo systemctl daemon-reload
sudo systemctl restart ollama
Run the model again and compare free -h. If the kernel log shows an out-of-memory kill (our RAM guide shows how to check), the model and that context don't fit your plan. Ollama binds 127.0.0.1 port 11434 by default; leave it there so only programs on the server can reach it, and see our guide to securing an AI agent on a VPS for the rest.
Which One Fits
- Agent on a hosted model (Claude, GPT, or Ollama's cloud models such as
gpt-oss:120b-cloud, which Ollama runs on its own servers): a VPS without a GPU, sized with the table above. Space-Node's VPS plans are made for this: KVM servers in an EU data center with dedicated RAM, shared vCores and no GPU. The AI agent VPS page matches plans to agents. - Hosted model for the agent, small local model for side jobs such as summaries inside a script: a CPU-only VPS with room for the model and its context on top of the agent. The Ollama guide has realistic sizes.
- Agent fully on a local model (
codex --oss, Claude Code through Ollama, OpenClaw local-first): a machine with a GPU whose memory holds the model plus a 64k context. Ollama's hardware page lists the NVIDIA, AMD and Apple GPUs it supports. - Agent on the VPS, model on a GPU machine you run elsewhere: Codex accepts a custom model provider with a
base_url, Ollama's guide points Claude Code at a server withANTHROPIC_BASE_URL, and OpenClaw's custom providers take a base URL. Connect them over a private network, not an open port. - Image generation, fine-tuning or serving many users: a server with a GPU.
FAQ
Will a GPU make Claude Code or Codex CLI faster? Not with a hosted model. The model runs at Anthropic or OpenAI, so a GPU in your server would sit idle. Your hardware sets the pace of the agent's own work: builds, installs and test runs use your vCores and RAM.
Can Codex CLI use a local model on a VPS without a GPU?
Yes, with codex --oss and Ollama or LM Studio. Its default Ollama model, gpt-oss:20b, is a 14GB download that runs "within 16GB of memory", and Ollama asks for at least 64k tokens of context for Codex. Without a GPU, all of that comes out of RAM, on top of the 4 GB minimum (8 GB recommended) that Codex lists.
Is Claude Code with Ollama fully local?
Only with local models. Ollama's FAQ says "We don't see your prompts or data when you run locally", but for cloud-hosted models "we process your prompts and responses to provide the service". To turn the cloud features off on a server, add Environment="OLLAMA_NO_CLOUD=1" to the service the same way as the context length above, then restart Ollama.
Does n8n's self-hosted AI starter kit need a GPU?
No. The starter kit bundles n8n, Ollama, Qdrant and PostgreSQL, and besides its gpu-nvidia and gpu-amd profiles it starts on the CPU with docker compose --profile cpu up. The first run downloads Llama 3.2. To keep everything local, its README says to use the Ollama node as your language model and Qdrant as your vector store. For n8n's own needs, see our n8n VPS requirements.
Do Space-Node VPS plans have a GPU? No. Standard plans run on the AMD EPYC 7452 and Premium plans on the AMD Ryzen 9 9950X, with no GPU. They fit agents on hosted models; compare sizes on the VPS plans.
Sources
All opened on 31 October 2026:
- Anthropic, Claude Code docs: Advanced setup, How Claude Code works, Data usage, Enterprise network configuration and Agent view
- OpenAI Codex: README, Installing and building, codex-rs/ollama/src/lib.rs, Advanced configuration and Configuration reference
- OpenAI: gpt-oss-20b model card
- OpenClaw docs: FAQ: providers, hardware, and hosting and Local models
- Ollama docs: Context length, FAQ, Hardware support, Linux, CLI reference, Claude Code, Codex CLI and OpenClaw
- Ollama: install.sh, library pages for gpt-oss and llama3.2
- n8n: Self-hosted AI starter kit
- Space-Node: VPS hardware and plan features as checked on 29 and 30 October 2026
- Ubuntu 24.04 manual pages: free(1), ps(1), nproc(1) and uptime(1)
Claude Code is made by Anthropic, Codex CLI by OpenAI, OpenClaw by the OpenClaw Foundation and Ollama by Ollama. Space-Node is not affiliated with or endorsed by them.