Claude Code guide · Chapter 2 of 10
Where Claude Code runs: on your computer, in the cloud, over SSH or remotely
Claude Code is always the same agent, but it never works in the air: it runs inside another environment. That can be your computer, an Anthropic machine in the cloud, a server of yours over SSH or your own computer steered remotely with Remote Control. The environment decides which files it sees, what internet it reaches, which keys it has and whether it keeps going when you turn your computer off.

Chapter 2 of 10 · See all
Where Claude Code runs in 6 quick answers
The essentials of this chapter, checked in the official Claude Code docs on Nov 18, 2026.
- Where can it run? In four places: on your computer (local), on an Anthropic machine (cloud), on a server of yours over SSH and, on Windows, inside WSL. With Remote Control you can also steer a session on your computer from somewhere else.
- Is it the same Claude Code everywhere? Yes. The docs put it this way: the engine is the same everywhere; what changes is the interface and where the code runs.
- What really changes? Which files it sees, which parts of the internet it can reach, which keys it has and whether it keeps working when you turn your computer off.
- Which one is the easiest? Local, in the desktop app or the terminal. It installs in a couple of minutes.
- Which one keeps going when I close my laptop? The cloud. An SSH session can also keep going while the app is disconnected.
- What about my phone? Your phone runs nothing: it is the remote. From the Code tab of the Claude app you start cloud sessions or steer a session on your computer with Remote Control.
Claude Code is an environment inside another environment
This is the idea that makes everything else easier. Claude Code is not a program floating in the air: it is a development environment, an agent with its tools (read files, edit them, run commands, search the web), that always works inside another environment: a specific computer, with its files, its network and its permissions.
- Development environment
- The computer where the code work happens: its folders, its installed tools, its internet connection and its permissions.
- Session
- A working conversation with Claude Code. Each session has its history and its project folder, and runs in the environment you picked when you started it.
- Remote Control
- The feature that connects the browser or your phone to a session running on your own computer. Your computer still does the work.
When you open Claude Code on your laptop, the environment is your laptop: it sees your folders and goes online through your network. When you start a cloud session, the environment is an Anthropic virtual machine that clones your GitHub repository. When you connect over SSH, the environment is your server. The agent is the same; what changes is the house it works in.
The desktop app makes this very clear: before you start a session, you pick the environment in the first selector under the message box, and that selector groups the options into Local, Cloud, SSH and, on Windows, WSL.
The four places, one by one
Your computer. Claude Code runs on your Mac, your Windows PC or your Linux machine, with direct access to your files and your network. You use it from the terminal (the claude program), from editors like VS Code or the JetBrains IDEs, or from the Code tab of the desktop app. It is the most complete option and the easiest way to start. If you close your computer, it stops.
Windows has one more variant: WSL, which runs Claude Code inside a Linux distribution on your own PC, with Linux tools and paths.
An Anthropic machine. The session runs on an Ubuntu virtual machine created for that session, clones your GitHub repository and pushes a branch when it is done. It keeps going when you close your laptop, you can run several at once and you steer it from claude.ai/code, the desktop app or your phone. It uses your plan limits, with no separate charge for the machine.
Which parts of the internet it can reach, what it installs when it starts and which keys it uses without seeing them is set by its cloud environment, which you configure.
A server of yours. In an SSH session, Claude Code runs on a remote machine (a server, a cloud VM or a dev container) and you use the desktop app as the interface. The machine can run Linux, macOS or Windows, and the app installs Claude Code on it the first time you connect.
It is useful when the code lives on that machine, when you need more power or specific hardware, or when the data must not leave your own infrastructure.
How to set it up: chapter 7.
Your computer, from somewhere else. Remote Control connects claude.ai/code or the Claude mobile app to a session running on your computer. The code still runs on your machine, with your files, your tools and your MCP servers; the phone or the browser is just a window. That is why your computer has to stay on, with Claude Code open.
You start it with claude remote-control in the terminal or with /remote-control inside a session. It is available on the Pro, Max, Ultra, Team and Enterprise plans; it does not work with an API key.
How to use it from your phone: chapter 8.
The table to choose
| Local | Cloud | SSH | Remote (Remote Control) | |
|---|---|---|---|---|
| Where the code runs | Your computer | An Anthropic virtual machine | Your server or your container | Your computer |
| Which files it sees | Your folders | A copy of your GitHub repository | The folders on that machine | Your folders |
| Network | Your computer’s | The one you set in the environment | That machine’s | Your computer’s |
| If you turn your computer off | It stops | It keeps going | It can keep going for a while | It stops |
| Where you steer it from | Terminal, editor or desktop app | Browser, desktop app, phone or terminal | Desktop app (or the terminal over SSH) | Browser or phone, plus your computer |
| Needs GitHub | No | Yes, for your repository | No | No |
| What I would use it for | Getting started, and anything that needs your files | Long tasks, in parallel and from your phone | Code that lives on a server or needs a bigger machine | Following from the couch something already running on your computer |
The official docs group the surfaces another way, by how you like to work: the terminal for people who live on the command line, the desktop app for calm review, the editors so you don’t switch windows, the web for long tasks and your phone to start and watch tasks while you are away. Both views fit together: one says where you use it from; the other, where it really works.
What travels with you and what doesn’t
Since the agent is the same, a lot of what you set up works everywhere. But not all of it:
- In local environments (terminal, editor, desktop), the settings, the project memory and the MCP servers are shared across surfaces. What you set up in the terminal is there in VS Code.
- In the cloud, the session starts from scratch with a copy of your repository. What is in the repository gets there: your
CLAUDE.md, the skills and the settings in the.claude/folder. What you only have on your computer does not, like your personal preferences or the plugins you installed locally. - Over SSH, it works with what is on that machine: its tools, its
gitand its credentials. You have to prepare there whatever you need.
The rule of thumb: whatever you want everywhere, keep it in the repository. The repository is the project’s memory that travels from one environment to another.
An example: one project in three environments
Picture a recipe website stored on GitHub. On a single day it can go through three places:
- In the morning, local. You open the Code tab on your laptop and ask Claude Code to change the home page. You see the site in the app preview and approve the change.
- At noon, in the cloud. Before you head out, you start a cloud session from your phone: “go through the 120 recipes and flag the ones with no prep time”. It works with the laptop closed and leaves you a branch with the changes.
- In the afternoon, over SSH. To regenerate every photo at high quality you need a bigger machine, so you open an SSH session on a more powerful server.
All three sessions are Claude Code. What changes is the house: your folders, an Anthropic machine or your server. And with the house, the permissions change too. That is why the next chapters talk so much about environments: choosing where Claude Code runs is choosing what it can touch.
Common mistakes
- Thinking your phone runs Claude Code. It doesn’t: your phone is a client. It either sends work to the cloud or steers your computer with Remote Control.
- Mixing up the cloud and Remote Control. In the cloud, an Anthropic machine does the work and keeps going when you turn your computer off. With Remote Control your computer does the work, so it has to stay on.
- Expecting your local setup in the cloud. A cloud session only sees your repository. If you need something everywhere, put it in the repository.
- Giving every environment the same permissions. An environment that reads websites and one that publishes should not have the same keys. I explain why in chapter 9.
- Using SSH without preparing the machine. The app installs Claude Code, but
git, theghtool and their credentials have to be ready there before you open a pull request.
What I would keep in mind
For a long time I worked only locally, with everything on my Mac. It works, but it has a clear limit: if the laptop is closed, nothing happens. What changed things most for me was understanding that the agent and the environment are two different things, and that I can pick the house for each task.
My order, if you start today:
- Local first, with the desktop app or the terminal, on a project that is not sensitive. It is where you best see what Claude Code does.
- Then the cloud, with the project on GitHub, for long tasks and for working from your phone.
- SSH only if you need it: a server with your data, more power or specific hardware.
- Remote Control to follow from elsewhere something that is already running on your computer.
And one idea for the rest of the guide: each environment is a different door. The more doors you open, the more it matters to decide which key each one gets.
FAQ
Where can Claude Code run?
On your computer (Mac, Windows or Linux), from the terminal, an editor like VS Code or the desktop app; on an Anthropic virtual machine in the cloud, from claude.ai/code, the desktop app or your phone; on a server of yours over SSH, with the desktop app as the interface; and on Windows, inside WSL. With Remote Control you steer a session on your computer from somewhere else.
What is the difference between Claude Code remote control and the cloud?
In the cloud, the session runs on an Anthropic machine with a copy of your GitHub repository and keeps going when you turn your computer off. With Remote Control, the browser or your phone connects to a session running on your own computer, with your files and your network, so your computer has to stay on with Claude Code open.
Does Claude Code work the same everywhere?
The engine is the same on every surface, according to the official docs. What changes is the interface, where the code runs and what it has at hand: your folders and your network locally, a copy of the repository and the network you set up in the cloud, or whatever is installed on a server over SSH.
What is an SSH session in Claude Code?
A session where Claude Code runs on a remote machine (a server, a cloud VM or a dev container) while you use the desktop app as the interface. The machine can run Linux, macOS or Windows, and the app installs Claude Code on it the first time you connect. Chapter 7 explains how to set it up.
Can I run Claude Code on my phone?
Your phone does not run Claude Code: it is a client. From the Code tab of the Claude app for iPhone and Android you start and review sessions that run in the cloud, or you use Remote Control to steer a session that runs on your computer.
Which Claude Code environment should I start with?
Local: the desktop app or the terminal on your computer, with a project that is not sensitive. It is the simplest and where you best see what Claude Code does. Once the project is on GitHub, the cloud is great for long tasks, parallel work and working from your phone.
Does my Claude Code setup reach the cloud?
Only what is in the repository: the CLAUDE.md, the skills, the settings in the .claude/ folder and the project MCP servers. What you only have on your computer does not, like your personal preferences or locally installed plugins. Across local surfaces, the settings and project memory are shared.
Sources
- Claude Code Docs, Platforms and integrations (checked Nov 18, 2026)
- Claude Code Docs, Desktop application: environment configuration and SSH sessions (checked Nov 18, 2026)
- Claude Code Docs, Remote Control (checked Nov 18, 2026)
- Claude Code Docs, Get started with Claude Code in the cloud (checked Nov 18, 2026)
- Claude Code Docs, Configure cloud environments (checked Nov 18, 2026)
- Claude Code Docs, Claude Code on mobile (checked Nov 18, 2026)