AI for Automation
🌐 Remote Control — Claude Code Anywhere

Step 22 / 22

🌐 Remote Control — Claude Code Anywhere

Deploy to VPS and access from your phone

Remote Control = Use Claude Code from Anywhere

So far, you’ve been running Claude Code on your own computer. Open the terminal, type claude, and start chatting. That’s the most basic usage.

But what if you want to use Claude Code away from home? From your phone on the commute, a tablet at a cafe, or even while you’re sleeping? That’s possible thanks to Remote Control.

Think of remote work: you connect to your office PC from home. Claude Code remote control is the same concept. Put Claude Code on a server (always-on computer) and connect from your phone or laptop.

Office Remote AccessClaude Code Remote Control
Install remote software on office PCInstall Claude Code on server
Connect from home via remote appConnect via browser or terminal
Office PC must be on 24/7Server must be on 24/7
Need office network securityNeed server access password
Your computer specs don't matterYour device specs don't matter

One-line summary

Remote control = Put Claude Code on a server and connect from any device via browser. Even if your computer is off, Claude keeps working.

Why Do You Need Remote Control?

“I can just use it on my computer, why go remote?” You might think this at first. But in practice, there will come a time when remote control is essential.

📱

Work from Your Phone

On the subway commute, give Claude Code instructions like “summarize morning news” or “continue yesterday’s work.”

🌙

Overnight Automated Work

Tell it “do this for me” before bed and turn off your computer. The server’s Claude Code keeps working. Results are ready when you wake up.

👥

Team Sharing

Multiple team members connect to the same server and work on one project together. No more “it only works on my PC” problems.

💻

Low-Spec Devices OK

Real work happens on the server, so your device can be an old laptop or tablet — anything that runs a browser is enough.

Real-World Scenarios

Scenario 1: Morning Briefing on Commute

Without remote

Boot computer at home, run Claude Code, request news summary, check results, then leave

With remote

Connect from phone on subway, “summarize today’s news” — one sentence

Scenario 2: Overnight Work While Sleeping

Without remote

Must leave computer on all night. Electricity costs, fan noise.

With remote

Assign work to server, turn off your computer. Just check results in the morning!

Scenario 3: Team Project Sharing

Without remote

Everyone works on their own PC, shares results via messenger, wastes time merging

With remote

Everyone connects to the same server and works simultaneously. No file sharing needed.

Do I really need a server?

The key to remote control is “an always-on computer.” This is called a server or VPS (Virtual Private Server). For $5-15/month you can have your own 24/7 server. We’ll cover VPS setup later.

Remote Control = 24/7 AI Assistant

Claude Code works even while you sleep

Starting with --serve Mode

Claude Code has a special --serve mode. Enabling it switches Claude Code to “server mode,” allowing other devices to connect via browser.

If normal mode is “an assistant sitting in front of you,” serve mode is “an assistant waiting in the office, ready to work when you call.”

Basic Startup

Start serve mode (simplest)
claude --serve

One line and Claude Code starts in server mode. By default it listens on localhost:3000. Open http://localhost:3000 in a browser on the same computer.

Allowing External Connections

Default settings only allow connections from the same computer. To connect from a phone or other computer, change the host to 0.0.0.0.

Allow external connections
claude --serve --host 0.0.0.0 --port 3000
OptionDescriptionDefault
--serveStart in server mode(normal mode without it)
--hostIP range to allow connections from127.0.0.1 (self only)
--portPort number to use3000

How to Connect

1
From the same computer

Enter http://localhost:3000 in browser

2
From the same network (home Wi-Fi)

Find server IP, enter http://192.168.x.x:3000

3
From outside (cafe, subway)

Connect via VPS public IP or use Tailscale VPN

Security warning!

Using --host 0.0.0.0 means anyone on the same network can connect. Never do this on public Wi-Fi like at a cafe. For external access, always apply the security settings covered below.

When It’s Useful

Remote control has diverse applications. You don’t need to be a programmer — it works for everyday work automation too.

1. Daily Morning Briefing

Claude Code on the server collects news at 7 AM daily, summarizes it, and sends it via Telegram. You just check your phone on the commute.

Schedule this instruction
Every morning at 7 AM, collect AI, stock, and real estate news,
summarize in 3 key lines, and send via Telegram.

2. Large Data Processing

Need to analyze 1,000 Excel files? Your laptop would take forever, but assign it to the server and turn off your PC.

Assign overnight and sleep
Read all CSV files in the data folder,
aggregate monthly revenue, and create a summary report.
Save to the result folder when done.

3. Shared Team Dev Environment

For team projects, host the project on one server and anyone can connect to work with Claude Code. No more “it doesn’t work on my machine” issues.

Share access info with teammates
# Just share this address with teammates
http://serverIP:3000

4. Emergency Fix from Phone

If a bug hits while you’re out, connect via phone browser and say “fix this error” — it might be resolved on the spot.

Connect from phone browser
The site is throwing a 500 error.
Check logs, find the cause, and fix it.

Server = a computer that never sleeps

The biggest advantage of remote control is 24/7. Whether you’re sleeping, commuting, or on vacation, Claude Code is working on the server. “I don’t have time” is no longer an excuse.

Security Precautions — Must Read

Remote control is convenient, but neglecting security can be disastrous. Leaving Claude Code open on the internet means anyone can connect — like leaving your front door wide open. Follow these security rules.

🔒 1. Password Is Mandatory

Always set up authentication in serve mode. Without a password, anyone who knows the IP can connect and read your files or run code.

Password setup example
# Claude Code's serve mode supports built-in auth
# Configure it to require login on connection
claude --serve --host 0.0.0.0 --port 3000

🛡 2. Restrict Ports with Firewall

Restrict the port (e.g., 3000) via firewall. Allow connections only from your IP for safety.

UFW firewall setup (Linux)
# Allow port 3000 only from your IP
sudo ufw allow from YOUR_IP_ADDRESS to any port 3000

# Verify
sudo ufw status

🔐 3. Use VPN or Tailscale (Highly Recommended)

The safest method. Tailscale VPN creates a secure connection without opening ports to the internet. It’s free and extremely easy to set up.

Tailscale connection (safest)
# After installing Tailscale, connect via VPN internal IP
# No need to open ports to the internet!
http://100.x.x.x:3000

⚠️ 4. Things You Must NEVER Do

These actions can lead to security incidents. Never do them.

Dangerous ActionWhy It's DangerousDo This Instead
Open server without passwordAnyone can connect and manipulate filesAlways set up authentication
--host 0.0.0.0 on public Wi-FiEveryone on the network can accessUse VPN or localhost only
Store API keys in plaintext on serverServer hack = API key leak.env file + permission restrictions
Run as root accountHack compromises entire serverUse a regular user account

Security is annoying but essential!

Don’t think “I have nothing important, it’s fine.” A hacked server can be used for cryptocurrency mining or attacking other servers. 10 minutes of security setup prevents 10 hours of incident response.

3 Security Rules

🔒 Set password  ·  🛡 Restrict firewall  ·  🔐 Use VPN

Setting Up on a VPS

A VPS (Virtual Private Server) is your own 24/7 computer on the internet. Rent one for a few dollars a month. Cheaper than leaving your own computer on all night, and more stable.

Popular VPS Services

ServiceLowest PriceFeatures
Hetzner~$4/moEuropean servers, best value for price
Oracle CloudFree tierFree forever (spec limits apply)
Vultr~$5/moMultiple regions, fast speeds
AWS Lightsail~$5/moAmazon cloud, very stable

VPS Setup Steps

1
Create a server on VPS service

Choose Ubuntu 24.04, smallest spec is enough

2
Connect via SSH

Run ssh root@serverIP in terminal

3
Install Node.js + Claude Code

Same installation process as local

4
Start serve mode

claude --serve --host 0.0.0.0 --port 3000

5
Security setup (firewall + VPN)

Install Tailscale or configure UFW firewall

6
Test browser connection

Connect via http://serverIP:3000 or VPN IP

Step 2: SSH into server
ssh root@SERVER_IP

# With SSH key (more secure)
ssh -i ~/.ssh/my-key.pem root@SERVER_IP
Step 3: Install Node.js + Claude Code
# Install Node.js (Ubuntu)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install Claude Code
npm install -g @anthropic-ai/claude-code

# Verify
claude --version
Step 4-5: Serve mode + Tailscale security
# Install Tailscale (1 line)
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

# Check Tailscale IP
tailscale ip -4

# Start serve mode (Tailscale IP only)
claude --serve --host 0.0.0.0 --port 3000

Strongly recommend Tailscale

Tailscale is a free VPN. Install on both server and your device, and you get a secure private network without any firewall configuration. 1 minute to install, 0 minutes to configure. Best choice for security beginners.

Try It Yourself

Start remote control now. No VPS needed — try it on your own computer first.

Exercise 1: Experience Serve Mode on Your Computer

No VPS required, do this right now.

Step 1: Start serve mode
claude --serve
Step 2: Connect in browser
# Enter in browser address bar
http://localhost:3000
Step 3: Chat
"Hello! Tell me the current date and time."

Exercise 2: Connect from Your Phone

If connected to the same Wi-Fi, you can connect from your phone too.

Step 1: Start with external access
claude --serve --host 0.0.0.0 --port 3000
Step 2: Find your computer's IP
# Windows
ipconfig

# Mac/Linux
ifconfig
Step 3: Open phone browser
# Enter in phone browser
http://COMPUTER_IP:3000

Verification Checklist

If you can’t connect, the firewall may be blocking the port. On Windows, allow port 3000 in “Windows Firewall.” On Mac, check “System Settings > Firewall.”

Tips + Sources

Useful tips for real-world remote control usage.

1. Run in background

To keep Claude Code running after disconnecting SSH, use tmux or screen for session persistence.

Session persistence with tmux
# Create new tmux session
tmux new -s claude

# Start serve mode
claude --serve --host 0.0.0.0 --port 3000

# Detach with Ctrl+B, D (Claude keeps running)
# Reattach later:
tmux attach -t claude

2. Cost-saving tip

Oracle Cloud’s free tier offers a forever-free VPS. ARM servers with 24GB memory and 200GB storage — free. More than enough for Claude Code.

3. Auto-start setup

Configure Claude Code to auto-restart after server reboots. On Linux, register as a systemd service.

systemd service example
# /etc/systemd/system/claude-serve.service
[Unit]
Description=Claude Code Serve
After=network.target

[Service]
User=your-username
ExecStart=/usr/bin/claude --serve --host 0.0.0.0 --port 3000
Restart=always

[Install]
WantedBy=multi-user.target

4. If it’s slow

Server distance affects response time. If using from a specific region, choose a VPS with servers nearby. Vultr has Seoul region; Oracle Cloud has regional options too.

5. Run multiple projects

Run multiple Claude Code instances on different ports from one server. Project A on 3000, Project B on 3001.

Multiple ports
# Project A (port 3000)
cd ~/project-a && claude --serve --port 3000

# Project B (port 3001)
cd ~/project-b && claude --serve --port 3001

Remote Control = Freedom from Time Constraints

Whether sleeping or commuting, Claude Code works on the server. Open a browser from anywhere to connect.

Start on your own computer first

No need to buy a VPS right away. Experience claude --serve on your own computer first. If you think “this is really convenient!” then consider a VPS. Oracle Cloud free tier keeps cost at $0.

References