Running Claude Code on a VPS moves the working session off your laptop. Your phone becomes a window into a project on the server: closing the laptop no longer removes the machine doing the work. The VPS runs the client and project tools, not the Claude model; account access and usage limits remain separate.
The accompanying Short, with native English audio, is an animated illustration, not a real terminal test. Its five tasks are documented workflow examples, not five successfully tested executions.
Set up Claude Code on a VPS for phone access
Use a supported Linux distribution, outbound internet, Git and tmux. Ask your administrator for a dedicated non-root account and key-based SSH access. Keep production secrets outside this workspace. Allow resources for dependencies and tests, not just the client. Follow the official installation requirements, then connect and run the native installer as that account:
ssh you@your-vps
curl -fsSL https://claude.ai/install.sh | bash
Prepare a trusted project checkout and its dependencies before enabling remote access. Enter that project directory, run claude, and use /login for an eligible claude.ai subscription. Remote Control does not support API-key authentication or third-party provider/gateway configurations; organization policy and roles can also restrict access. See the Remote Control requirements and pairing instructions.
In the project directory, start a persistent terminal and the remote server:
tmux new -s claude
claude remote-control
Review and accept the workspace-trust prompt and one-time Remote Control confirmation when shown. Open the displayed URL in your phone browser, or display its QR code with the spacebar and open it in the Claude app. Use the same eligible account. The files and execution remain on the VPS, not on your phone.
Detach with Ctrl-b, then d; later reconnect over SSH and run tmux attach -t claude. The official tmux guide explains persistent sessions. tmux protects against a disconnected SSH client, not a server reboot, stopped process or extended server-side network outage.
Five uses for Claude Code on a VPS
1. Fix a reported bug
From your phone, send the reproduction steps, expected behaviour and relevant error, with secrets removed. Ask Claude to identify the cause and propose a narrow patch on a working branch. Inspect the changed files before accepting the result; a plausible explanation is not evidence that the bug is fixed.
2. Write and run tests
Request a regression test that reproduces the bug, then the smallest correction and a rerun of the relevant suite. Specify the repository's actual test command rather than inventing one. Read failures, skipped tests and exit status: an agent saying “done” is not the same as passing tests.
3. Commit and open a pull request
After reviewing the diff, authorize the exact commit and pull-request scope. Git hosting credentials, repository rights and any CLI integration require separate configuration; Claude authentication does not grant them. Keep approval for pushing and opening the pull request distinct from permission to edit locally. Do not silently include deployment or merging.
4. Split independent work across agents
Give separate research, implementation or review tasks clear file ownership and acceptance criteria. Subagents can specialize work; simultaneous edits still need coordination and final integration review. Agent teams, if chosen instead, are experimental and disabled by default. Parallel work consumes provider usage and is not automatically free or conflict-free.
5. Draft a night-time review report
The film illustrates a script using:
git diff main | claude -p "review" > review.md
Run it from the intended repository and verify the comparison branch. This compares against main, not necessarily only today's commits. The shell writes the answer to review.md; -p selects non-interactive output and does not itself enforce read-only tools. For a reporting-only job, restrict tools and permissions explicitly using the headless documentation. A scheduler is a separate setup, and model review never guarantees correct code.
Before using Claude Code on a VPS for changes, make a clean Git checkpoint and decide how you will restore it. Keep generated changes on a branch and inspect the working tree when switching devices. If an instruction is ambiguous, stop and clarify the intended file or outcome rather than widening permissions to make the task continue.
Keep the server available, not unrestricted
With Claude Code on a VPS, check pending approvals, provider limits and session health before leaving. Choose a SharpHeberg Linux VPS for a persistent workspace sized to your project. Hosting supplies the machine, not Claude inference, credentials or unattended success.