EQVPS

Run a coding agent on a VPS for background development

Jun 15, 2026 · 3 min read · EQVPS Team

A coding agent on your laptop stops the moment you close the lid. Which is fine for a quick edit — and quietly frustrating the moment you want it to grind through a long refactor, churn a test suite, or keep going while you go do something else. Move it to a server and that limitation just disappears: it works while you sleep, survives your wifi dropping, and hands you the result when you're back.

What "on a server" actually buys you

That last point is underrated: a VPS is the safer home for an autonomous agent, precisely because it's separate.

Sizing it right

The agent itself is light — it calls a model over an API, so the thinking happens elsewhere (the same reason most AI agents need little RAM). What actually consumes resources is your project's toolchain: a big build, a heavy test run, a local database. So size for the project, not the agent:

Getting it running

SSH in, set up your toolchain and the agent (Claude Code, Cline's CLI, aider — whichever you use), clone your repo, and export your API key:

export ANTHROPIC_API_KEY=...    # or your provider's key
cd ~/myproject

Now the key trick — don't run it in a bare SSH session, or it dies when you disconnect. Run it inside tmux:

sudo apt install -y tmux
tmux new -s agent
# inside tmux: start your coding agent, point it at the task
# then detach with: Ctrl-b, then d

Detach, close your laptop, go to lunch. The agent keeps working on the server. Come back and tmux attach -t agent to see what it did. For scheduled, unattended runs (e.g. a nightly maintenance pass), wrap it in a systemd service instead — same pattern as keeping any process alive.

The honest caveats

Within those rails, a coding agent on its own server is a genuinely useful pattern — your work continues whether or not you do. Spin up a 4 GB box, drop in tmux and your agent, and let it cook. The agent can even rent the server itself over MCP if you want the whole loop autonomous.

FAQ

Why run a coding agent on a VPS instead of my laptop?

Persistence. On a server the agent keeps working when your laptop sleeps, closes or loses wifi — a long refactor or test run survives your day. It also keeps heavy installs and build clutter off your machine, and gives the agent a clean, reproducible environment to work in.

How much RAM does a coding agent need on a server?

The agent process itself is light — it calls a model over an API, so 2 GB handles the agent plus a git checkout and editors comfortably. What eats RAM is your project's own build/test toolchain (a big Node or compiler build), so size for that. 4 GB is a safe default for real projects.

How do I keep the agent running after I disconnect SSH?

Start it inside tmux (or screen). You attach, kick off the agent, detach, and close your laptop — it keeps running on the server. Reconnect later with tmux attach to see progress. For unattended scheduled runs, a systemd service or cron is cleaner.

Is it safe to give an autonomous agent shell access on a server?

Treat it like any powerful tool: run it on a dedicated VPS, not next to anything precious, use a non-root user, keep secrets in environment variables, and work in a git repo so every change is reviewable and revertible. The isolation of a separate box is exactly why a VPS is the safer place for this, not your main machine.

Does the agent need a powerful CPU?

Not for the thinking — that happens on the model provider's hardware. CPU matters only for your project's builds and tests. A 2-core box is fine for most repos; bump cores if your test suite is heavy or you run several agents at once.

← Back to blogSee plans & pricing →