---
title: "A self-hosted alternative to Claude Code on the web"
description: "What Claude Code on the web and Codex cloud actually do, what changes when you self-host the agent instead, and the self-hosted options that hold up in use."
url: "https://intentic.dev/guides/self-hosted-alternative-to-claude-code-on-the-web/"
updated: "2026-10-06"
---

[Guides](https://intentic.dev/guides/)

# Is there a self-hosted alternative to Claude Code on the web or Codex cloud?

The short answer

Yes. Run the same agent CLI on a machine you control and add a way to reach it: SSH and tmux, Anthropic's Remote Control, an open-source web UI, or a self-hosted workspace. The checkout and credentials stay on your hardware, and turns still use your subscription. What you take on is the part the cloud products sell: a machine that stays on, and its environment.

[Create your workspace](https://app.intentic.dev)[See the product](https://intentic.dev/features/)

## What is true regardless of what you pick

- Claude Code on the web runs each session in an Anthropic-managed VM on Pro, Max, Team and eligible Enterprise seats, with no separate compute charge; sessions share your plan's rate limits. Codex cloud runs each task in a VM on OpenAI's side and is listed from ChatGPT Plus up.
- Both start from GitHub. Codex cloud does not yet support GitLab or GitHub Enterprise Server. Claude Code on the web needs GitHub to clone and open pull requests, though claude --cloud can upload a bundle of a local repository instead.
- Self-hosting the agent does not make the model local. The conversation and the files the agent reads still go to the model provider. What moves is the checkout, the environment and the credentials.
- Anthropic's Remote Control already lets claude.ai and the Claude mobile app drive a session running on your own machine over outbound HTTPS. The local process has to keep running, and it needs a subscription login: API keys are not supported.
- A web UI listening on a public address without authentication is a shell for whoever finds it. OpenCode's docs say plainly that its server is unsecured unless you set a password.

## Your options, and where each one stops

| Approach | Good for | Breaks when |
| --- | --- | --- |
| **Stay on the cloud product** Claude Code on the web, Codex cloud, or a peer such as Cursor's cloud agents. The vendor runs a fresh VM per task. | Operating nothing, starting work from a phone, parallel sessions on someone else's hardware, and no extra charge on plans that include it. | Code or credentials must stay on your infrastructure, the repository is not on GitHub, or the environment needs more than a setup script can install. Shell commands in Claude Code cloud sessions time out after two minutes by default, ten at most. |
| **SSH, tmux and the CLI** The agent runs in tmux on a desktop, home server or VPS; you reattach over SSH from wherever you are. | Anyone at home in a terminal. Free, nothing to trust beyond SSH, and the session survives a dropped connection. | You want to check in from a phone without a terminal app, watch several agents at once, or read diffs comfortably. It is all text in one window. |
| **Claude Code Remote Control** Start claude remote-control on your machine and continue the session from claude.ai/code or the Claude app. | Claude users who want the official web and phone interface on a session that runs locally, with no inbound port opened. | You use another agent, or the local process stops: Anthropic suggests tmux over SSH to keep it alive, and server mode exits after about ten minutes without a network. |
| **An open-source web UI** Claude Code UI (now CloudCLI, AGPL-3.0), Happy (MIT, phone and web through an encrypted relay you can self-host) or opencode web (MIT) put a browser in front of agents on your machine. | A free browser or phone front end for agents you already run, if you are happy to set it up and secure it. | It is exposed carelessly, since its security is whatever you put in front of it. Most are a view onto sessions rather than isolation between them. |
| **A self-hosted workspace** intentic: a Docker sandbox on your laptop, desktop or VPS that runs Claude Code, Codex, Grok, Kimi Code and Gemini, reached from any browser through a tunnel it dials outward. | The shape of the cloud products on your own hardware: runs that continue with the browser closed, a worktree per agent, plan mode and per-hunk review, on the subscriptions you already have. | You do not want to keep a machine on. A sandbox on a laptop stops when the laptop sleeps, like any other local tool. It is also new, and says so. |

## What to actually do

If your code can sit on GitHub and on a vendor's VM, the cloud products are the least work, and on plans that already include them they cost nothing extra. Self-hosting is not automatically cheaper or more private: the model still sees the code.

If the checkout or the keys must stay on your hardware, start with what you have: a machine that stays on, tmux and SSH. Add Remote Control if you use Claude and want the official app, or an open-source web UI if you want a browser and can secure it.

If you want the whole cloud shape without the cloud (isolated parallel runs, a browser on any device, review before merge, triggers), that is what intentic is: an MIT-licensed workspace whose sandbox runs on your machine and keeps the repository and credentials there.

## What the cloud products actually give you

Take away the interface and the cloud products are four things: a fresh VM per task, a setup step that installs your toolchain, a network policy, and a branch or pull request at the end. Claude Code on the web offers network levels from none to full, with a trusted default covering package registries and GitHub. Codex cloud makes internet access during the agent's work a switch you turn on, with presets.

Both keep going when your laptop closes, because nothing runs on your laptop. That is the property most people are buying, and the one a self-hosted setup has to reproduce first.

## What self-hosting changes

Self-hosting moves the agent, not the model. Everything below changes; what the provider sees does not.

- Where the code lives: the checkout and its history stay on a disk you control rather than a vendor VM.
- Whose credentials: database passwords and deploy keys stay on your machine instead of going into a vendor's environment settings.
- Subscriptions: the agent CLI signs in with the same Claude or ChatGPT plan, and turns draw on the same allowance either way.
- Uptime: the machine has to be on. A desktop that sleeps at night is not a server.
- The environment: any image, any toolchain, any internal host, and no time limit on setup.

## Reaching it without opening it up

The risk in self-hosting a web UI is the UI, not the agent. A port forwarded on your router, or a server bound to every interface on a VPS, hands a shell to whoever finds it.

Two patterns hold up. Keep the port private and reach it over SSH or a private network. Or use something that dials outward, as Remote Control, Happy's relay and intentic's tunnel all do, so nothing inbound is opened at all.

## What you give up

The vendor patches the VMs, keeps the image current, and runs as many sessions as your plan allows. There are official phone apps, and a session starts from anywhere with nothing of yours left running.

Self-hosting swaps all of that for a machine you maintain. For many people that is the right trade, because the repository or the keys cannot leave. For many others it is not, and the cloud product is the honest answer.

## Related questions

### [Is there a self-hosted web UI for Claude Code?](#self-hosted-claude-code-web-ui)

Yes. Open-source options include Claude Code UI (now called CloudCLI) and Happy, and OpenCode ships its own opencode web. Anthropic's Remote Control lets claude.ai drive a session on your machine. intentic is a fuller workspace around Claude Code and other agents, with its sandbox on your machine.

### [What is a good alternative to Codex cloud?](#codex-cloud-alternative)

If you want another hosted service, Claude Code on the web and Cursor's cloud agents are the peers. If the code has to stay on your hardware, run the Codex CLI on an always-on machine, using codex exec for unattended tasks, or use a self-hosted workspace such as intentic that runs Codex on your ChatGPT plan.

### [Can I self-host and still use my Claude or ChatGPT subscription?](#self-host-same-subscription)

Yes. The agent CLIs sign in with the same plan wherever they run, so a session on your server draws on the same allowance as one on your laptop. intentic connects your own subscriptions and never resells inference.

### [Is self-hosting more private than Claude Code on the web?](#self-hosted-more-private)

It changes who holds the checkout and the credentials, not who sees the conversation. The model provider still receives the files the agent reads. Self-hosting removes the vendor VM and the repository access grant; only a local model keeps the conversation on your machine.

### [Will a self-hosted agent keep running when I close my laptop?](#self-hosted-closed-laptop)

Only if it is not on the laptop. Put it on a desktop that stays awake, a home server or a VPS. A self-hosted tool on a sleeping laptop stops like any other process.

## Read next

[Where your code goes](https://intentic.dev/guides/where-your-code-goes-with-cloud-coding-agents/)[Agents that persist](https://intentic.dev/guides/keep-a-coding-agent-running-after-you-close-your-laptop/)[Host agent work](https://intentic.dev/features/host/)[Quickstart](https://intentic.dev/docs/quickstart/)[intentic vs cloud agents](https://intentic.dev/compare/cloud-agents/)[intentic vs Codex](https://intentic.dev/compare/codex/)

Written against the state of the field in 2026-10. This area moves fast. Spot something out of date or wrong? [Open an issue](https://github.com/intentic/intentic/issues) and it is fixed in the next build.

[Next guide How do you run coding agents in the background on your own hardware? →](https://intentic.dev/guides/self-hosted-background-coding-agents/)

[Create your workspace](https://app.intentic.dev)[All guides](https://intentic.dev/guides/)
