Claude Code self-hosted environments on macOS

A Claude Code self-hosted environment can run sessions on a Mac for a Team or Enterprise organization in public beta. Macswarm provides that Mac as a Pod with the Latest Xcode and pre-booted Simulators. Connect the environment key, choose EU or US, then select the environment when starting a session.

What are self-hosted environments?

Anthropic’s definition: “A self-hosted environment executes Claude Code cloud sessions on infrastructure your organization operates. A cloud session is any session that runs somewhere other than the developer’s machine.” By default those sessions run on Anthropic’s VMs; in a self-hosted environment “those same sessions execute inside your network” (Self-hosted environments).

The docs describe three parts:

  • Environment: “a named destination that cloud sessions can be sent to”, created in claude.ai admin settings.
  • Runner: “a program running on hosts inside your network. Runners execute the sessions; the idea is the same as a self-hosted CI runner.”
  • Session: “one Claude Code task a developer started.”

When a developer starts a cloud session, the environment picker lists Anthropic’s environments next to yours. If they pick yours, “Anthropic’s control plane places the session on your environment’s queue, where a runner claims it, clones the repository the developer chose, and starts a Claude Code process on your host to run it.” All traffic to Anthropic is outbound HTTPS, and “Anthropic never connects into your network.”

Availability, from the same page: “public beta for Team and Enterprise organizations”, off until an Owner turns on Allow self-hosted environments; unavailable with Zero Data Retention or the HIPAA configuration; repositories come from GitHub; and sessions “consume your organization’s Claude Code usage the same way sessions in Anthropic-hosted environments do.”

How do I connect a self-hosted environment to Macswarm?

Macswarm operates the Pod image, build queue and Simulator pool; you configure environment access, repositories and build secrets. As a setup estimate, allow about ten minutes from key to first Pod. Macswarm is in early access: steps that mention the dashboard describe the current build, and exact labels may change before general availability. If a control does not match what you see, write to info@macswarm.com.

  1. In your Claude organization settings, an Owner turns on Allow self-hosted environments, creates an environment and copies its key. The key identifies your organization to Macswarm; it never ships inside a Pod image.
  2. Sign up for Macswarm or sign in. Free includes 3 Pod-hours once, with no card.
  3. Open Environments, choose Connect Claude, paste the key, pick EU or US and save. Macswarm warms a pool for your organization; the status turns to Connected when the first Pod is ready.
  4. Optional: add deploy keys or a GitHub App so Pods can clone private repositories, and store the secrets your builds need. Secrets are injected at session start and never written into the golden image.
  5. From claude.ai, Claude Desktop or Slack, start a Claude Code session and pick the Macswarm environment. A Pod boots from the warm pool with your repository cloned and the Latest Xcode, iOS runtimes and Simulators ready.

If the status is Connected but no Pod boots, or a clone fails, the quickstart’s troubleshooting section covers the plan’s Pods-at-a-time limit, the region’s warm pool and git credentials.

How does a Macswarm Pod act as the macOS environment?

Macswarm maps onto the three parts.

Anthropic’s term On Macswarm
Environment Created in your claude.ai admin settings as usual. You paste its key into Macswarm under Environments, Connect Claude, and pick EU or US.
Runner Runs on a Pod: a macOS VM on a dedicated Apple silicon Mac mini, cloned fresh from a golden image with the Latest Xcode and the previous major, current and previous iOS runtimes, three to four pre-booted Simulators and XcodeBuildMCP.
Session Started from claude.ai, Claude Desktop or Slack by picking the Macswarm environment. More sessions from the same developer join the same Pod in separate git worktrees.

One Pod serves one developer, which matches Anthropic’s one-owner rule; that developer’s sessions share the Pod’s two build slots and its Simulator pool, within the numbers in Limits and queues. Pods make outbound connections only, as in the docs. Ten minutes after the last session the Pod is destroyed. Inside a Pod has the full inventory.

What leaves the Pod, and what stays?

Anthropic describes the boundary this way: “Repository checkouts, build artifacts, secrets, and any files a session creates or modifies stay on the machines you provision. The conversation itself, including prompts, responses, and tool results, goes to api.anthropic.com.” With a Pod, that machine is one Macswarm operates in your chosen region.

On Macswarm, model requests go directly from the Pod to Anthropic under your account. Macswarm does not store prompts or completions. Agents push code to your git host. Macswarm retains agent logs and screenshots for 30 days in the selected region, with shorter retention available on Team and Enterprise. Usage records (session start and end, developer, Pod-hours) remain for the life of the account. The repository clone, build products, caches and injected secrets live only as long as the Pod and are destroyed with it, ten minutes after the last session ends. Security has the full retention table and the privacy policy is its authoritative version.

Can Claude Code use the iOS Simulator in a cloud session?

Yes, when the session runs on a Macswarm Pod through a self-hosted environment, which requires a Claude Team or Enterprise organization in public beta. The session executes on a hosted Mac with the Latest Xcode, the current and previous iOS runtimes and three to four Simulators booted before the session starts. The agent builds with xcodebuild, leases a Simulator for a launch or a UI test run, taps through the app with XcodeBuildMCP, reads the logs and attaches screenshots to the pull request. In an Anthropic-hosted cloud session the answer is no: Anthropic documents the hosted VM as Ubuntu with no Xcode, and says the Desktop app’s Simulator pane “is available in local sessions only”. That pane stays local-only with a Pod as well; hosted results arrive as logs and screenshots in the Macswarm dashboard and on the pull request, not as a live screen. One Pod belongs to one developer, and its Simulator pool is shared by that developer’s sessions.

iOS Simulator for coding agents walks through the build, launch, inspect, fix and rerun loop and compares the remote-Simulator alternatives.

What do the docs say about the runner host?

The quickstart lists the host requirement as “A Linux or macOS host or container with outbound HTTPS to api.anthropic.com”, and adds: “Windows isn’t supported as a runner host; run the runner in a Linux container instead.” The runner is part of the claude binary and starts with claude self-hosted-runner.

The production guidance uses containers. Deploy to production says: “Anthropic doesn’t publish a pre-built runner image. Build your own around the claude binary, layering in whatever toolchain your repositories need: language runtimes, compilers, package managers, and MCP sidecars.” Its example Dockerfile starts from debian:bookworm-slim, and the fleet recipes are for Kubernetes and Docker Compose. Neither page mentions Xcode, iOS runtimes, Simulators or Apple hardware.

Anthropic’s examples use Linux containers; a macOS runner needs the Mac toolchain maintained separately: the Latest Xcode and the iOS runtimes kept current, the Simulators booted, the runner restarted when it exits, and the ownership rule respected: “A runner serves one owner at a time and locks to that owner when it claims its first session, so checked-out code never mixes between owners.” Macswarm supplies that toolchain in its Pod image.

Which plans can use this?

  • Claude Team or Enterprise with self-hosted environments turned on: the path above. Anthropic bills the model usage to your organization; Macswarm bills the Pod-hours.
  • Claude Pro or Max: cannot create a self-hosted environment. They can start a Pod on the Free or Pro plan and sign in to Claude Code inside it with their own account; Run Claude Code and Codex on a cloud Mac describes that route and the FAQ records it.
  • Codex: Claude Code and Codex can share a developer’s Pod. Codex setup uses the Agents API webhook, explained in Codex on a macOS environment.
  • Zero Data Retention or HIPAA organizations: self-hosted environments are unavailable to you per Anthropic’s documentation; that restriction is Anthropic’s.
  • Macswarm plans: Free 3 Pod-hours once; Pro $99 a month for 300; Team $399 for 1,500; Enterprise starts at $3,000 a month for reserved Macs, SSO/SAML and invoice billing, with EU or US regions; Contact us. See pricing.

What are the alternatives?

Host Monthly price Who operates the runner Persistence Better fit
A Mac you own No hosting charge beyond the Mac You: install Claude Code, keep Xcode and the runtimes current, start claude self-hosted-runner and restart it when it exits; one runner serves one developer at a time Everything stays on your disk One developer with one Mac and time to look after it
MacRun rented Mac mini $139 as a CI runner or $169 with Claude Code and Codex installed (checked 25 Oct 2026) You, on a machine that is on all month Root and a persistent disk A persistent Mac you can log into; see Macswarm vs MacRun
MacRent rented Mac mini $159, excluding VAT (checked 25 Oct 2026) You Root and a persistent disk; US West or EU regions A short bare-metal rental with an EU option
My Remote Mac rented Mac mini $85 (checked 25 Oct 2026) You Root and a persistent disk The cheapest dedicated Mac by the month
Anthropic-hosted environments Included in your Claude Code usage Anthropic A fresh VM per session, without Xcode Everything that is not iOS. Anthropic’s own advice: “Most teams are better served by Anthropic-hosted environments, which need no infrastructure to run or maintain.”
Macswarm Pod Free 3 Pod-hours once; Pro $99 for 300 Pod-hours (pricing) Macswarm operates the Pod image, build queue and Simulator pool Nothing between sessions; a rescue branch carries leftover changes iOS sessions, two to three agents per Pod for one developer, EU or US

Route backend and web sessions to Anthropic-hosted environments and only iOS sessions to a Macswarm environment.

What else do people ask?

Does Anthropic connect into the Pod?

No. Anthropic’s documentation states that “Anthropic never connects into your network.” The runner polls api.anthropic.com over outbound HTTPS and the session streams its events back the same way. Pods have no inbound ports, no SSH and no screen sharing, for customers or for Macswarm staff. What leaves the Pod is the model traffic to Anthropic under your account, the code the agent pushes to your git host, and the logs and screenshots Macswarm keeps for 30 days in your region.

Where does model inference run?

At the Anthropic API. Anthropic’s documentation says sessions in a self-hosted environment “consume your organization’s Claude Code usage the same way sessions in Anthropic-hosted environments do”, and that the conversation goes to api.anthropic.com. Macswarm’s documented Claude connection sends model requests directly from the Pod to api.anthropic.com under your organization’s account; Macswarm does not store prompts or completions.

Which git hosts work?

The Anthropic documentation cited here describes GitHub repositories, including GitHub Enterprise Server. Macswarm’s Pod needs outbound access to the repository and the credentials to clone it: the deploy key or GitHub App you add under Environments. Pods have no inbound network, so a self-hosted git server needs a public endpoint, or an Enterprise private network can provide access to a private git server.

Reviewed October 25, 2026. Facts on this page are rechecked when the product changes.