# 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 Peruzzo · Published November 8, 2026\
https://concors.dev/guides/run-claude-code-24-7

## In short

-   Claude Code is a process on a computer. When that computer sleeps or the process stops, the session goes offline.
-   Remote Control lets you steer a session from the Claude app on your phone, but the computer running it has to stay on. Anthropic’s cloud sessions keep going with the laptop closed, for Claude Code only, until they sit idle.
-   For agents, dev servers and terminals that run for days, use a machine that stays on: a computer at home, a VPS (Remote Control works there too, inside tmux), or a managed machine.

## 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](https://code.claude.com/docs/en/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.

> **Can I run more than one session?**
>
> Yes, in server mode. `claude remote-control` serves up to 32 sessions at once by default (`--capacity` changes that). Add `--spawn worktree` and each new session gets its own Git worktree, so two sessions don’t edit the same files.

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](https://concors.dev/guides/claude-code-remote-control).

## 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](https://code.claude.com/docs/en/claude-code-on-the-web) (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 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.

> **Already have one?**
>
> Concors runs on your own computer for free, with no account, so a Mac mini or Linux box you leave on can be your always-on machine. The Concors client on your laptop shows its agents, terminals and dev servers in one window.

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

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

> **What Anthropic’s terms say about hosting Claude Code**
>
> Anthropic’s rules stop third-party developers from offering Claude.ai login in their own apps or handling your Claude credentials. They also say this does not “prevent an end user from signing in to the unmodified Claude Code binary with their own Claude subscription, including where a platform hosts Claude Code,” and that plan usage limits “assume ordinary, individual usage of Claude Code and the Agent SDK.” Read the [full text](https://code.claude.com/docs/en/legal-and-compliance) before you automate anything heavy.

## 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.](https://concors.dev/assets/concors-claude-code-chat-beside-test-watcher-ByShUko4.webp)

*A Claude Code session in Concors beside the test watcher it just updated. On a machine, both keep running after you close the app.*

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

> **Only need it while your computer is on?**
>
> Concors also runs on your own computer for free, with no account. You get the same agents, terminals and previews in one window; they just stop when your computer does.

## 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

### Does Claude Code keep running when I close my laptop?

No. Claude Code runs as a process on your computer, so it stops when the computer sleeps or the process ends. To keep it running with your laptop closed, run it on a computer that stays on, such as a VPS or a managed machine, or use a Claude Code cloud session.

### What is Claude Code Remote Control?

Remote Control lets you continue a Claude Code session that runs on your own computer from the Claude mobile app or a browser. The session stays on your machine, so it goes offline if that computer sleeps or the claude process stops.

### Which plans include Claude Code Remote Control?

Pro, Max, Ultra, Team and Enterprise. API keys are not supported. On Team and Enterprise, an Owner has to turn Remote Control on in the Claude Code admin settings first.

### 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 can start a cloud session on a GitHub repo, or open a session running on your computer through Remote Control.

### Can I use Remote Control with my laptop closed?

Only if the session runs on a different computer that stays on. Remote Control connects your phone or browser to a Claude Code process on a machine; if that process stops or the machine goes offline, the session goes offline too.

### Can I run Claude Code Remote Control on a VPS?

Yes. Sign in with claude auth login, start claude remote-control inside tmux, and detach. Anthropic recommends tmux or screen on a remote machine so the session keeps running after you disconnect from SSH. A claude setup-token token can’t start Remote Control.

### How many Remote Control sessions can I run at once?

In server mode, claude remote-control serves up to 32 concurrent sessions by default, and --capacity changes the limit. Otherwise each Claude Code process has one remote session.

### Is Claude Code Remote Control secure?

Your machine only makes outbound HTTPS requests and never opens inbound ports; traffic goes through the Anthropic API over TLS. Code runs on your machine.

### How do I keep Claude Code running on a VPS after I disconnect?

Start it inside tmux or screen. Run tmux new -s agent, start claude, and detach with Ctrl-b d. Reattach later with tmux attach -t agent.

### Can I use claude setup-token on a server?

Yes, for scripts and CI. Set the printed one-year token as CLAUDE\_CODE\_OAUTH\_TOKEN. It can only make model requests, so Remote Control needs a regular claude auth login instead.

### Can Claude Code keep running in the cloud?

Yes. Claude Code cloud sessions run on Anthropic-managed VMs on Pro, Max, Ultra and Team plans, and for Enterprise premium or Chat + Claude Code seats, and keep running after you close your laptop. They count toward your plan’s usage limits, clone from GitHub and run Claude Code only. After a few minutes without activity the VM pauses, and a paused VM can later be reclaimed.

### Can Claude Code run tasks on a schedule with my computer off?

Yes, with cloud scheduled tasks. They run on Anthropic’s cloud at most once an hour and use your plan’s usage. Desktop scheduled tasks and /loop need your machine on. A Concors schedule runs on a Concors Cloud machine every 15 minutes or more, for Claude Code, Codex or OpenCode.

### How much RAM does a VPS for Claude Code need?

Anthropic’s minimum is 4 GB of RAM. Size above that for your project’s builds, tests and dev servers.

### What is the best always-on machine for Claude Code?

It depends on who you want to look after it. A Mac mini or Linux mini PC at home is a one-time cost but relies on your home power and internet. A VPS is always on but you manage the server. A managed machine, such as a Concors Cloud machine, stays on and is maintained for you at a monthly price.

### Does this work for Codex and OpenCode too?

Yes. A VPS or a managed machine can run any terminal agent. Concors runs Claude Code, Codex and OpenCode with your own accounts on the same machine.

## Sources

-   [Claude Code docs: Remote Control](https://code.claude.com/docs/en/remote-control)
-   [Claude Code docs: Authentication](https://code.claude.com/docs/en/authentication)
-   [Claude Code docs: Use Claude Code in the cloud](https://code.claude.com/docs/en/claude-code-on-the-web)
-   [Claude Code docs: Cloud environments (resource and time limits)](https://code.claude.com/docs/en/cloud-environments)
-   [Claude Code docs: Scheduled tasks](https://code.claude.com/docs/en/scheduled-tasks)
-   [Claude Code docs: Cloud scheduled tasks (routines)](https://code.claude.com/docs/en/routines)
-   [Claude Code docs: Claude Code on mobile](https://code.claude.com/docs/en/mobile)
-   [Claude Code docs: Setup and system requirements](https://code.claude.com/docs/en/setup)
-   [Claude Code docs: Legal and compliance](https://code.claude.com/docs/en/legal-and-compliance)
-   [DigitalOcean Droplet pricing](https://www.digitalocean.com/pricing/droplets)
-   [Concors docs: machines, agent accounts and schedules](https://docs.concors.dev/llms-full.txt)
-   [Concors changelog](https://concors.dev/changelog)
