Skip to content
All guides

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 17 min read

Banner reading “How to keep Claude Code running 24/7”, with the Claude Code icon and a “Still running” status.

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 claude and 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-control

Server 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”.

  1. Install the Claude app

    On iOS or Android.

  2. Sign in with the same account

    Use the account and organization you use in the terminal.

  3. Allow notifications

    When your phone asks.

  4. Turn on push in Claude Code

    Run /config and 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 --teleport pulls 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 tasksDesktop scheduled tasks/loopConcors Schedules
Runs onAnthropic’s cloudYour machineYour machineThe Concors machine you pick
Needs your computer onNoYesYesNo, on a Concors Cloud machine
Needs an open sessionNoNoYesNo
Minimum interval1 hour1 minute when Claude sets it, 1 hour in the forms1 minute15 minutes
Local filesNo (fresh clone each run)YesYesYes (the machine’s workspace)
AgentsClaude CodeClaude CodeClaude CodeClaude 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 client

What 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:

JobWhat it takes
Remote accessSSH keys, or a private network such as Tailscale or WireGuard. Don’t expose agent or dev-server ports to the internet.
Many sessionsA tmux window per agent, test runner and dev server, and remembering which is which.
PreviewsPort forwarding, or a reverse proxy with authentication, to see the app your agent is building.
UpkeepOS and agent CLI updates, disk space, and restarting everything after a reboot.
Your phoneThe 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:

MethodUse it forLimits
claude auth loginInteractive work, Remote Control and cloud sessionsRenew it when Claude Code warns that your login expires in 3 days
claude setup-tokenScripts 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_KEYAutomation billed by usage through the Claude ConsoleRemote 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 --continue brings 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:

  1. 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.

  2. 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.

  3. 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.

The Concors app: a Claude Code chat that read and edited src/lib/price.test.ts to add a rounding test, next to a terminal where Vitest re-ran and shows 6 tests passing, with the project's dev server listed under Previews in the sidebar.
A Claude Code session in Concors beside the test watcher it just updated. On a machine, both keep running after you close the app.
SizevCPURAMDisk
small24 GB40 GB
medium48 GB75 GB
large612 GB100 GB
xlarge824 GB200 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 couchRemote Control on that computer, left awake
Hand off a task on a GitHub repo and close the laptopA Claude Code cloud session
Run a prompt every night with nothing of yours switched onA cloud scheduled task (at most once an hour)
Keep a dev server, database or long job running for daysAn always-on machine: a computer at home, a VPS or a managed machine
Use the Claude app with an always-on machineRemote Control on a VPS, inside tmux
Run Codex and OpenCode next to Claude CodeA VPS or a managed machine; Remote Control and cloud sessions are Claude Code only
Skip server upkeep and get previews includedA managed machine such as a Concors Cloud machine
Remote ControlCloud sessionMac mini at homeVPS + tmuxManaged machine
Runs with your laptop closedOnly if another computer of yours stays onYes, until it sits idleYes, while home power and internet are upYesYes
Codex and OpenCodeNo, Claude Code onlyNo, Claude Code onlyYesYesYes
Who maintains the serverYou (your computer)AnthropicYouYouThe provider
Dev server previewsNot includedNot includedYou set them up, or run Concors on itYou set them upIncluded in Concors
From your phoneClaude appClaude app (Code tab)Remote Control or an SSH appRemote Control or an SSH appConcors for iOS (App Store)

Why isn’t Remote Control working?

You seeWhat it meansFix
“Remote Control requires a claude.ai subscription”You’re signed out, or an API key or token is overriding your loginRun 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 tokenRun claude auth login
“Remote Control is only available when using Claude via api.anthropic.com”Bedrock, Google Cloud, Foundry or a custom ANTHROPIC_BASE_URLUnset the variable it names and restart
“Remote Control is disabled by your organization’s policy”It’s off by default on Team and EnterpriseAsk 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 commandThe VM was reclaimed after sitting idleReopen 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 checkoutPush the branch and start a new session

Questions

Written by

Pierlorenzo Peruzzo

Engineer at Hologram, working on Concors

WebsiteGitHub

Sources

More guides

Let your agents
keep working.

Claude Code, Codex and OpenCode on a machine that stays on. Free on your own computer, no account needed.

Desktop app for macOS (Apple Silicon), Windows (x64) and