Run Claude Code on a Remote Cloud VPS (Complete Guide)
Step-by-step tutorial to configure Anthropic Claude Code CLI on a dedicated NodexVPS Ubuntu VPS with tmux persistence, Node.js 20, and Git worktrees.
Running Claude Code on a dedicated remote VPS gives your AI agent 24/7 unthrottled compute, dedicated 10 Gbps networking, and protects your local machine's memory and battery.
Install Node.js 20 LTS & Essential Build Tools
Connect to your NodexVPS VPS via SSH and install modern Node.js and build packages.
Install the Claude Code CLI Globally
Use npm to install Anthropic official Claude Code package.
Securely Export Your API Key
Add your Anthropic API key to your environment variables or ~/.bashrc.
Launch Inside a Persistent Tmux Session
Ensure your agent continues executing even if your local laptop sleeps or SSH connection drops.
Pair with VS Code Remote - SSH
Open VS Code on your laptop, press F1, select 'Remote-SSH: Connect to Host', and enter your NodexVPS VPS IP address to edit code side-by-side with Claude Code.
Table of Contents
- 1.1. Install Node.js 20 & Git
- 2.2. Install @anthropic-ai/claude-code
- 3.3. Configure ANTHROPIC_API_KEY
- 4.4. Run Persistent Session in Tmux
- 5.5. VS Code Remote SSH Pairing
Explore More VPS Hosting Options
Find the right server for your project.
Start Your NodexVPS Today
Save 50% with yearly billing. No contract, cancel any time.