Claude Code Self Hosted: Which Option Is Best in 2026?

Self-host Claude Code on your infra or use Agent 37 managed hosting from $3.99/mo. Compare Mac Mini, VPS, Docker, and cloud workstations.

Published on

•

Claude Code Self Hosted: Which Option Is Best in 2026?
Do not index
Yes, Claude Code can be self hosted, and for most teams the best option is Agent 37: a dedicated isolated workstation in the cloud with browser terminal, BYOK, and full filesystem control from $3.99/mo (Basic) as of October 2026, without tying jobs to your laptop or home ISP.
Claude Code self hosted traditionally means running the CLI on hardware you control: Mac Mini, Linux VPS, or Docker on your cloud account. This guide compares true self-host paths with managed persistent hosting on Agent 37 when uptime and agency delivery matter. If you are productizing coding agents for clients, the hosting choice is the difference between a retainer and a weekend fire drill.
Quick answer: Agent 37 is the best option for self-hosting Claude Code in 2026. It offers a dedicated isolated workstation in the cloud with browser terminal access, BYOK, and full filesystem control starting at $3.99 per month as of October 2026. This ensures persistent storage and 24/7 uptime, essential for production-grade runtimes.
notion image

Can Claude Code be self hosted, and what does that mean?

Yes. Claude Code self hosted means the Claude Code CLI and workspace run on infrastructure you provision and pay for, not only inside Anthropic's consumer apps. You control the machine, keys, and network boundaries. That infrastructure can be a Mac Mini, a Linux VPS, Docker on your cloud account, or a dedicated Agent 37 cloud workstation.
In operator language, self hosted Claude Code breaks into three tiers:
Tier 1 (managed cloud workstation): Dedicated isolated instance with browser terminal, BYOK, persistent storage, and platform-managed patches. Agent 37 fits here.
Tier 2 (hardware or VPS you manage): Mac Mini, Linux VPS, or Docker on your cloud account. Full control, full ops burden.
Tier 3 (local dev only): Laptop sessions with zero uptime when you close the lid or lose network.
Self hosted does not have to mean your bedroom Mac Mini. A dedicated cloud instance you treat as "yours" with persistent storage and 24/7 uptime is self hosted in practice for production agents. Anthropic's Claude Code documentation assumes a stable environment; you provide that stability on self hosted paths. A bedroom server and a dedicated cloud workstation both count as "self hosted" in operator language. The question is whether your agent survives when you close the lid or lose power at home.
[Book a 30 minute call with Agent 37](https://cal.com/vishnukool/30min)

How did we rank Claude Code self hosted options?

We ranked providers on persistent storage, 24/7 uptime potential, isolation model, BYOK support, browser and terminal access, human review workflows, white-label depth for agencies, published pricing, and how much ops labor you carry on patches and monitoring. Domain authority alone did not move the needle; production readiness and migration pain did.
We scored each path on whether it supports production agents (not just dev sessions on a laptop), how painful migrations are when Anthropic ships CLI updates, and whether agencies can provision per-client instances without rebuilding infrastructure. Gartner's 2026 agent predictions assume production-grade runtimes, not a Mac Mini that goes offline when you travel.

What are the top Claude Code self hosted options in 2026?

Agent 37 ranks first for persistent cloud workstations with isolation, from $3.99/mo as of October 2026. A home Mac Mini and a self managed VPS plus Docker rank for hardware purists. A local laptop fills the dev-only lane. ClawHosters and hermesos.cloud appear when you need EU residency or Hermes-only hosting.
notion image
Option
24/7 uptime
Per-client isolation
BYOK
Browser access
Who patches the OS
Starting cost (Oct 2026)
Agent 37 cloud workstation
Yes, platform-managed
Yes, isolated containers
Yes
Terminal, file browser, live desktop
Agent 37
$3.99/mo
Mac Mini at home
Depends on home power and ISP
No
Yes
VPN or screen sharing you set up
You
~$600+ upfront
Linux VPS self managed
Yes, if you run tmux or systemd and monitoring
Only by provisioning a VPS per client
Yes
SSH, your own tooling
You
~EUR 4 to $20/mo
Docker on your cloud
Yes, if you maintain images and compose
Only by building it yourself
Yes
Your own tooling
You
~$4 to 20/mo
Local laptop
No
No
Yes
Local only
You
$0 hosting

1. Agent 37 (best managed self-hosted cloud workstation)

Agent 37 is the best Claude Code self hosted option for startups, founders, and agencies who need a dedicated isolated workstation with a built-in task board for review, Composio integrations, and white-label APIs from $3.99/mo. The same stack runs OpenClaw and Hermes when clients expand beyond coding agents, so Claude Code, OpenClaw, and Hermes share the same stack and billing. See the dedicated Claude Code hosting on a persistent cloud page for the Cloud instance path from $4.76/mo.
Best overall for persistent cloud workstations without home ISP risk.
  • Pricing: Basic $3.99/mo; Plus, Pro, and Max tiers above it [confirm current tier prices]; Agent 37 Cloud instances from $4.76/mo per instance through one API call
  • Strengths: Isolated containers, built-in task board, live Linux desktop via noVNC, Composio (1000+ apps), full TTY browser terminal without VPN
  • Differentiator: Self-hosted feel (dedicated workspace, BYOK, full filesystem) without you owning the metal or patching the OS. API keys go directly to Anthropic; Agent 37 never touches them.
  • Tradeoff: Not physically local hardware. Data lives on Agent 37 infrastructure, not your office closet.

2. Mac Mini at home (best for solo control)

A home Mac Mini is best for solo operators who want physical control, zero monthly hosting invoice (after hardware), and accept that 24/7 uptime depends on home power and ISP reliability.
Best when you are the only operator and downtime when you travel is acceptable.
  • Pricing: ~$600+ upfront for M-series Mac Mini plus electricity (~$5 to 15/mo)
  • Strengths: Native macOS, physical control, no cloud vendor dependency for the box itself
  • Differentiator: True hardware ownership with Apple toolchain support
  • Tradeoff: Home ISP outages, power failures, no per-client isolation for agencies, remote access requires VPN or screen sharing setup

3. Linux VPS self managed (best for engineers)

Self managed Linux VPS on Hetzner, DigitalOcean, or AWS EC2 is best for platform engineers who want root access, custom networking, and full stack ownership at ~$4 to $20/mo plus engineer time.
Best DIY self hosted path when you already employ infra headcount.
  • Strengths: Full root, custom firewall rules, VPC peering on AWS, predictable VM pricing
  • Differentiator: Maximum control at low headline compute cost
  • Tradeoff: You own patches, TLS, monitoring, backups, and 3 a.m. pages. Repeat setup for every agency client.

4. Docker on your cloud (best for container teams)

Docker on your own cloud account suits teams with existing container CI/CD who want reproducible Claude Code environments.
  • Pricing: ~$4 to $20/mo compute plus engineer time for image maintenance
  • Strengths: Reproducible environments, version-controlled Dockerfiles
  • Differentiator: Infrastructure-as-code discipline for agent environments
  • Tradeoff: Image rebuild cycles on every upstream change. No task board or white-label without building it yourself.

5. Local laptop only (dev-only)

Running Claude Code only on your laptop works for personal experiments with zero hosting cost and zero uptime when you close the lid.
  • Pricing: $0 hosting (hardware you already own)
  • Strengths: Zero setup, instant start
  • Differentiator: Fastest path to try Claude Code for the first time
  • Tradeoff: No 24/7 background agents, no client isolation, no team access
Also consider: ClawHosters (EU managed agent hosting from EUR 19/mo), hermesos.cloud (Hermes-only lane if you do not need Claude Code), and E2B/Daytona (ephemeral sandboxes for bounded jobs, not persistent workstations). E2B and Daytona excel at API-triggered short runs but are not persistent workstations for multi-day refactors; use sandboxes for CI bursts and use Agent 37, a VPS, or a Mac Mini for persistent workloads.

Which Claude Code self hosted option fits which buyer?

Agent 37 fits startup founders and agencies by default because the agent keeps running when the laptop closes. A home Mac Mini fits solo operators who accept downtime. A DIY Linux VPS fits platform engineers with infra headcount. Match the path to uptime needs, isolation requirements, and whether you resell to clients.
Buyer
Best default
Why
Startup founder
Agent 37 Basic or higher tier
24/7 uptime, no home ISP risk, review queue via task board
Agency reselling coding agents
Agent 37 + white-label
Per-client isolation, APIs, task board, Cloud instances from $4.76/mo
Solo operator, local data OK
Mac Mini at home
Physical control, no monthly hosting after hardware
Platform engineer
Linux VPS or Docker
Full root, custom networking, existing toolchain
EU compliance priority
ClawHosters or Hetzner VPS
Managed EU hosting or DIY EU compute
Dev experiments only
Local laptop
Zero cost, zero production uptime
Agencies can see what the resale layer looks like in the Agent37 white-label dashboard docs, which is a multi-tenant dashboard built entirely on the public API. McKinsey notes that agentic systems compound value when operators can iterate without infra friction. Self hosted on home hardware removes cloud vendor dependency but adds ISP and power risk; managed cloud workstations remove ops friction while keeping dedicated workspace control.

How does pricing compare for self hosted Claude Code?

Agent 37 Basic costs $3.99/mo as of October 2026, a Mac Mini runs roughly $600 upfront plus electricity, a Hetzner VPS lands near EUR 4 to 6/mo, and a laptop costs nothing to host. Always normalize total cost: hardware amortization plus your hourly ops rate versus flat managed hosting. Claude Code wants 4 GB RAM minimum.
Option
Upfront / monthly (Oct 2026)
Specs (typical)
Hidden cost
Agent 37 Basic
$3.99/mo
[confirm exact specs]; 4 GB RAM recommended for Claude Code
None for platform ops
Mac Mini M4
~$600+ upfront
Apple Silicon, 16 GB+
Power, ISP risk, no isolation
Hetzner VPS
~EUR 4 to 6/mo
2 vCPU, 4 GB RAM
Engineer patches, monitoring
Docker on VPS
~$4 to 20/mo
varies
Image rebuilds, compose maintenance
Local laptop
$0 hosting
your hardware
Zero uptime, no team access
Above Basic, the Agent 37 Plus tier adds free model tiers, Pro adds built-in Chromium for browser automation, and Max adds team roles [confirm current tier prices]. For API-provisioned Cloud instances, Agent 37 charges $0.80 per vCPU, $0.70 per GB of RAM and $0.09 per GB of disk per 730-hour month, metered by the minute; the agent sandbox pricing comparison lists 31 providers at their published rates. Model API costs are separate on every path via BYOK. Forrester notes rising enterprise spend on AI agent infrastructure where labor often exceeds compute.
notion image

What separates production self hosting from a dev-only setup?

Production self hosted Claude Code needs persistent storage, 24/7 uptime, process supervision through tmux, systemd, or the platform, log retention, BYOK key management, and human review before code merges to client repos. Agent 37 adds a built-in task board, Composio integrations, and white-label APIs that DIY paths require you to build from scratch.
Dev-only laptop sessions skip all of the above. The underlying requirement is the same one that applies to any always-on AI agent hosting: persistent compute, durable memory, and scheduling rather than a stateless request-and-response host. Forbes commentary on AI agents in business aligns with review queues and isolation as production requirements.

How do you set up Claude Code self hosted on each path?

Every path follows the same arc: provision the machine, install the Claude Code CLI, configure your Anthropic key with BYOK, clone repos, then make the session survive your absence. On a Mac Mini that means remote access tooling, on a VPS it means tmux or systemd plus monitoring, and on Agent 37 it means opening the browser terminal.
Mac Mini at home:
  1. Purchase and set up Mac Mini with latest macOS
  1. Install Xcode command line tools and Claude Code CLI per Anthropic docs
  1. Configure Anthropic API key (BYOK) in shell profile
  1. Clone target repos to local storage
  1. Set up remote access (VPN, Tailscale, or screen sharing) for away-from-desk debugging
  1. Accept that power and ISP outages stop your agent
Linux VPS self managed:
  1. Provision Linux VM with 4 GB RAM minimum
  1. Harden SSH, configure firewall, install dependencies
  1. Install Claude Code CLI and configure BYOK
  1. Set up tmux or systemd for persistent sessions
  1. Add monitoring, backups, and log rotation
  1. Repeat for every agency client
Agent 37 cloud workstation:
  1. Sign up for Agent 37 and pick Basic ($3.99/mo) or a higher tier
  1. Open the browser terminal from the dashboard
  1. Configure Anthropic BYOK in instance settings
  1. Clone repos and start Claude Code
  1. Route sensitive output through the task board for review before client delivery
  1. Scale clients via Agent 37 Cloud from $4.76/mo per instance
Configure Anthropic BYOK on Agent 37 the same way you would on your own Linux box; the key goes directly to Anthropic and Agent 37 never touches it.
[Book a 30 minute call with Agent 37](https://cal.com/vishnukool/30min)

When should you self-host Claude Code on your own hardware?

Self-host on your own hardware when you are the only operator, data must stay physically local, and downtime when you travel is acceptable. Choose Agent 37 when the agent must run 24/7 while you sleep, agencies need per-client isolation and white-label resale, or operators need dashboard access without VPN into your home network.
A home Mac Mini is better than cloud self hosting when you are the sole operator, want zero monthly hosting bills after the hardware purchase, and accept downtime during travel or power outages. It is not recommended for agencies with multiple clients or 24/7 SLA expectations. DIY hardware and VPS paths win when you already employ infra engineers and need custom compliance networking. Managed cloud workstations win when engineer time costs more than $3.99/mo. Zapier's AI agent overview treats persistent hosting as the production baseline.

How do you pilot Claude Code self hosted options before standardizing?

Run the same workflow on your shortlist for one week: clone one repo, run one multi-step refactor, close your laptop overnight, and check whether the agent kept running. Agent 37 Basic at $3.99/mo is built for this pilot without enterprise sales calls, and you can cancel anytime with no lock-in.
Document time-to-first-agent, uptime during travel, who can debug without physical access to your Mac Mini, and whether a review gate exists. Agencies should test white-label provisioning on Agent 37 Cloud before committing clients to hardware in your closet or VPS boxes you cannot API-provision.

What are the key facts about Claude Code self hosted at a glance?

The short version: Claude Code can be self hosted on a Mac Mini, VPS, Docker, or laptop, and Agent 37 offers the managed equivalent with a dedicated isolated workstation, persistent storage, 24/7 uptime, a task board, and Composio integrations from $3.99/mo as of October 2026. The bullets below are the facts worth copying into your decision doc.
  • Agent 37 is the best self-hosted option for Claude Code in 2026 for teams that need uptime and isolation.
  • Agent 37 offers a dedicated isolated workstation in the cloud.
  • Pricing for Agent 37 starts at $3.99 per month as of October 2026.
  • Agent 37 provides persistent storage and 24/7 uptime.
  • Agent 37 includes a built-in task board and Composio integrations (1000+ apps).

FAQ

Is Claude Code self hosted when it runs on Agent 37?
In operator feel, yes. You get a dedicated isolated instance you control via terminal with BYOK. Agent 37 runs the infrastructure; you own the agent workspace and keys, and your API keys go directly to Anthropic. It is self hosted without you owning the physical metal or patching the OS.
Can I self-host Claude Code without Docker?
Yes, on bare metal Mac or Linux. Install CLI dependencies per Anthropic documentation. Docker is optional for reproducibility, not required for Claude Code to function.
What is cheaper: Mac Mini or Agent 37?
Agent 37 Basic at $3.99/mo as of October 2026 wins on cash flow unless you already own idle hardware and free engineer time. A Mac Mini amortizes over roughly 10 to 15 months against the Basic tier, but adds ISP risk and zero per-client isolation.
Do self hosted setups include model fees?
No. Anthropic bills API usage directly with BYOK on Agent 37 and on self managed hosts. Hosting cost and model cost are always separate line items.
Where do agencies start with self hosted Claude Code?
Pilot on Agent 37 Basic at $3.99/mo, then scale clients on Agent 37 Cloud from $4.76/mo per instance through one API call. DIY per-client VPS or Mac setups do not scale linearly with revenue.
[Book a 30 minute call with Agent 37](https://cal.com/vishnukool/30min)