Self-Hosted AI Agent
The back of a Mac mini: power, Ethernet, HDMI and three Thunderbolt ports

Can Claude Code run on a VPS?

Yes, on a plan with 4 GB of memory or more running Ubuntu 20.04+ or Debian 10+. A 1 GB plan is below the minimum.

What Claude Code needs

From Claude Code’s own documentation, checked 28 October 2026.

Operating systemmacOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+ or Alpine Linux 3.19+
Hardware4 GB+ RAM and an x64 or ARM64 processor
AccountA Pro, Max, Team, Enterprise or Console account; the free Claude plan does not include Claude Code
NetworkAn internet connection; the model runs in Anthropic’s cloud

What a VPS brings

Good to knowA 2 vCPU plan with 4–8 GB of RAM cost $15–24 a month in September 2026 (Hostinger KVM 2 renewal price, Vultr, DigitalOcean); OpenClaw's docs also show it running on a 1 GB, $6-a-month Droplet with swap.
Left on all dayAlways on and reachable without touching your home network, but you pay every month and your agent and its files live on someone else's computer.

Local models on a VPS

Typical 4–8 GB plans have no graphics card, so a local model would run slowly on shared processors. A cloud model is the usual choice on a VPS. The memory table shows what each model size needs.

Questions

Is a VPS enough for Claude Code?

Yes, on a plan with 4 GB of memory or more running Ubuntu 20.04+ or Debian 10+. A 1 GB plan is below the minimum.

What does it cost to keep a VPS running for Claude Code?

A 2 vCPU plan with 4–8 GB of RAM cost $15–24 a month in September 2026 (Hostinger KVM 2 renewal price, Vultr, DigitalOcean); OpenClaw's docs also show it running on a 1 GB, $6-a-month Droplet with swap.

Can Claude Code use a local model on a VPS?

Typical 4–8 GB plans have no graphics card, so a local model would run slowly on shared processors. A cloud model is the usual choice on a VPS.

Other combinations

Claude Code on An old laptop · An old office PC · An N100 mini PC · A Mac mini · A Raspberry Pi 5.

On a VPS: OpenClaw · Hermes Agent · Codex. See every agent and computer.

Sources