How to Run Claude Code from Your Phone: Complete Guide to a $4.09/Month Cloud Development Environment
Summary: By combining a Hetzner VPS ($4.09/month) with the Terminus mobile terminal app, you can run a complete Claude Code development environment on your phone. The entire setup process involves four core steps—VPS server creation, SSH key configuration, Terminus client setup, and Claude Code installation—taking approximately 15 minutes total, enabling 24/7 development capabilities from anywhere.
Can Mobile Devices Actually Replace Laptops for Professional Development?
Your laptop sits at home while you’re stuck on a commuter train, and a critical bug isn’t going to fix itself—this frustrating scenario haunts many developers. Conventional wisdom says professional development tools like Claude Code require a laptop or desktop machine. That assumption needs updating.
The reality: A $4.09/month VPS server plus a mobile terminal app transforms your phone into a fully functional development workstation. This isn’t a watered-down experience or a compromised solution—it’s the exact same Claude Code functionality you’d get on desktop.
Real-World Advantages of Mobile Development
A server that runs 24/7 means your development environment never shuts down. Whether you’re waiting in a coffee shop queue, sitting in an airport terminal, or struck by inspiration at midnight, you can access your complete development setup within seconds of pulling out your phone.
The cost metrics are equally compelling: Hetzner’s basic VPS configuration costs just $4.09 per month—less than a single Starbucks latte—yet provides stable computational resources for professional-grade development work. For developers who need to respond to code issues at a moment’s notice, or technical professionals who travel frequently, this cost-to-benefit ratio is remarkable.
VPS Server Configuration: Building Cloud Infrastructure in 15 Minutes
Why Hetzner Stands Out Among VPS Providers
Among numerous VPS providers, Hetzner distinguishes itself through pricing transparency and performance stability. The cheapest server package provides more than enough computational power to run Claude Code—there’s no need to pay premium prices for high-end configurations just for mobile development.
Precise Server Creation Workflow
Step One: Account and Project Initialization
After accessing the Hetzner console, your first task is creating a new project. Project naming can be anything recognizable, such as “My Claude Code” or “Mobile Dev Environment.” While naming doesn’t affect technical functionality, clear labels help when managing multiple projects down the road.
Step Two: Server Specification Selection
After clicking “Create Server,” the system displays various configuration options. The key decision point: selecting the cheapest configuration option is sufficient. As a command-line tool, Claude Code demands far less CPU and memory than graphical IDEs—basic configuration resources are more than adequate.
Step Three: SSH Key Configuration—The Security Cornerstone
SSH keys represent the most critical security component of this entire setup. During server creation, the system requires SSH key configuration. This step demands careful attention because your phone client will need the identical key file for authentication when connecting to the server.
When configuring SSH keys, maintain local backups. Losing the key file means you cannot connect to the server without resetting or rebuilding the entire environment.
Step Four: Skip Non-Essential Configuration Items
The system prompts configuration for volumes, firewalls, and automatic backups. For mobile development scenarios, these advanced features aren’t necessary:
-
Volumes: Code typically resides in remote repositories like GitHub, minimizing local persistent storage needs -
Firewalls: Basic SSH access control suffices; complex rules increase configuration difficulty -
Automatic Backups: Development environments can be quickly rebuilt, unlike production systems where backups are critical
Step Five: Record the Server IP Address
After server creation completes, the console displays the assigned public IP address. This string of numbers forms the foundation for all subsequent connection operations—save it carefully. Store the IP address in a password manager or secure note-taking app to avoid manual entry errors.
Terminus Mobile Terminal: Giving Your Phone Complete Shell Capabilities
Why Choose Terminus Over Other Terminal Apps
Multiple mobile SSH clients exist, but Terminus offers unique value through its “AI Agent” functionality optimized specifically for Claude Code. This feature module allows pre-configuring Claude Code runtime parameters, eliminating manual startup steps after each connection.
Unified Configuration Process for iOS and Android
Installation and Account Setup
After downloading Terminus from the App Store (iOS devices) or Google Play Store (Android devices), create an account to complete initialization. This account synchronizes connection configurations across multiple devices—configure once, share across different phones or tablets.
Host Connection Parameter Configuration
Enter your previously recorded Hetzner server IP address in the app’s main interface. A common mistake here involves entering incorrect IP formats—ensure you input pure numeric IPv4 addresses like 123.45.67.89, not URLs with protocol prefixes.
After clicking “Continue,” the system requests setting a connection label. This label helps quickly identify servers when managing multiple machines—use descriptive names like “Hetzner Dev Server” or “Claude Code VPS.”
Critical AI Agent Feature Configuration
In the “AI Agent” settings page, select the “Claude Code” option. This step makes Terminus automatically prepare the Claude Code runtime environment after each successful connection, eliminating manual startup command entry.
The Project Directory field should remain empty. This design allows switching to different code repository directories after connecting based on actual needs, rather than locking into a fixed path.
SSH Authentication Mechanism Configuration
After enabling the SSH toggle, select “Password, Key, Certificate, FIDO2” for credentials type. While this option appears to support multiple authentication methods, you’ll actually only use key authentication.
When importing the SSH key, you must use the identical key file generated when creating the Hetzner server. Key mismatches are the primary cause of connection failures—if you encounter authentication errors, first check whether key files match.
Initial Connection Test
After saving configuration, tap the server item in the host list and enter the username. Hetzner’s default server uses “root” as the administrator account unless you customized the user during server creation.
A successful connection displays the server’s shell prompt, typically formatted as root@hostname:~#. At this point, you’ve gained complete control of the server through your phone.
Claude Code Installation: One Command Completes Environment Deployment
How the Official Installation Script Works
Claude Code’s installation script uses the curl tool to download and execute the configuration program from official servers. This completely automated process handles dependency detection, binary file downloads, and permission settings—all the technical details.
In the Terminus-connected shell, execute this command:
curl -fsSL https://claude.ai/install.sh | bash
Command parameter explanation:
-
-f: Fail silently on HTTP errors -
-s: Silent mode, no progress bar -
-S: Despite silent mode, still show error messages -
-L: Follow redirect links
The entire download and installation process typically completes within 30 seconds to 2 minutes, depending on your VPS server’s network speed.
Why PATH Environment Variable Configuration Matters
After installation completes, if the screen displays “Setup notes” prompt information, manual PATH addition for Claude Code is required. This operation ensures you can directly invoke the claude command from any directory without typing the complete executable file path.
Execute this command to complete PATH configuration:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
This command accomplishes two things:
-
Appends the PATH export statement to .bashrc(Bash shell’s configuration file) -
Immediately reloads the configuration file to activate changes
Verifying Successful Installation
Type claude in the shell and press enter. If you see Claude Code’s welcome interface or help information, installation succeeded completely. Your phone now possesses identical Claude Code functionality to desktop environments.
What Real Development Tasks Can You Complete on a Phone?
Code Repository Cloning and Management
Standard Git commands clone any GitHub, GitLab, or Bitbucket repository to your VPS server:
git clone https://github.com/username/repository.git
cd repository
Cloned code persists completely on the server—even when disconnecting your phone, code and work state remain intact. This persistence means you can start a task on the subway, continue on your laptop after reaching the office—completely seamless workflow.
Emergency Bug Fixes During Commute Time
When production environment issues emerge, traditional workflows require finding a computer, opening the development environment, locating code—a process potentially consuming 10 to 20 minutes. Using Claude Code running on your phone compresses the entire flow from problem discovery to fix submission into under 5 minutes.
Specific scenario example:
-
Users report login functionality failure -
Connect to VPS via phone, switch to relevant code repository -
Use Claude Code to analyze error logs, locate the problem -
Modify code and run tests -
Submit patch and trigger deployment pipeline
Mobile Pull Request Reviews
Code reviews no longer confine you to your desk. When team members submit PRs requesting review, you can from any location:
-
Check out the PR branch -
Run automated tests -
View specific code changes -
Add review comments or directly approve merges
Rapid Feature Prototype Validation
Inspiration often strikes at unexpected moments. Using a phone development environment, you can immediately validate idea feasibility:
-
Create new feature branches -
Write proof-of-concept code -
Run basic tests -
Push viable prototypes to remote repositories for later refinement
Anytime, Anywhere Learning and Experimentation
For developers learning new technology stacks, utilizing fragmented time offers enormous value. The 10 minutes waiting for meetings to start, gaps after lunch breaks—all become opportunities to:
-
Follow online tutorials writing code -
Test new framework APIs -
Debug previously encountered technical challenges -
Accumulate hands-on experience
Avoiding Common Configuration Pitfalls
SSH Key Mismatch Issues
This is the number one cause of connection failures. Symptoms manifest as Terminus displaying “Authentication failed” or “Permission denied.”
Correct key management workflow:
-
Generate SSH key pair when creating the Hetzner server -
Securely save the private key file on local devices -
When importing in Terminus, ensure selecting the identical private key file -
If keys are lost, you must reset server SSH access through the Hetzner console
PATH Configuration Omission Causing Invalid Commands
After installation completes, directly typing the claude command returns a “command not found” error. This indicates that while Claude Code installed successfully, the shell cannot locate the executable file’s location.
Quick diagnostic method:
Execute ls ~/.local/bin/claude to check if the file exists. If the file exists but the command fails, the problem lies in PATH configuration. Return to execute the previously mentioned PATH export command to resolve.
Over-Provisioning Servers Wastes Money
Some developers mistakenly believe high-specification servers are necessary for performance when selecting VPS configurations. Actual testing data shows: Hetzner’s lowest configuration ($4.09/month package) running Claude Code typically uses under 20% CPU, with memory consumption not exceeding 500MB.
Blindly choosing higher configurations won’t improve performance—only increase unnecessary monthly expenses. Unless you need to run other computation-intensive tasks on the same server, basic configuration is completely sufficient.
Long-Term Value Analysis of This Setup
Quantified Cost-Benefit Comparison
Traditional approach: Purchase a mobile office laptop, cost range between 2,100 USD. Even choosing ultrabooks, weight exceeds 1 kilogram, requiring additional charger carrying.
VPS approach: 49 annually. One year’s total cost equals 2%-7% of a laptop’s price. Equipment-wise, only your existing phone is needed—no additional hardware investment.
Practical Significance of Persistent Environments
24/7 server operation means:
-
Long-running script tasks won’t interrupt due to device sleep -
Multiple project development environments can remain simultaneously active -
Disconnecting doesn’t affect ongoing operations; reconnect and continue working -
Different devices (phone, tablet, temporarily borrowed computers) access the same consistent environment
Recognizing Use Case Boundaries
This solution isn’t universal—clear usage scenario limitations exist:
Unsuitable scenarios:
-
Development tasks requiring extensive GUI operations -
Video editing, image processing, and other multimedia projects -
Interface design work with strict screen size requirements -
Complex debugging tasks requiring frequent window switching
Most suitable scenarios:
-
Backend API development and maintenance -
Script writing and automation tasks -
Code reviews and minor modifications -
Learning new programming languages or frameworks -
Emergency bug fixes and hotpatch deployments
Final Checklist Before Taking Action
Preparation phase:
-
[ ] Confirm phone operating system is iOS or Android -
[ ] Prepare payment method (credit card or PayPal) for VPS monthly fees -
[ ] Reserve continuous 15-20 minutes to complete entire configuration -
[ ] Ensure phone has stable network connection (Wi-Fi or 4G/5G)
Technical capability requirements:
-
[ ] Basic command-line operation experience -
[ ] Understanding of fundamental SSH connection principles -
[ ] Ability to distinguish between public and private key concepts -
[ ] Familiarity with basic Git version control commands
Configuration process key points:
-
[ ] Hetzner account creation and verification -
[ ] Correct SSH key generation and storage -
[ ] Accurate server IP address recording -
[ ] Terminus app download and account registration -
[ ] Correct key file import on phone -
[ ] Accurate Claude Code installation command execution -
[ ] PATH environment variable configuration verification
First Steps from Configuration to Real-World Use
After completing all configuration steps, immediate real-world validation is crucial. Don’t wait until you truly need it to discover configuration problems.
Recommended initial test workflow:
-
Clone a personal small code repository -
Use Claude Code for simple code modifications -
Run the project’s test suite -
Commit changes and push to remote repository -
Disconnect then reconnect, verifying work state persistence
This test cycle completes within 10 minutes but exposes 95% of potential configuration issues. During genuine emergencies, you’ll appreciate having completed this verification in advance.
Frequently Asked Questions
Will the server automatically shut down after long periods of non-use?
No. VPS uses monthly billing—servers run continuously until you actively shut down or stop payment. Even without connecting for a week, all files and configurations remain unchanged upon next access.
Does unstable mobile network affect code safety?
Connection interruptions won’t cause data loss. All code and modifications save on the VPS server—disconnection merely temporarily removes access capability. After reconnecting, continue working from the interruption point. Cultivate frequent Git commit habits to further reduce risk.
Can multiple different projects run on the same VPS?
Absolutely. The VPS server’s file system functions identically to local computers—create multiple directories storing different projects separately. Use the cd command to switch between projects, each independently managing dependencies and configurations.
Does this approach violate Claude Code’s terms of service?
No violation. VPS simply provides a Linux runtime environment, essentially no different from installing Claude Code on local computers or company servers. Anthropic’s official installation script itself is designed to support remote server deployment.
What if I forget the VPS IP address?
Log into the Hetzner console—the project list always displays server IP addresses. Store IP addresses in both password managers and phone memos, ensuring retrieval even without accessing the Hetzner website.
Can I share the same VPS server with others?
Technically feasible but not recommended. Multi-user sharing increases security risks and permission management complexity. If team collaboration is genuinely necessary, better solutions involve each person configuring independent VPS, sharing code through Git repositories.
Does phone screen size limit actual user experience?
Limitations definitely exist. Complex code reading and large-scale refactoring prove inefficient on small screens. This solution’s optimal positioning is as a supplementary tool rather than complete laptop replacement—for handling urgent tasks and efficiently utilizing fragmented time.
$4.09 monthly, 15 minutes configuration time, exchanged for anytime-anywhere development capability. This isn’t marketing hype—it’s a proven, practical solution. While colleagues still stress about forgetting laptops and being unable to handle urgent issues, you’ve already submitted fix code from your phone. This technical advantage’s value far exceeds the cost of one monthly coffee.

