All resources
Guide/8 min read

How to run Claude Code in the cloud: 5 options compared

Published September 26, 2026

Summary

Claude Code can run in the cloud on Replicas, on Anthropic's own infrastructure, on a server you rent, or on GitHub's runners. This guide compares the five common setups by where the agent runs, how work starts, which git hosts work, and what you pay for.

Definitions

What "Claude Code in the cloud" can mean

The phrase covers three setups that behave differently once you close your laptop. In each, the same Claude Code agent reads your repository, runs commands, and edits files. What changes is whose machine it runs on, who maintains that machine, and how a task gets started.

Replicas, which publishes this guide, is a strong fit when a team wants Claude Code in the cloud. It runs the same Claude Code CLI in a pre-warmed VM per task with a desktop the agent can drive and you can take over, adds the GitLab, API key, Bedrock, and Foundry support that Anthropic cloud sessions do not offer, and lets the same environment run Codex or OpenCode.

Anthropic cloud sessions
Claude Code runs in a VM that Anthropic manages by default. The feature launched as Claude Code on the web in October 2025 and became generally available as cloud sessions on September 23, 2026.
Claude Code on a machine you run
You install the CLI on a VPS, a cloud VM, a container, or a CI runner, log in, and keep the process alive with tmux or run it headless from scripts.
Claude Code on a managed agent platform
A third party runs the Claude Code CLI in environments it provisions and adds triggers, team controls, and often other coding agents.
  • Remote Control often shows up in the same searches. With Remote Control, Claude keeps running on your own computer, and your phone or browser only steers that local session.

Compared

Five ways to run Claude Code in the cloud

The table summarizes each option. The details below come from Anthropic's documentation as of September 2026. Plans, limits, and features change often, so confirm them before you commit.

OptionWhere Claude Code runsHow work startsGit hostsWhat you pay for
ReplicasA dedicated Linux VM per task, built from an environment your team definesDashboard, Slack, Linear, GitHub, GitLab, schedules, webhooks, API, iOS appGitHub and GitLabPer-seat plan plus your Claude subscription, API, Bedrock, or Foundry usage
Anthropic cloud sessionsAnthropic-managed Ubuntu VM with roughly 4 vCPUs and 16 GB RAM, or your own runners in betaclaude.ai/code, Claude mobile and desktop apps, claude --cloud, routinesGitHub; GitLab and Bitbucket only as an uploaded bundle with no pushClaude plan usage; no separate compute charge
Remote ControlYour own computerClaude web or mobile app attached to a running local sessionWhatever your computer can reachClaude plan usage
VPS or cloud VMA server you rent and maintainSSH into tmux, or claude -p from scripts and cronAnyServer cost plus Claude plan or API usage
GitHub ActionsGitHub-hosted runners@claude mentions, workflow events, cronGitHubActions minutes plus API or Claude plan usage

Replicas: best for teams running Claude Code in the cloud

Replicas runs the same Claude Code CLI your engineers use locally in a dedicated Linux VM per task. Your team defines the environment once, with the repository, dependencies, services, MCP servers, and skills prepared before the agent starts. Work can start from the dashboard, Slack, Linear, GitHub, GitLab, a schedule, a webhook, the API, or the iOS app, and comes back as a pull request or an investigation your team reviews.

A Replicas workspace is a full development machine, where an Anthropic cloud session gives you a chat and a diff view. Every workspace includes a Linux desktop with Chrome that Claude Code can drive to test its own work, and that you can watch or take over with your own mouse and keyboard. You also get terminals, in-place file editing with code intelligence, and preview URLs for apps the agent starts. Anthropic's cloud session documentation describes no desktop, takeover, or preview URLs.

Tasks start faster because setup happens before you ask. Warm hooks run heavy setup such as dependency installs, builds, and Docker image pulls ahead of time, so each task claims a pre-warmed workspace. Anthropic provisions cloud session VMs on demand and caches a setup script only when it finishes in about five minutes.

Workspaces are multiplayer. Teammates open the same workspace, see who else is there and who is typing, follow the plan and live session, and comment on diffs. When CI or review sends the work back, the agent continues in the same workspace. A shared Anthropic cloud session shows recipients a snapshot that does not update in real time.

Replicas also covers the cases Anthropic cloud sessions do not. It works with GitLab as well as GitHub, and Claude Code can sign in with your own Claude subscription, an Anthropic API key, Amazon Bedrock, or Microsoft Foundry. The same workspace can run Codex, OpenCode, Cursor, and other agents. Analytics attribute agent time to people, agents, models, and credentials, and enterprise plans add SCIM, audit logs, static egress IPs, and dedicated or self-hosted deployment. Northflank and Tembo also run Claude Code on managed infrastructure alongside other agents.

Anthropic cloud sessions: the default for Claude subscribers

By default, each cloud session gets a fresh Anthropic-hosted Ubuntu 24.04 VM with roughly 4 vCPUs, 16 GB of RAM, and 30 GB of disk, preloaded with Python, Node, Ruby, PHP, Java, Go, Rust, Docker, PostgreSQL 16, and Redis 7. Start one from claude.ai/code, the Code tab in the Claude mobile app, the desktop app, or the terminal with claude --cloud. The session keeps working after you close your laptop, and claude --teleport pulls it into your terminal when you want to take over.

An environment stores network access, environment variables, and a setup script that runs as root before Claude starts. Network access defaults to Trusted, which allows common package registries and GitHub, and can be set to None, Full, or a custom allowlist. Routines, in research preview, run a saved prompt as a cloud session on a schedule, from an API call, or on GitHub pull request and release events. Projects, in beta for select Pro and Max subscribers, splits larger work into parallel threads on separate branches.

Cloning and pull requests require GitHub, including GitHub Enterprise Server on Team and Enterprise plans. GitLab and Bitbucket repositories can be uploaded as a bundle from the CLI, but the session cannot push back to them. Anthropic-hosted environments cannot replace the base image yet. Self-hosted environments, in public beta on Team and Enterprise, run cloud sessions on runners you operate with an image you build. Cloud sessions need an Anthropic account on Pro, Max, Team, or eligible Enterprise seats, so they do not work through Bedrock, Google Cloud Agent Platform, or Foundry, or for organizations with Zero Data Retention. Usage counts against your plan's rate limits, and there is no separate charge for the VM.

Remote Control: steer a local session from your phone

Run claude remote-control, or /remote-control inside a session, and the Claude web or mobile app becomes a window into the Claude Code process on your computer. Commands and file access stay on your machine, while Anthropic stores the session transcript as long as Remote Control is connected.

Use it when the work depends on your machine, such as local services, a private network, or specific hardware, and you only want to check in from elsewhere. Your computer has to stay on and connected. Remote Control needs a claude.ai login, so it does not work with API keys, Bedrock, Google Cloud Agent Platform, or Foundry, and on Team and Enterprise plans an owner has to turn it on first.

A VPS or cloud VM: full control, and full maintenance

Install Claude Code on a Linux server, clone the repository, and run it inside tmux so the session survives SSH disconnects. The normal login works over SSH by pasting a code from the browser. For unattended runs, claude setup-token creates a one-year OAuth token on Pro, Max, Team, or Enterprise plans that you set as CLAUDE_CODE_OAUTH_TOKEN, or you can use an Anthropic API key.

Non-interactive mode, claude -p, runs one prompt and returns text, JSON, or streamed JSON. Limit what it may do with --allowedTools or a permission mode. Anthropic's devcontainer reference adds a network firewall, and its documentation warns that skipping permissions inside a container does not stop a malicious project from exfiltrating anything accessible inside the container, including Claude Code's stored credentials.

You own patching, disk space, secrets, and cleanup. Every task on the server shares its credentials, so running several agents at once usually means Git worktrees or one container per task.

GitHub Actions: Claude Code on issues and pull requests

The anthropics/claude-code-action workflow runs Claude Code on GitHub-hosted runners when someone mentions @claude in an issue or pull request, or on any workflow event, including a cron schedule, when you pass a prompt. It authenticates with an Anthropic API key, a Claude subscription token from claude setup-token, OIDC, or Amazon Bedrock, Google Cloud Agent Platform (formerly Vertex AI), or Microsoft Foundry.

It suits code review and small fixes that start in GitHub. Each run is bounded by the job, consumes your Actions minutes, and is steered with further comments rather than a live session.

By situation

Which option fits your setup

Most developers start with the option closest to the tools they already use. Teams often end up with two: an interactive option for individuals and an automated one for recurring work.

Your team wants Claude Code in the cloud
Replicas. Tasks start from Slack, Linear, GitHub, or GitLab, each runs in its own VM from a shared environment, and teammates review the result together. It is also the answer when you need GitLab, an API key, Bedrock, Foundry, or more than one coding agent.
You work alone on GitHub with a Claude plan
Anthropic cloud sessions. There is no infrastructure to run, no separate compute charge, and teleport brings the work back to your terminal.
The task needs your own machine
Remote Control. Local services, VPN access, and your dotfiles stay where they are while you check in from your phone.
You want an always-on server or scripted runs
A VPS with tmux for interactive work and claude -p for cron jobs and scripts. Budget time for security and maintenance.
You want Claude to respond to issues and pull requests
GitHub Actions with anthropics/claude-code-action, triggered by @claude mentions or scheduled workflows.

Replicas fit

When Replicas is the right way to run Claude Code in the cloud

Replicas is strongest when Claude Code work is shared across a team rather than run by one developer. Teams typically choose it when several of the following are true.

  • You want to keep Claude Code as the agent and stop running it on laptops.
  • You want the agent to test its work in a real desktop and browser, and to take over that desktop yourself when needed.
  • Teammates should be able to join the same workspace, follow the live session, and review together.
  • Your repositories are on GitLab, or on both GitHub and GitLab.
  • Your company pays for Claude through an Anthropic API key, Amazon Bedrock, or Microsoft Foundry rather than a Claude plan.
  • You want tasks to start from Linear issues, Slack threads, pull request comments, schedules, or webhooks against one environment definition.
  • You want to choose Claude Code, Codex, OpenCode, or Cursor per task without rebuilding the environment.
  • You need per-task isolation, audit logs, SCIM, and a record of who ran what, with which agent and model, at what cost.

Self-hosting

Checklist for running Claude Code on your own server

If you choose a VPS or cloud VM, these steps cover the common failure points: lost sessions, over-broad permissions, and leaked credentials.

  • Run Claude Code as a non-root user that can reach only the repositories and secrets the agent needs.
  • Install with Anthropic's official installer, then log in over SSH or set CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY for unattended runs.
  • Start interactive sessions inside tmux so they survive disconnects, and reattach to review the work.
  • Use claude -p with --output-format json for scripts, and --allowedTools or a permission mode to limit what it can call.
  • Turn on Claude Code's sandbox to isolate the filesystem and network access of shell commands, or run inside Anthropic's devcontainer with its firewall script.
  • Give each parallel task its own Git worktree or container so agents do not overwrite each other's files.
  • Keep deploy keys and cloud credentials off the server or scope them narrowly. Anything the agent can read, a prompt injection in a dependency or issue can try to exfiltrate.

FAQ

Claude Code cloud questions

Getting started with Replicas

Run Claude Code in the cloud with your team

Replicas includes a 14-day free trial with no credit card required. Connect a GitHub or GitLab repository, define the environment once, connect Claude Code with your Claude subscription or an API key, and start a task from the dashboard, Slack, Linear, or a pull request comment. Each task runs in its own Linux VM and comes back as a pull request your team reviews.