How-to
Claude Code 24/7: Remote Control, cloud or your own machine
Claude Code stops when the computer running it sleeps. How to set up Remote Control, use Claude Code from your phone, and keep it working overnight: Anthropic’s cloud sessions, a Mac mini at home, a VPS, or a managed machine.
By Pierlorenzo Peruzzo17 min read

Why does Claude Code stop when I close my laptop?
Claude Code runs where you start it. Close the lid and the laptop sleeps. Close the terminal and the process ends. Switch networks and the connection drops. Each of those stops the session, and with it the tests, dev server and anything else you started next to it.
So the question isn’t really how to keep Claude Code running. It’s which computer it should run on. There are five answers: the computer you already use, left on (with Remote Control); Anthropic’s cloud (Claude Code only); a computer at home that stays on, like a Mac mini; a server you rent and look after (a VPS); or a machine someone else keeps running for you.
How do I set up Claude Code Remote Control?
Remote Control connects the Claude app on your phone, or claude.ai/code in a browser, to a Claude Code session running on your machine. The session keeps running locally, so your files, tools and MCP servers stay available.
Before you start, check three things:
- Your plan. Anthropic says it’s available on Pro, Max, Ultra, Team and Enterprise plans, and “API keys are not supported.” On Team and Enterprise, an Owner has to turn Remote Control on in the Claude Code admin settings first.
- Your sign-in. Sign in through claude.ai: run
claudeand use/login. - Your API endpoint. It only works through api.anthropic.com, not through Amazon Bedrock, Google Cloud, Microsoft Foundry or a custom
ANTHROPIC_BASE_URL.
Then start it one of three ways:
# Server mode: waits for connections, can serve several sessions
claude remote-control
# A normal interactive session that you can also reach remotely
claude --remote-control "My Project"
# Inside a session that's already running
/remote-controlServer mode prints a URL; press the spacebar to show a QR code and scan it with your phone. Or open the Claude app, tap Code and pick the session from the list. If you don’t have the app yet, run /mobile in Claude Code for a QR code to the app store.
Remote Control doesn’t move the work anywhere. In Anthropic’s words, it “runs as a local process. If you close the terminal, quit the Desktop app or VS Code that runs the session on your machine, or otherwise stop the claude process, the session goes offline until you bring it back.” A laptop in your bag takes its sessions offline with it. Remote Control is a Claude Code feature, so Codex and OpenCode need their own setup.
For every flag, starting new sessions from your phone, what happens when the Wi-Fi drops and how to fix each error, see our Claude Code Remote Control guide.
How do I use Claude Code from my phone?
Install the Claude app for iOS or Android, sign in with the account you use for Claude Code, and tap Code. From there you have two choices: start a cloud session on a GitHub repo, or open a session running on your own computer through Remote Control.
With Remote Control on, Claude Code can also send a push notification when a long task finishes or when it needs a decision from you. You can ask for one in your prompt, for example “notify me when the tests finish”.
Install the Claude app
On iOS or Android.
Sign in with the same account
Use the account and organization you use in the terminal.
Allow notifications
When your phone asks.
Turn on push in Claude Code
Run
/configand enable Push when Claude decides, Push when actions required, or both.
If nothing arrives and /config shows No mobile registered, open the Claude app once. On iOS, check that a Focus mode isn’t holding notifications; on Android, exempt the Claude app from battery optimization.
Can Claude Code run in the cloud?
Yes, if Claude Code is the only agent you need. A cloud session (also called Claude Code on the web) runs on a virtual machine Anthropic manages instead of on your computer, and it keeps running after you close your laptop. Start one at claude.ai/code, from the Code tab in the Claude mobile or desktop app, or with claude --cloud "your task" in the terminal.
Cloud sessions are available on Pro, Max, Ultra and Team plans, and for Enterprise users with premium or Chat + Claude Code seats. They count toward your plan’s usage limits, with no separate charge for the VM. Each session gets a fresh Ubuntu 24.04 VM with roughly 4 vCPUs, 16 GB of RAM and 30 GB of disk, limits Anthropic says may change, and clones your repo from GitHub.
Long-running processes are where it differs most from your own machine:
- “After a few minutes without activity, a session’s VM pauses with its files saved, and a paused VM can later be reclaimed.”
- When a reclaimed session reopens, your conversation comes back, but shell commands and subagents that were still running don’t.
- From the CLI the handoff is one-way:
claude --teleportpulls a cloud session into your terminal, but you can’t push a running terminal session to the cloud.
That suits a task that finishes. It suits a dev server or database you want still running tomorrow less well.
Can Claude Code run on a schedule while I’m away?
Yes, but only one of Anthropic’s three kinds of scheduled work runs with your computer off:
| Cloud scheduled tasks | Desktop scheduled tasks | /loop | Concors Schedules | |
|---|---|---|---|---|
| Runs on | Anthropic’s cloud | Your machine | Your machine | The Concors machine you pick |
| Needs your computer on | No | Yes | Yes | No, on a Concors Cloud machine |
| Needs an open session | No | No | Yes | No |
| Minimum interval | 1 hour | 1 minute when Claude sets it, 1 hour in the forms | 1 minute | 15 minutes |
| Local files | No (fresh clone each run) | Yes | Yes | Yes (the machine’s workspace) |
| Agents | Claude Code | Claude Code | Claude Code | Claude Code, Codex, OpenCode |
Cloud scheduled tasks are in research preview. Create them at claude.ai/code/routines or with /schedule in the CLI; they “draw down subscription usage the same way interactive sessions do”. A /loop you don’t cancel ends after seven days.
One difference matters for ongoing work: each cloud run is a new session on a fresh clone, while a Concors schedule can reuse one dedicated conversation on the machine, so each run picks up where the last one left off.
Can I use a Mac mini or another computer at home?
Yes. A small computer that stays on at home, such as a Mac mini or a Linux mini PC, is a popular answer, and you only pay for the hardware once. Run your agents on it inside tmux, reach it from your laptop over SSH, and check in from your phone with Remote Control (for Claude Code) or an SSH app.
The trade-offs are the ones that come with owning a server:
- It depends on your home power and internet. An outage or a router restart takes your agents offline until you are back.
- Reaching it from outside needs a private network such as Tailscale or WireGuard. Don’t open its ports to the internet.
- Updates, disk space and restarting things after a reboot are yours, the same as on a VPS.
How do I run Claude Code 24/7 on a VPS?
Rent a small Linux server, install your agents, and run each one inside tmux so it keeps going after you disconnect:
# on the server
sudo apt update && sudo apt install -y tmux git
curl -fsSL https://claude.ai/install.sh | bash # Claude Code's native installer
tmux new -s agent # start a named session
claude # sign in, then give it a task
# detach with Ctrl-b d: the agent keeps working
tmux attach -t agent # pick it up later from any SSH clientWhat size? Anthropic lists 4 GB of RAM or more as Claude Code’s minimum, on Ubuntu 20.04+, Debian 10+ or Alpine 3.19+. The CLI itself is light; your builds, tests and dev servers are what use the memory, so size the server for the project. You pay twice: your Claude plan for the model, wherever Claude Code runs, and the provider for the machine. For example, DigitalOcean lists a Droplet with 2 vCPUs, 4 GiB of RAM and 80 GiB of disk at $24 a month (checked November 8, 2026). A bigger server doesn’t buy more Claude usage.
This is a solid setup, and plenty of people run it. The agent is the easy part. The rest is the work you take on:
| Job | What it takes |
|---|---|
| Remote access | SSH keys, or a private network such as Tailscale or WireGuard. Don’t expose agent or dev-server ports to the internet. |
| Many sessions | A tmux window per agent, test runner and dev server, and remembering which is which. |
| Previews | Port forwarding, or a reverse proxy with authentication, to see the app your agent is building. |
| Upkeep | OS and agent CLI updates, disk space, and restarting everything after a reboot. |
| Your phone | The Claude app via Remote Control (below), or an SSH app. |
How do I sign in to Claude Code on a VPS?
A server has no browser, and you don’t need one. Run claude auth login: Claude Code prints a login URL to open on your laptop or phone. “If your browser shows a login code instead of redirecting back after you sign in, paste it into the terminal at the Paste code here if prompted prompt.”
There are three ways to authenticate on a server:
| Method | Use it for | Limits |
|---|---|---|
claude auth login | Interactive work, Remote Control and cloud sessions | Renew it when Claude Code warns that your login expires in 3 days |
claude setup-token | Scripts and CI where browser login isn’t available (a one-year token, set as CLAUDE_CODE_OAUTH_TOKEN) | It “can only make model requests, so it can’t establish Remote Control sessions” |
ANTHROPIC_API_KEY | Automation billed by usage through the Claude Console | Remote Control doesn’t support API keys |
For unattended sessions, keep an eye on the login: a Remote Control session “that outlives the login stops making progress once the credential expires and can’t recover until you sign in again.”
Can I run Remote Control on a VPS?
Yes, and it’s the most comfortable way to reach an always-on server from your phone: the server stays on, and the Claude app gives you the chat, approvals and diffs instead of a terminal on a small screen. Anthropic’s docs recommend it: “If you run claude from a terminal on a remote machine, start it inside tmux or screen to keep the session running after you disconnect from SSH.”
# on the server, in your project folder
tmux new -s rc
claude remote-control --name "my-vps" --spawn worktree
# answer the one-time prompts, then detach with Ctrl-b d- Sign in with
claude auth login, not a setup token (see above). - Answer the first-run questions in a terminal. In a folder you haven’t trusted, it asks whether to trust it, and the first time it asks to enable Remote Control. Without a terminal to answer, it exits with “Workspace not trusted”. Run it from a project folder, not your home directory.
- Network outages end server mode. If the server can’t reach the network for about 10 minutes, the process exits. Start it again, or let a service manager such as systemd restart it. After a restart,
claude remote-control --continuebrings back the previous session for about four hours.
What about a managed machine that stays on?
A managed machine gives you the always-on part of a VPS without the upkeep. Before you pick one, check whether its machines sleep when idle (that stops long-running agents and dev servers) and whether it bills a flat monthly price or by the hour.
Here is how it works in Concors, a desktop app for macOS, Windows and Linux:
Create a machine
In Settings → Machines → New machine, pick a region (United States, Europe or Canada), a size and the tools to install: Node.js, Python and uv, Go, Rust, Docker.
Start your agents
Open a workspace on the machine and start Claude Code, Codex or OpenCode. To sign in, the agent pane shows the CLI’s own login link; Concors keeps no copy of your provider credentials. Start the dev server in a terminal next to them.
Close the app
Agents, terminals and the dev server keep running on the machine. When you open the app tomorrow, each session is where you left it.

| Size | vCPU | RAM | Disk |
|---|---|---|---|
| small | 2 | 4 GB | 40 GB |
| medium | 4 | 8 GB | 75 GB |
| large | 6 | 12 GB | 100 GB |
| xlarge | 8 | 24 GB | 200 GB |
Machines run Ubuntu 24.04 and are billed monthly; the price is shown before you confirm. Dev servers on the machine appear under Previews at an address only your account can open. Schedules can run a saved prompt on an interval, daily or weekly, with the app closed.
Which option should you pick?
| If you want to… | Use |
|---|---|
| Steer a session on your desk from the couch | Remote Control on that computer, left awake |
| Hand off a task on a GitHub repo and close the laptop | A Claude Code cloud session |
| Run a prompt every night with nothing of yours switched on | A cloud scheduled task (at most once an hour) |
| Keep a dev server, database or long job running for days | An always-on machine: a computer at home, a VPS or a managed machine |
| Use the Claude app with an always-on machine | Remote Control on a VPS, inside tmux |
| Run Codex and OpenCode next to Claude Code | A VPS or a managed machine; Remote Control and cloud sessions are Claude Code only |
| Skip server upkeep and get previews included | A managed machine such as a Concors Cloud machine |
| Remote Control | Cloud session | Mac mini at home | VPS + tmux | Managed machine | |
|---|---|---|---|---|---|
| Runs with your laptop closed | Only if another computer of yours stays on | Yes, until it sits idle | Yes, while home power and internet are up | Yes | Yes |
| Codex and OpenCode | No, Claude Code only | No, Claude Code only | Yes | Yes | Yes |
| Who maintains the server | You (your computer) | Anthropic | You | You | The provider |
| Dev server previews | Not included | Not included | You set them up, or run Concors on it | You set them up | Included in Concors |
| From your phone | Claude app | Claude app (Code tab) | Remote Control or an SSH app | Remote Control or an SSH app | Concors for iOS (App Store) |
Why isn’t Remote Control working?
| You see | What it means | Fix |
|---|---|---|
| “Remote Control requires a claude.ai subscription” | You’re signed out, or an API key or token is overriding your login | Run claude auth login and remove ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN from your shell |
| “Remote Control requires a full-scope login token” | You’re using a claude setup-token token | Run claude auth login |
| “Remote Control is only available when using Claude via api.anthropic.com” | Bedrock, Google Cloud, Foundry or a custom ANTHROPIC_BASE_URL | Unset the variable it names and restart |
| “Remote Control is disabled by your organization’s policy” | It’s off by default on Team and Enterprise | Ask an Owner to turn it on in Claude Code admin settings |
| “Workspace not trusted” | It couldn’t ask the trust question (no terminal) | Run it once in that folder in a terminal and answer y |
| A cloud session lost its running command | The VM was reclaimed after sitting idle | Reopen it at claude.ai/code and ask Claude to rerun the command |
| “Branch <name> is not on GitHub” | claude --cloud clones your GitHub remote, not your local checkout | Push the branch and start a new session |
Questions
Sources
- Claude Code docs: Remote Control
- Claude Code docs: Authentication
- Claude Code docs: Use Claude Code in the cloud
- Claude Code docs: Cloud environments (resource and time limits)
- Claude Code docs: Scheduled tasks
- Claude Code docs: Cloud scheduled tasks (routines)
- Claude Code docs: Claude Code on mobile
- Claude Code docs: Setup and system requirements
- Claude Code docs: Legal and compliance
- DigitalOcean Droplet pricing
- Concors docs: machines, agent accounts and schedules
- Concors changelog



