Skip to main content

Sizing a VPS for Claude Code and VS Code Remote SSH

Updated 4 min readMarkdown

A remote development server is often cheaper to size correctly than to upgrade blindly. The editor, command-line AI client, test runner and build process can all be active at the same time. RAM for the AI client alone is a poor estimate of the whole workspace.

This is a sizing procedure for a Linux VPS you control. It does not require a model subscription or an API call to measure the project.

Start with the actual requirements

Anthropic's Claude Code setup documentation specifies 4 GB or more RAM, a supported processor and operating system, and an internet connection. The VS Code Remote SSH documentation recommends at least two CPU cores and 2 GB RAM for the remote host. These figures describe different tools. They do not say that a large project, editor, container stack and concurrent build will comfortably fit in 4 GB.

For a small terminal-only project, 2 vCPU / 4 GB is a useful starting point to evaluate. For an editor, CLI tools, application and occasional builds together, compare 4 vCPU / 8 GB. If several repositories or containers run concurrently, measure whether 16 GB is justified. These are initial sizing choices, not benchmark guarantees.

Measure the workspace before changing the plan

On a GNU/Linux host, connect as your normal development user and run the following from your project directory:

nproc
free -h
df -h .
du -sh .

These commands answer four different questions: CPU count, available memory, free filesystem space and the current directory footprint. Free disk is especially easy to overlook when dependency caches and container images accumulate.

Next, measure the normal build for your own project. For a Node.js repository with a configured build script, GNU time can report process memory usage:

/usr/bin/time -v npm run build

The build must be one you already understand and trust. If your distribution has not installed GNU time, use its package manager or your existing profiling tool.

Compare the reported maximum resident set size with memory available before the build. It is a process-level measurement, rather than the sum of every simultaneously running process. Observe system-wide available memory from a second SSH terminal while the build is running, especially when the editor, tests or databases are also active. Repeat the real workflow after warm caches and after a clean dependency install. Leave room for the OS, background processes and future changes.

Keep the remote workspace separate from credentials

Use a dedicated non-root Linux user with an SSH key you control. Verify the server host key, limit access to the services you actually need, and do not put provider tokens or private keys into a Git repository. A terminal multiplexer such as tmux is useful for long local-running jobs when your laptop disconnects.

Tested on 20 November: On an isolated Ubuntu ARM64 VM (2 vCPU / 4 GiB) we terminated the actual SSH client during a small Next.js build running in tmux. The same build completed with no attached client. After two reconnects, the same tmux session, app process and source tree were still available. See the test and its limits. This was a synthetic local test, not a Claude Code, VS Code, commercial VPS or server reboot test.

VS Code Remote SSH connects to the project on the remote host instead of copying an entire development environment to the laptop. Check extension support if using ARM64 and keep the project runtime versions pinned. For larger Docker-based projects, remember that image storage and build artifacts consume SSD space too.

What a CPU VPS does and does not provide

A CPU VPS provides an environment for code, builds and clients. Models accessed through an external AI service require your own authorized account and follow that service's availability, usage and pricing rules. The VPS itself does not include model credits or a GPU. Local model inference is a separate resource planning problem.

MOTSELL offers self-managed European Linux VPS plans in 4, 8 and 16 GB RAM configurations. You can compare the current plans and directly select a VPS for this workflow on our remote development VPS page. Use your own build measurements to choose the plan.

About the author

  • MOTSELL: self-managed Linux VPS in Germany and Finland for web apps, APIs and bots. We share reproducible deployment notes and state what was tested. Apps and backups remain the customer’s responsibility. Posts may use AI assistance. https://motsell.com/en/vps-vds?utm_source=hashnode&utm_medium=community&utm_campaign=profile_202611

The step I'd add after the GNU time run: when a build dies on a small box, dmesg | grep -i oom tells you which process the OOM killer actually picked, and it is not always the build. A modest swap file also turns a killed session into a slow one, which is easier to measure. Did you see the VS Code server itself grow much with extensions installed?

MMOTSELL15d ago

Good addition, thanks. We have not isolated an A/B run with an extension-heavy VS Code server, so I would avoid giving a memory number here. I would measure the Remote SSH baseline first, then enable the project’s language servers and extensions and repeat the same workload. The kernel OOM log (where permissions allow) and swap activity help distinguish a killed process from sustained memory pressure.

More from this blog