Save time, make money and get customers with FREE AI! CLICK HERE →

Claude Code Self Hosted Environments: Full Guide

Wondering how Claude Code self hosted environments actually work? The quick version is just below — Anthropic quietly shipped one of the biggest changes to Claude Code on the web this month, and for agencies and teams with locked-down networks it changes what you can automate.

Short answer

  • Self-hosted environments run Claude Code cloud sessions on your own infrastructure — announced in the official Week 32 digest (3–7 August 2026) as a public beta for Team and Enterprise plans.
  • Three parts: an environment (named destination in claude.ai admin), runners (processes on your hosts, like self-hosted CI runners) and sessions.
  • All traffic is outbound HTTPS to api.anthropic.com — Anthropic never connects into your network.
  • Sessions can reach your internal services, databases and registries; checkouts and artifacts stay on your machines.
  • Off by default — an Owner enables it under Admin settings → Cloud environments; not available with Zero Data Retention.

What claude code self hosted environments actually are

Sourcing: everything in this guide comes from Anthropic’s official Claude Code documentation — the self-hosted environments pages and the What’s New Week 32 digest (3–7 August 2026) — which I pulled directly on 28 August 2026. Per the digest, “self-hosted environments run Claude Code cloud sessions on infrastructure your organization operates, in public beta on Team and Enterprise plans.”

Quick primer if you have not used cloud sessions: normally, when you fire off a task from claude.ai/code, the mobile app, a scheduled routine or claude --cloud in your terminal, it executes on an Anthropic-managed VM. With a self-hosted environment, those same sessions execute inside your network instead — and the developer experience stays the same.

The architecture has three pieces:

Piece What it is Where it lives
Environment A named destination sessions can be routed to; groups your runners Created in claude.ai admin settings
Runner A process that claims queued sessions, clones the repo and spawns Claude Code — same idea as a self-hosted CI runner Your hosts, inside your network
Session One Claude Code task a developer (or routine) started Runs as a child process of the runner

The security posture is the headline: runners poll api.anthropic.com for work over outbound HTTPS, sessions stream events back the same way, and the docs are explicit that “Anthropic never connects into your network.” If a runner stops heartbeating for about 60 seconds, the session simply requeues to another runner.

Why teams want claude code self hosted environments

Anthropic’s own docs are refreshingly honest that most teams should stay on Anthropic-hosted environments. Self-hosting earns its keep in three cases:

  • Internal network access. Sessions can reach internal services, databases and package registries without exposing them to the public internet. For an agency, that means Claude Code agents that can hit a client’s staging environment or internal API docs.
  • Custom tooling. You build the runner image, so every session starts with your compilers, SDKs and internal CLIs pre-installed — no setup script roulette.
  • Compliance. Repository checkouts and build artifacts stay on infrastructure you control. Be clear-eyed about the boundary though: session content (prompts, responses, tool results) still goes to api.anthropic.com for inference, and it is not available for Zero Data Retention organisations.

The catch is operational ownership: you build and maintain the runner image, operate the fleet, and control its network. There is also a subtle scaling rule — a runner locks to one owner (user) at a time, so your minimum fleet size is the number of people active at once.

🔥 Want this set up without the guesswork? Running SEO agents on infrastructure you control — scheduled routines building and auditing pages inside your own network — is exactly the kind of system we build. Inside the AI Profit Boardroom you get 3,700+ members, four live calls per week, daily tutorials, done-for-you templates and a 30-day roadmap.

Want to see where autonomous Claude Code sessions fit in your agency’s SEO delivery? Book a free SEO strategy session and I’ll map it out with you personally.

How to set up claude code self hosted environments

The short version of the official quickstart flow:

  • 1. Enable the beta. An organisation Owner turns on Allow self-hosted environments at Admin settings → Cloud environments (Claude Code on the web must already be enabled).
  • 2. Create an environment. You get a single shared environment secret — shown once — that runners use to register.
  • 3. Deploy runners. Fixed runners you keep alive, or the autoscaling orchestrator that starts runners as sessions queue and lets each one exit when its work finishes. Kubernetes and Compose recipes are in the deploy docs, and corporate egress proxies (HTTPS_PROXY etc.) are supported.
  • 4. Configure git. Runners authenticate to your git host with credentials you provide — including per-session minted credentials or Anthropic’s git proxy. Repos are GitHub-only for now.
  • 5. Route a session. The environment then shows up in the picker on every surface: web, mobile, desktop, routines and claude --cloud.

Billing is straightforward: self-hosted sessions consume your organisation’s Claude Code usage exactly like Anthropic-hosted ones — you are supplying compute, not buying a different SKU. Inference cannot be routed through Bedrock, Vertex-style platforms or an LLM gateway; it is the Anthropic API with a session-scoped OAuth token.

If you are newer to Claude Code itself, start with my Claude Code training, keep costs sane with how to reduce Claude Code token usage, and see Claude Code restricted mode for the lockdown flag that pairs naturally with self-hosted fleets.

The bottom line on claude code self hosted environments

The claude code self hosted environments beta is Anthropic conceding something important: serious teams want autonomous agents, but on their own network, with their own tools, behind their own egress rules. If you are on Team or Enterprise and your security team has been the blocker on cloud sessions, this is the unlock — outbound-only traffic, your compute, your git credentials, same claude.ai experience. If you are a solo operator, stay on Anthropic-hosted and spend the ops time on content instead.

Announced in the official Claude Code Week 32 digest (3–7 August 2026); full docs at code.claude.com. For the strategy side — what to actually point these agents at so they produce rankings and revenue — the AI Profit Boardroom has the 30-day roadmap and four live calls a week, or book a free SEO strategy session and I’ll walk your setup personally.

Where to go next with claude code self hosted environments: if you want the community route, the AI Profit Boardroom has 3,700+ members, four live calls a week, daily tutorials and a 30-day roadmap. If you would rather talk it through one-to-one, book a free SEO strategy session and we’ll build your plan together.

FAQ: claude code self hosted environments

Which plans get Claude Code self-hosted environments?

Public beta on Team and Enterprise plans only. The feature is off by default — an organisation Owner enables ‘Allow self-hosted environments’ on the Cloud environments admin page, which also requires Claude Code on the web to be enabled.

Does Anthropic connect into my network?

No. Per the official docs, every connection is outbound from your network: runners poll api.anthropic.com for work over HTTPS, and ‘Anthropic never connects into your network’.

What stays on my infrastructure?

Repository checkouts, build artifacts, secrets and any files a session creates. The conversation itself — prompts, responses, tool results — still goes to api.anthropic.com for model inference, and Anthropic stores the transcript so sessions can resume.

Can I autoscale the runners?

Yes. You can keep fixed runners running yourself, or deploy Anthropic’s autoscaling orchestrator, which starts runners as sessions queue; each runner exits when its work finishes.

Can inference go through Bedrock or an LLM gateway?

No. Sessions authenticate to the Anthropic API with a session-scoped OAuth token, and inference cannot be routed through Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry or an LLM gateway.

Do self-hosted sessions cost extra?

Sessions in a self-hosted environment consume your organisation’s Claude Code usage the same way Anthropic-hosted ones do — you supply the compute, but there is no separate Anthropic charge for it.

About the author

Julian Goldie is an SEO agency owner with 10+ years in SEO, 394K+ YouTube subscribers, a 100% Upwork job-success score, 75K+ community members across his groups, and the author of a best-selling SEO book. For agency work, book a call for a custom quote.

Watch the YouTube channel, join the AI Profit Boardroom community, or book a free SEO strategy session.

Related reading

Last updated August 2026. This is the living guide to claude code self hosted environments — it gets updated as the tools change.