CodeMote

Run Claude Code on a VPS

By Salvatore Castellitti, developer of CodeMote · 29 July 2026

A VPS is the natural home for a long-running coding agent: it is always on, it doesn’t sleep when your laptop lid closes, and it keeps working on a fast datacenter connection while you are on a train. The catch has always been steering the agent once you walk away from SSH. This guide sets up Claude Code on a VPS so you can drive it from any browser.

What you need

  • A VPS you can SSH into, with Node 18 or newer.
  • The claude binary installed on it (this is what powers agent chats).
  • A project on the VPS you want the agent to work in.

Start the host

SSH into the VPS once, install Claude Code if it isn’t there yet, and start the CodeMote host inside your project:

npm install -g @anthropic-ai/claude-code
cd ~/projects/app && npx codemote-cli start

The CLI opens an outbound-only tunnel (nothing on the VPS starts listening for the internet, and no firewall rules change) and prints a one-line pairing code plus a QR. Because the tunnel dials out, this works on VPSes behind strict provider firewalls too.

Pair your browser

Open the CodeMote web app on any machine, choose Pair a machine, and paste the pairing code line. The full workspace goes live: the VPS’s files in a real editor, its terminals, its git state, and a Claude Code chat running on the VPS itself. Codes are single-use and expire; press Enter in the CLI whenever you need a fresh one.

Steer, don’t babysit

Give the agent a task and close the tab: the session lives on the VPS, not in your browser. When Claude Code needs a tool approval or has a question, open the workspace from wherever you are (any browser, or the iOS app against the same host) and answer it. The diff, the terminal output and the chat history are all there, because none of it ever depended on your client staying open.

Keep it running

The CLI stays in the foreground, so for a host that should outlive your SSH session, start it inside tmux or screen. The default Cloudflare quick tunnel is built for sessions; for a host that runs unattended for days, switch to one of the longer-lived tunnel providers (codemote start --help lists them). For the full overnight setup, including scheduled agent runs, see running coding agents overnight.

Related

Want to try it on a machine of yours? Connecting one takes about a minute, and founder seats are free forever while they last.