Short answer: Claude Code runs on any Linux VPS with at least 4 GB of RAM (Anthropic's requirement), so on Rdp.Vision the smallest plan that fits is 4 vCPU, 6 GB RAM and 40 GB NVMe for $13 a month. Install it with one command, log in by opening the printed URL on your own computer, and start it inside tmux so it keeps working after you close SSH. For jobs on a timer, use claude -p with a token from claude setup-token.
Why a server at all? A coding agent that works for an hour shouldn't stop because your laptop went to sleep, and an agent with shell access is better off on a machine that holds only the project, not your personal files. A VPS gives it both, and you can check on it from any device with SSH, including your phone.
01What Do You Need to Run Claude Code on a VPS?
| Anthropic's requirement | On our plans | |
|---|---|---|
| Memory | 4 GB RAM or more | 4 vCPU, 6 GB, 40 GB NVMe for $13; 6 vCPU, 10 GB for $26 |
| System | Ubuntu 20.04+, Debian 10+, Windows Server 2019+ | Ubuntu 24.04, Debian 12, Windows Server 2019, 2022 and 2025 |
| Account | Claude Pro, Max, Ultra, Team or Enterprise, or a Console account with API billing. The free plan has no Claude Code | You bring your own account |
| Country | Anthropic's supported countries | Netherlands, Germany, Poland, Romania and the USA are on the list. Hong Kong is not |
| GPU | Not needed: the model runs at Anthropic | No plan has a GPU, none is needed |
Requirements from Anthropic's setup page, checked on 21 November 2026.
02Which Plan Should You Pick?
4 vCPU, 6 GB, 40 GB NVMe ($13)
One Claude Code session on a normal repository, with git, Node or Python and the project's tests.
6 vCPU, 10 GB, 40 or 80 GB NVMe ($26 or $39)
Several sessions side by side, Docker builds, large test suites, or an agent that drives a headless browser.
The 1 and 2 GB plans are below Anthropic's minimum, so they're not a good fit. Disk fills up faster than people expect with node_modules, Docker images and build output: if it does, see Linux VPS Disk Full?.
Top up $50 or more and get up to 15% extra on your balance.
Full root SSH access · NVMe storage · DDoS protection · No setup fee
03Step 1: Order the Server and Connect
- 1Order a Linux VPS with Ubuntu 24.04, in Amsterdam, Frankfurt, Warsaw, Romania or New York. It's online a few minutes after the payment confirms.
- 2Copy the IP and root password from the server page.
- 3Connect with SSH from your computer:
ssh root@YOUR_SERVER_IP.
04Step 2: Create a Normal User for the Agent
Claude Code runs shell commands for you. Give it its own user instead of root, so a wrong command can't touch the whole system:
adduser claude # pick a password when asked
usermod -aG sudo claude # optional: lets you use sudo as this user
rsync --archive --chown=claude:claude ~/.ssh /home/claude # only if you log in with an SSH key
apt update && apt install -y git tmux curl
su - claudeFrom now on, work as claude. Next time you can connect directly with ssh claude@YOUR_SERVER_IP.
05Step 3: Install Claude Code
Anthropic's native installer needs no Node.js and updates itself in the background:
curl -fsSL https://claude.ai/install.sh | bashIt puts the claude command in ~/.local/bin. If the shell says claude: command not found, add that folder to your PATH and check the install:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
claude --version
claude doctorclaude doctor prints what's installed and any warnings, without starting a session.
06Step 4: How Do You Log In Without a Browser?
The server has no browser, so the login happens on your own computer:
- 1Start it in your project folder. Run
claude. On a server it can't open a browser window. - 2Copy the login URL. Press
cto copy it, or select it in your SSH window, and open it in the browser on your computer. - 3Sign in and paste the code. After you sign in, the browser shows a code. Paste it in the terminal at "Paste code here if prompted" and press Enter.
Your login is stored in ~/.claude/.credentials.json, readable only by your user. If you pay per token through the Claude Console instead of a subscription, set ANTHROPIC_API_KEY in the environment and Claude Code asks once whether to use it.
07Step 5: Keep It Running After You Disconnect
A program started in a plain SSH session stops when the connection drops. Start Claude Code inside tmux instead:
tmux new -s claude # opens a session called "claude"
cd ~/myproject
claudeLeave it working with Ctrl+B, then D: tmux detaches, Claude Code keeps going and you can close SSH. Later, from any device:
ssh claude@YOUR_SERVER_IP
tmux attach -t claudetmux sessions end when the server restarts. Your conversation isn't lost: in the project folder, claude --continue picks up the most recent one.
08Step 6: Run Claude Code on a Schedule
For a job that runs on its own, such as a nightly report, a dependency check or a log summary, use non-interactive mode, claude -p. It needs a login that works without a browser:
claude setup-tokenThis opens the same browser sign-in as before and prints a token that lasts one year (it needs a Pro, Max, Ultra, Team or Enterprise plan). Save it in a file only your user can read:
echo 'CLAUDE_CODE_OAUTH_TOKEN=paste-your-token-here' > ~/.claude-env
chmod 600 ~/.claude-envThen a small script, ~/nightly.sh:
#!/bin/bash
set -a; . "$HOME/.claude-env"; set +a
cd "$HOME/myproject"
"$HOME/.local/bin/claude" -p "Run the tests. If any fail, write the cause and a suggested fix to reports/tests.md" \
--allowedTools "Bash(npm test *),Read,Write" >> "$HOME/nightly.log" 2>&1Make it executable with chmod +x ~/nightly.sh and add it to cron with crontab -e:
0 3 * * * /home/claude/nightly.sh--allowedTools lists what Claude may do without asking. In -p mode anything else that needs approval is refused, so the job can't wander off. Keep the list as short as the job allows. The full flag reference is in Anthropic's docs on running Claude Code programmatically.
09How Do You Keep the Server Safe?
An agent with shell access is only as safe as the machine you give it.
SSH keys, not passwords
Log in with a key and keep the root password from the server page somewhere safe.
Close what you don't use
Dev servers the agent starts (ports 3000, 5173, 8000) don't need to face the internet. Reach them through a tunnel: ssh -L 3000:localhost:3000 claude@YOUR_SERVER_IP, then open http://localhost:3000 on your computer.
Limit SSH to your IP
with a rule in the firewall card on the server page, if your IP doesn't change often. See How do I open or block a port with the firewall?.
Commit before big tasks
With git you can undo whatever the agent changed: git diff to review, git restore . to throw it away.
Only the secrets the job needs
Don't put production keys in the project folder of an agent that can read every file there.
Back up the server
The Extras card on the server page has one free backup slot, daily or weekly at 03:00 UTC.
10Can You Use It from Windows RDP Instead?
Yes. Claude Code supports Windows Server 2019 and newer, and our Windows RDP plans run Windows Server 2019, 2022 or 2025. In PowerShell:
irm https://claude.ai/install.ps1 | iexAnthropic recommends Git for Windows so Claude Code can use Bash; without it, it uses PowerShell. Windows makes sense when the project itself is a Windows program. For everything else, Linux is the simpler choice: SSH, tmux and cron work exactly as shown above.
More on running agents on a server: VPS for AI agents. Want a model that runs on the server itself instead? See Run a Local LLM on a VPS Without a GPU.
Yes. Claude Code runs on Ubuntu 20.04+, Debian 10+ and Windows Server 2019+ with at least 4 GB of RAM. You log in over SSH and keep it running in tmux.
Anthropic asks for 4 GB or more. Our smallest plan above that is 4 vCPU, 6 GB RAM and 40 GB NVMe for $13 a month.
Run claude, press c to copy the login URL, open it on your own computer, sign in and paste the code shown in the browser back into the terminal.
Only if you start it inside tmux (or screen). Detach with Ctrl+B, then D, and reattach later with tmux attach -t claude.
No. The model runs at Anthropic; the server only runs the Claude Code program, your files and your tools.
One in a country Anthropic supports and close to you: Amsterdam, Frankfurt, Warsaw, Romania or New York. Hong Kong is not on Anthropic's list.
Yes: USDT, USDC, Bitcoin, Ethereum, Litecoin, Solana, BNB or Monero. Sign-up needs only an email or a Telegram account.
- claude code vps
- run claude code on server
- claude code ssh
- claude code 24/7
- claude code headless
- ai coding agent vps