Modul master Level 3 VibeKoding: Remote Development Claude Code dari Smartphone.Modul master Level 3 VibeKoding: Remote Development Claude Code dari Smartphone.
Imagine these scenarios: you suddenly think of a brilliant bug-fix idea on the subway during your commute; you receive an urgent production incident alert while waiting in line at a cafe; you want to check how your AI-built project is progressing while accompanying your girlfriend shopping.Imagine these scenarios: you suddenly think of a brilliant bug-fix idea on the subway during your commute; you receive an urgent production incident alert while waiting in line at a cafe; you want to check how your AI-built project is progressing while accompanying your girlfriend shopping.
In traditional development workflows, these scenarios usually mean you need to find a place to open your laptop, or helplessly postpone the work. But in the AI-assisted coding era, the rules have changed. Claude Code makes it possible to carry your development environment in your pocket and stay productive anytime, anywhere.In traditional development workflows, these scenarios usually mean you need to find a place to open your laptop, or helplessly postpone the work. But in the AI-assisted coding era, the rules have changed. Claude Code makes it possible to carry your development environment in your pocket and stay productive anytime, anywhere.
In the summer of 2025, as Claude Code adoption grew, developers started exploring different "coding on phone" approaches. From simple local Termux usage, to complex SSH + Tailscale remote connections, to dedicated Happy Coder apps, a full mobile development ecosystem gradually took shape.In the summer of 2025, as Claude Code adoption grew, developers started exploring different "coding on phone" approaches. From simple local Termux usage, to complex SSH + Tailscale remote connections, to dedicated Happy Coder apps, a full mobile development ecosystem gradually took shape.
The core problem this chapter solves is: how to make Claude Code follow your phone and become a true "pocket development assistant."The core problem this chapter solves is: how to make Claude Code follow your phone and become a true "pocket development assistant."
------
Based on real-world community feedback, the experience of each approach compares as follows: Happy Coder (Approach 2) - Connection stability issues: disconnections happen often, and context is lost after disconnects - Limited functionality: cannot use / commands - Security concerns: depends on official relay servers, and some users are concerned about data security HAPI (Approach 3) - Supports self-hosted servers: can be deployed on your own VPS - Better experience when paired with Tailscale: run hapi server on your computer and connect from your phone through the Tailscale IP - Relatively stable connection, suitable for long-term use Claude Remote Control (Official Approach) - Official solution, natively integrated with Claude Code - Supports full access to local environments (MCP, tools, project configuration) - Requires Max subscription (Pro support is coming soon) - Relies on Anthropic cloud connectivity Recommendation: if you require high connection stability, or are concerned about third-party relay security, choose HAPI + Tailscale or the official Remote Control approach.Based on real-world community feedback, the experience of each approach compares as follows: Happy Coder (Approach 2) - Connection stability issues: disconnections happen often, and context is lost after disconnects - Limited functionality: cannot use / commands - Security concerns: depends on official relay servers, and some users are concerned about data security HAPI (Approach 3) - Supports self-hosted servers: can be deployed on your own VPS - Better experience when paired with Tailscale: run hapi server on your computer and connect from your phone through the Tailscale IP - Relatively stable connection, suitable for long-term use Claude Remote Control (Official Approach) - Official solution, natively integrated with Claude Code - Supports full access to local environments (MCP, tools, project configuration) - Requires Max subscription (Pro support is coming soon) - Relies on Anthropic cloud connectivity Recommendation: if you require high connection stability, or are concerned about third-party relay security, choose HAPI + Tailscale or the official Remote Control approach.
------
Before introducing specific approaches, first understand the essence of the problem.Before introducing specific approaches, first understand the essence of the problem.
Traditional IDEs (such as VS Code and IntelliJ) require a full operating system environment, strong CPU, large memory, and storage space. Although phones are increasingly powerful, they still have natural limits for development experience:Traditional IDEs (such as VS Code and IntelliJ) require a full operating system environment, strong CPU, large memory, and storage space. Although phones are increasingly powerful, they still have natural limits for development experience:
Input constraints: virtual keyboards are inefficient for coding, and complex syntax is easy to mistypeInput constraints: virtual keyboards are inefficient for coding, and complex syntax is easy to mistype
Screen constraints: small screens make it hard to view code, terminal, and browser at the same timeScreen constraints: small screens make it hard to view code, terminal, and browser at the same time
Environment constraints: phones cannot run full development toolchains (compilers, databases, debuggers)Environment constraints: phones cannot run full development toolchains (compilers, databases, debuggers)
Connection constraints: mobile networks are unstable, and SSH sessions disconnect easilyConnection constraints: mobile networks are unstable, and SSH sessions disconnect easily
The core idea behind all mobile development approaches is the same: the phone is only the "control console"; real development work is done elsewhere.The core idea behind all mobile development approaches is the same: the phone is only the "control console"; real development work is done elsewhere.
text βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββ βββββββββββββββ β β β Phone β β Host/Cloud β β β β (Controller)β βββββββββΊ β (Executor) β β β β β Commands β β β β β β’ Send cmds β β β’ Run CLI β β β β β’ View out β β β’ Exec code β β β β β’ Review β β β’ Access fs β β β βββββββββββββββ βββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
This architecture allows the phone to focus only on human-computer interaction, while heavy computation is delegated to your host or cloud.This architecture allows the phone to focus only on human-computer interaction, while heavy computation is delegated to your host or cloud.
------
In October 2025, Anthropic officially launched Claude Code mobile support in the iOS app. This is the simplest mobile development option.In October 2025, Anthropic officially launched Claude Code mobile support in the iOS app. This is the simplest mobile development option.
Important note: the Claude app cannot be used directly in mainland China.Important note: the Claude app cannot be used directly in mainland China.
If you are in mainland China, it is recommended to use Happy Coder directly (Approach 2), which can work normally through configured domestic API relay services.If you are in mainland China, it is recommended to use Happy Coder directly (Approach 2), which can work normally through configured domestic API relay services.
If you have an overseas Apple ID, you can switch regions and download the Claude app.If you have an overseas Apple ID, you can switch regions and download the Claude app.
text βββββββββββββββ βββββββββββββββββββ β iOS App β βββββββββββββββββββΊ β Anthropic Cloud β β (Phone) β HTTPS + OAuth β Claude Code β βββββββββββββββ ββββββββββ¬βββββββββ β βΌ βββββββββββββββββ β GitHub API β βββββββββββββββββ
Your phone app only sends commands. All code execution runs in Anthropic's cloud sandbox, and results are synced through GitHub.Your phone app only sends commands. All code execution runs in Anthropic's cloud sandbox, and results are synced through GitHub.
Prerequisites:Prerequisites:
Steps:Steps:
Pros are zero setup barrier, smooth experience, and push notifications. Cons are iOS-only support, primary GitHub workflow, relatively limited capability (cannot access local file systems), and no direct availability in mainland China.Pros are zero setup barrier, smooth experience, and push notifications. Cons are iOS-only support, primary GitHub workflow, relatively limited capability (cannot access local file systems), and no direct availability in mainland China.
------
Happy Coder is an open-source mobile and web client designed for Claude Code and Codex, with end-to-end encryption and remote control of your AI coding assistant from anywhere.Happy Coder is an open-source mobile and web client designed for Claude Code and Codex, with end-to-end encryption and remote control of your AI coding assistant from anywhere.
text βββββββββββββββ βββββββββββββββ βββββββββββββββ β Happy App β βββββββββΊ β Happy Server β βββββββββ βhappy-coder β β (Phone/Web) β Encrypted WS β (Relay) β WebSocket β (Desktop) β βββββββββββββββ βββββββββββββββ ββββββββ¬βββββββ β βΌ βββββββββββββββ βClaude Code β β CLI β βββββββββββββββ
On your computer, run happy instead of claude to launch your AI coding assistant. When you need phone control, the session automatically switches to remote mode. Press any key on your computer to switch back to local control.On your computer, run happy instead of claude to launch your AI coding assistant. When you need phone control, the session automatically switches to remote mode. Press any key on your computer to switch back to local control.
Step 1: download appStep 1: download app
| Platform | Link |
|---|---|
| iOS | [App Store](https://apps.apple.com/us/app/happy-claude-code-client/id6748571505) |
| Android | [Google Play](https://play.google.com/store/apps/details?id=com.ex3ndr.happy) |
| Web | [app.happy.engineering](https://app.happy.engineering) |
Step 2: install CLI on computerStep 2: install CLI on computer
bash npm install -g happy-coder
Step 3: launch and pairStep 3: launch and pair
bash # run in your project directory cd ~/my-project happy # a pairing QR code will be shown
Step 4: scan and pair on phoneStep 4: scan and pair on phone
Open Happy app and scan the QR code shown on your computer. After pairing succeeds, you can control Claude Code from your phone.Open Happy app and scan the QR code shown on your computer. After pairing succeeds, you can control Claude Code from your phone.
Step 5: useStep 5: use
bash # launch Claude Code happy # or launch Codex happy codex
Pros are simple setup, cross-platform support, end-to-end encryption, and open-source auditability. Cons are dependence on third-party relay infrastructure and the need to verify mobile app availability in your own environment.Pros are simple setup, cross-platform support, end-to-end encryption, and open-source auditability. Cons are dependence on third-party relay infrastructure and the need to verify mobile app availability in your own environment.
------
HAPI is an alternative to Happy Coder, with a local-first design and support for seamless device switching across multiple AI models.HAPI is an alternative to Happy Coder, with a local-first design and support for seamless device switching across multiple AI models.
text βββββββββββββββ βββββββββββββββ βββββββββββββββ β HAPI App β βββββββββΊ β HAPI Server β βββββββββ β hapi β β (Phone/PWA/ β WireGuard β (Self-hostedβ WireGuard β (Desktop) β β Telegram) β + TLS β relay) β + TLS β β βββββββββββββββ βββββββββββββββ ββββββββ¬βββββββ β βΌ βββββββββββββββ βClaude Code β β / Codex / β β Gemini etc. β βββββββββββββββ
HAPI uses WireGuard plus TLS for end-to-end encryption. All communication goes through encrypted relay servers. You can self-host relay servers to fully control your data flow.HAPI uses WireGuard plus TLS for end-to-end encryption. All communication goes through encrypted relay servers. You can self-host relay servers to fully control your data flow.
Step 1: start relay serverStep 1: start relay server
bash # run on your server (or launch directly with npx) npx @twsxtd/hapi hub --relay
Step 2: install CLI on computerStep 2: install CLI on computer
bash # run in your project directory cd ~/my-project npx @twsxtd/hapi # or install globally npm install -g @twsxtd/hapi hapi
Step 3: pair devicesStep 3: pair devices
Follow terminal prompts, open HAPI app on your phone, and scan the QR code to complete pairing.Follow terminal prompts, open HAPI app on your phone, and scan the QR code to complete pairing.
Step 4: access methodsStep 4: access methods
| Access Method | Description |
|---|---|
| Web PWA | Browser access, supports install-to-home-screen |
| Telegram Mini App | Use directly inside Telegram |
| Mobile App | Native app experience (if published) |
| Feature | Happy Coder | HAPI |
|---|---|---|
| Design philosophy | Cloud-first | Local-first |
| Encryption method | WebSocket + E2E | WireGuard + TLS |
| Multi-model support | Claude Code, Codex | Claude, Codex, Gemini, OpenCode |
| Access methods | iOS/Android/Web | PWA, Telegram, more |
| Voice control | No | Yes |
| AFK approvals | No | Yes |
| Self-hosted relay | Requires manual deployment | Out-of-the-box support |
Pros are local-first design, multi-model support, end-to-end encryption, voice control, and self-hosted relay capability. Cons are that the project is relatively new and the ecosystem is still growing.Pros are local-first design, multi-model support, end-to-end encryption, voice control, and self-hosted relay capability. Cons are that the project is relatively new and the ecosystem is still growing.
------
This is the best option for professional developers. You remotely connect to your development machine over SSH and keep sessions persistent with Tmux.This is the best option for professional developers. You remotely connect to your development machine over SSH and keep sessions persistent with Tmux.
text βββββββββββββββ βββββββββββββββ βββββββββββββββ β Phone β βββββββββΊ β Tailscale β βββββββββ β Computer β β (SSH client)β VPN P2P β relay/hole β VPN P2P β (dev host) β βββββββββββββββ βββββββββββββββ ββββββββ¬βββββββ β βΌ βββββββββββββββ β Tmux β β (session β β persistence)β βββββββββββββββ
Tailscale creates a peer-to-peer VPN so you can access your home computer from any network. Tmux ensures Claude Code keeps running in the background even when SSH disconnects.Tailscale creates a peer-to-peer VPN so you can access your home computer from any network. Tmux ensures Claude Code keeps running in the background even when SSH disconnects.
Problems with traditional SSH:Problems with traditional SSH:
text Phone (4G) ββXXββ> Router NAT ββXXββ> Home Computer (cannot penetrate) (LAN isolation)
Your computer is on a private network, and your phone is on the public network, so direct access fails. Traditional solutions require port forwarding plus dynamic DNS, which are complex and risky.Your computer is on a private network, and your phone is on the public network, so direct access fails. Traditional solutions require port forwarding plus dynamic DNS, which are complex and risky.
Tailscale solution:Tailscale solution:
text Phone (4G) βββΊ Tailscale Relay βββββ Home Computer (auto hole-punch or relay)
Tailscale uses NAT traversal, and falls back to relay automatically if traversal fails. The entire connection is encrypted.Tailscale uses NAT traversal, and falls back to relay automatically if traversal fails. The entire connection is encrypted.
Step 1: install Tailscale on computerStep 1: install Tailscale on computer
bash # macOS brew install --cask tailscale # or download installer # https://tailscale.com/download
Step 2: log in and get IPStep 2: log in and get IP
bash # start Tailscale sudo tailscale up # check Tailscale IPv4 tailscale ip -4 # example output: 100.x.x.x
Step 3: install Tailscale on phoneStep 3: install Tailscale on phone
Download Tailscale from App Store or Google Play and log in with the same account.Download Tailscale from App Store or Google Play and log in with the same account.
Step 4: install and configure TmuxStep 4: install and configure Tmux
bash # macOS brew install tmux # create ~/.tmux.conf cat > ~/.tmux.conf << 'EOF' # enable mouse support set -g mouse on # default terminal with 256 colors set -g default-terminal "screen-256color" # change prefix key to Ctrl+A (optional) unbind C-b set -g prefix C-a # simplified split shortcuts bind v split-window -h bind h split-window EOF
Step 5: create a persistent sessionStep 5: create a persistent session
bash # create session named "claude" tmux new -s claude # start Claude Code in this session cd ~/my-project claude # detach without closing # press Ctrl+B then D
Step 6: connect from phone SSH clientStep 6: connect from phone SSH client
Recommended SSH clients:Recommended SSH clients:
| Client | Platform | Notes |
|---|---|---|
| Blink Shell | iOS | Supports MOSH, great for unstable networks |
| Termius | iOS/Android | Cross-platform and polished UI |
| a-Shell | iOS | Free and lightweight |
Connection config:Connection config:
text Host: 100.x.x.x (your Tailscale IP) Port: 22 Username: your computer username
After connecting, attach to Tmux:After connecting, attach to Tmux:
bash tmux attach -t claude
Prevent your computer from sleeping:Prevent your computer from sleeping:
bash # macOS caffeinate -dimsu & # or set System Settings > Energy Saver > prevent automatic sleep
Use MOSH for unstable networks:Use MOSH for unstable networks:
MOSH (Mobile Shell) is an SSH alternative optimized for mobile networks, with seamless recovery across network changes.MOSH (Mobile Shell) is an SSH alternative optimized for mobile networks, with seamless recovery across network changes.
bash # install on computer brew install mosh # use MOSH from phone client # Blink Shell supports MOSH natively
One-command connect script:One-command connect script:
Set this as startup command in your SSH client:Set this as startup command in your SSH client:
bash tmux attach -t claude || tmux new -s claude
This will auto-attach to an existing session or create a new one.This will auto-attach to an existing session or create a new one.
Pros are full capabilities and desktop-equivalent workflow with all development tools. Cons are more complex setup and the requirement to keep your computer online.Pros are full capabilities and desktop-equivalent workflow with all development tools. Cons are more complex setup and the requirement to keep your computer online.
------
If you are an Android user, you can run Claude Code directly on your phone without connecting external devices.If you are an Android user, you can run Claude Code directly on your phone without connecting external devices.
text βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββ β β β Termux β β β β (Linux env) β β β β β β β β β’ Node.js β β β β β’ Claude β β β β Code CLI β β β β β β β β β’ Project β β β β files β β β β β’ Git β β β βββββββββββββββ β β β β β βΌ β β βββββββββββββββ β β βAnthropic APIβ β β βββββββββββββββ β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Termux is a terminal emulator and Linux environment for Android. You can directly install Node.js and Claude Code in it.Termux is a terminal emulator and Linux environment for Android. You can directly install Node.js and Claude Code in it.
Important: download Termux from [F-Droid](https://f-droid.org/), not from Google Play (the Play version is outdated).Important: download Termux from [F-Droid](https://f-droid.org/), not from Google Play (the Play version is outdated).
Step 1: install base toolsStep 1: install base tools
bash # update package manager pkg update && pkg upgrade # install development tools pkg install git nodejs python vim
Step 2: install Claude CodeStep 2: install Claude Code
bash npm install -g @anthropic-ai/claude-code
Step 3: configure environmentStep 3: configure environment
bash # create workspace mkdir -p ~/projects cd ~/projects # initialize project git clone https://github.com/your-repo.git cd your-repo # launch Claude Code claude
Step 4: configure external keyboard (recommended)Step 4: configure external keyboard (recommended)
In Termux:In Termux:
bash # enable extra keys row # long press screen > More > Extra keys row # configure shortcuts # add in ~/.termux/termux.properties extra-keys = [['ESC','/','-','HOME','UP','END','PGUP','~'], \ ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN','|']]
| Task Type | Android Performance |
|---|---|
| Web development (HTML/CSS/JS) | Excellent |
| Python scripts | Excellent |
| Node.js applications | Good |
| Running test suites | Medium |
| Compiling large projects | Not recommended |
Pros are full local control, no external host dependency, and offline-first operation. Cons are limited phone performance, weak text input experience, and Android-only availability.Pros are full local control, no external host dependency, and offline-first operation. Cons are limited phone performance, weak text input experience, and Android-only availability.
------
Claude Code UI (also known as CloudCLI) is an open-source project that provides a web interface for Claude Code, with phone browser support.Claude Code UI (also known as CloudCLI) is an open-source project that provides a web interface for Claude Code, with phone browser support.
text βββββββββββββββ βββββββββββββββ βββββββββββββββ βPhone Browserβ βββββββββΊ β Web Server β βββββββββ βClaude Code β β β HTTP/HTTPS β (localhost) β invoke β CLI β βββββββββββββββ βββββββββββββββ βββββββββββββββ
You run a web server on your computer, then access it from your phone browser. This requires LAN access or tunneling.You run a web server on your computer, then access it from your phone browser. This requires LAN access or tunneling.
Step 1: installStep 1: install
bash # one-command start (recommended) npx @siteboon/claude-code-ui # or global install npm install -g @siteboon/claude-code-ui claude-code-ui
Step 2: open interfaceStep 2: open interface
Server defaults to http://localhost:3001.Server defaults to http://localhost:3001.
Step 3: access from phoneStep 3: access from phone
Method A - LAN access (same Wi-Fi):Method A - LAN access (same Wi-Fi):
bash # bind all interfaces claude-code-ui --host 0.0.0.0 # access from phone http://<computer-lan-ip>:3001
Method B - ngrok tunnel:Method B - ngrok tunnel:
bash # install ngrok brew install ngrok # start tunnel ngrok http 3001 # open ngrok URL from phone
Pros are graphical interface and rich features. Cons are tunnel requirements outside LAN and relatively more complex setup.Pros are graphical interface and rich features. Cons are tunnel requirements outside LAN and relatively more complex setup.
------
If you do not have an always-on local computer, you can use cloud development environments where Claude Code runs on cloud servers.If you do not have an always-on local computer, you can use cloud development environments where Claude Code runs on cloud servers.
text βββββββββββββββ βββββββββββββββ βββββββββββββββ β Phone β βββββββββΊ β Cloud Box β ββββββββββΊ βClaude Code β β(Browser/App)β HTTPS β (DevBox) β β CLI β βββββββββββββββ βββββββββββββββ βββββββββββββββ
A cloud container comes with Claude Code preinstalled, and you access it from browser or mobile app.A cloud container comes with Claude Code preinstalled, and you access it from browser or mobile app.
Step 1: create environmentStep 1: create environment
Go to [Sealos DevBox](https://sealos.io/devbox), choose a Claude Code template, and create an environment.Go to [Sealos DevBox](https://sealos.io/devbox), choose a Claude Code template, and create an environment.
Step 2: start development environmentStep 2: start development environment
Environment is ready in about 30-60 seconds, and you get a web terminal.Environment is ready in about 30-60 seconds, and you get a web terminal.
Step 3: configure Claude APIStep 3: configure Claude API
bash export ANTHROPIC_API_KEY="your-api-key"
Step 4: connect Happy appStep 4: connect Happy app
bash # install happy-coder (or use preinstalled) npm install -g happy-coder # generate pairing QR code happy
After scanning on your phone, you can use it immediately.After scanning on your phone, you can use it immediately.
| Platform | Claude Code | Mobile Optimization | Startup Time | Pricing |
|---|---|---|---|---|
| Sealos DevBox | Preinstalled | Happy support | ~60s | Pay-as-you-go |
| GitHub Codespaces | Manual setup | Browser flow | ~2-3 min | Free quota + hourly |
| Gitpod | Manual setup | Browser flow | ~1-2 min | Free quota + hourly |
| Replit | No native Claude Code | Native app | Instant | Free + subscription |
Pros are no local computer requirement, environment consistency, and scalability. Cons are paid usage, network dependency, and code hosted in cloud.Pros are no local computer requirement, environment consistency, and scalability. Cons are paid usage, network dependency, and code hosted in cloud.
------
Each approach has different strengths and is suitable for different scenarios.Each approach has different strengths and is suitable for different scenarios.
| Approach | Difficulty | Requires Tunnel | Cost | Best Scenarios |
|---|---|---|---|---|
| Official iOS App | Easy | No | $20/month | Quick checks, simple tasks |
| Happy Coder | Relatively easy | No | Free | Daily use, convenience |
| HAPI | Medium | No | Free | Multi-model, local-first |
| SSH + Tailscale | Relatively complex | No | Free | Professional development, full features |
| Termux | Medium | No | Free | Android local development |
| Claude Code UI | Medium | Yes | Free | Web interface preference |
| Cloud DevBox | Easy | No | Pay-as-you-go | No local computer |
If you are in mainland China: use Happy Coder; with domestic API relay setup, it works well.If you are in mainland China: use Happy Coder; with domestic API relay setup, it works well.
If you want maximum convenience: choose Happy Coder. Scan-and-use flow is very convenient.If you want maximum convenience: choose Happy Coder. Scan-and-use flow is very convenient.
If you need multi-model support: choose HAPI. It supports multiple AI coding assistants and is ideal for model switching workflows.If you need multi-model support: choose HAPI. It supports multiple AI coding assistants and is ideal for model switching workflows.
If you have an always-on computer: choose SSH + Tailscale. This gives the most complete experience.If you have an always-on computer: choose SSH + Tailscale. This gives the most complete experience.
If you are an iPhone user (outside mainland China): official app is the easiest way to get started.If you are an iPhone user (outside mainland China): official app is the easiest way to get started.
If you only have Android: Termux gives a fully local mobile development path.If you only have Android: Termux gives a fully local mobile development path.
If you do not have a computer: cloud DevBox is the ideal choice.If you do not have a computer: cloud DevBox is the ideal choice.
------
Mobile development involves code transfer over networks, so security needs special attention.Mobile development involves code transfer over networks, so security needs special attention.
When using relay-dependent services like Happy Coder or HAPI, consider these risks:When using relay-dependent services like Happy Coder or HAPI, consider these risks:
text βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β What can a relay server potentially see? β β β β β’ Data before encryption (if E2E is implemented poorly) β β β’ Metadata (when you connect, how long sessions run) β β β’ Your API key (if configured incorrectly) β β β β What can a relay server potentially do? β β β β β’ Record your code content β β β’ Steal API credentials β β β’ Inject malicious commands β β β’ Abuse your device as an attack node β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1. Code sensitivity grading1. Code sensitivity grading
text βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β Public projects/learning code -> any approach is acceptableβ β β β Private projects -> prefer SSH+Tailscale or self-hosted β β β β Commercial code -> use SSH+Tailscale only, disable all β β third-party relay paths β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2. Key management2. Key management
bash # do not hard-code keys in source const apiKey = "sk-ant-xxxxx" # use environment variables const apiKey = process.env.ANTHROPIC_API_KEY # use .env files (add to .gitignore) ANTHROPIC_API_KEY=sk-ant-xxxxx
3. Use sandbox mode3. Use sandbox mode
Claude Code supports sandbox mode to limit access scope:Claude Code supports sandbox mode to limit access scope:
bash claude --sandbox /path/to/project
4. Self-host relay4. Self-host relay
If using Happy Coder, consider self-hosting relay:If using Happy Coder, consider self-hosting relay:
bash # clone project (includes server implementation) git clone https://github.com/slopus/happy.git cd happy # deploy server to your VPS # follow project documentation for details
5. Use Headscale5. Use Headscale
Headscale is an open-source implementation of Tailscale and can be self-hosted:Headscale is an open-source implementation of Tailscale and can be self-hosted:
bash # one-command Docker deployment docker run -d \ --name headscale \ -v /srv/headscale:/etc/headscale \ -p 3478:3478/udp \ -p 8080:8080 \ headscale/headscale:latest
------
Most modern approaches do not require manual NAT traversal:Most modern approaches do not require manual NAT traversal:
| Approach | Principle |
|---|---|
| Happy Coder | Relay mode, both sides actively connect to server |
| HAPI | Relay mode, WireGuard + TLS |
| Tailscale | NAT hole-punching or relay |
| iOS App | Cloud execution |
| Claude Code UI | Requires inbound access |
text Outbound connection (NAT allows): Computer βββΊ Relay Server yes Inbound connection (NAT blocks): External βββΊ Computer no Relay trick: Both sides make outbound connections to the relay, so neither side needs inbound connectivity.
Different approaches consume different power:Different approaches consume different power:
| Approach | Power Usage | Reason |
|---|---|---|
| SSH terminal | Low | Text-only rendering |
| iOS App | Medium | Cloud execution, phone controls only |
| Termux | High | Local CLI runtime |
| Browser | Medium | Web UI rendering load |
For long sessions, keep your phone charging.For long sessions, keep your phone charging.
| Approach | Impact of Network Disconnect |
|---|---|
| SSH + Tmux | Claude keeps running; recover on reconnect |
| Happy Coder | Auto-reconnect |
| HAPI | Auto-reconnect |
| iOS App | Cloud continues; app shows disconnect |
| Termux | Session interruption |
Not recommended. Phone CPU and memory are limited, and large builds can cause:Not recommended. Phone CPU and memory are limited, and large builds can cause:
Run heavy build tasks on remote hosts or cloud environments.Run heavy build tasks on remote hosts or cloud environments.
------
The core idea of Claude Code mobile development is: the phone is the controller, and real development runs elsewhere.The core idea of Claude Code mobile development is: the phone is the controller, and real development runs elsewhere.
Which approach you should choose depends on your specific needs.Which approach you should choose depends on your specific needs.
If you are in mainland China, Happy Coder is recommended, especially when paired with domestic API relay configuration.If you are in mainland China, Happy Coder is recommended, especially when paired with domestic API relay configuration.
If you want the most convenient setup, use Happy Coder. Scan to connect, get push notifications, and switch devices smoothly.If you want the most convenient setup, use Happy Coder. Scan to connect, get push notifications, and switch devices smoothly.
If you need multi-model support or local-first architecture, use HAPI. It supports multiple assistants and self-hosted relay.If you need multi-model support or local-first architecture, use HAPI. It supports multiple assistants and self-hosted relay.
If you want the most complete development experience, use SSH + Tailscale. Setup is more complex, but capability is closest to desktop.If you want the most complete development experience, use SSH + Tailscale. Setup is more complex, but capability is closest to desktop.
If you are an iOS user outside mainland China, the official app is the easiest way to begin.If you are an iOS user outside mainland China, the official app is the easiest way to begin.
If you are an Android user, Termux enables fully local development on the phone.If you are an Android user, Termux enables fully local development on the phone.
If you do not have an always-on computer, cloud DevBox is the ideal option.If you do not have an always-on computer, cloud DevBox is the ideal option.
No matter which solution you choose, security matters: be cautious with third-party relay for sensitive code, manage API keys properly, and prefer self-hosted or private paths for important projects.No matter which solution you choose, security matters: be cautious with third-party relay for sensitive code, manage API keys properly, and prefer self-hosted or private paths for important projects.
------