# XCOpenCodeWeb
[](https://github.com/btriapitsyn/openchamber/stargazers)
[](https://github.com/btriapitsyn/openchamber/releases/latest)
[](https://discord.gg/ZYRSdnwwKA)
Run [OpenCode](https://opencode.ai) in your browser. Install the CLI, open `localhost:3000`, done. Works on desktop browsers, tablets, and phones as a PWA.
Full project overview, screenshots, and all features: [github.com/btriapitsyn/openchamber](https://github.com/btriapitsyn/openchamber)
## Install
```bash
curl -fsSL https://raw.githubusercontent.com/btriapitsyn/xcopencodeweb/main/scripts/install.sh | bash
```
Or install manually: `bun add -g xcopencodeweb` (or npm, pnpm, yarn).
> **Prerequisites:** [OpenCode CLI](https://opencode.ai) installed, Node.js 20+.
## Standalone Executable (No dependencies)
Download the standalone `.exe` file - no installation required, no Node.js needed.
> **File size: ~150MB** (single file, self-contained with Bun runtime)
```bash
./XCOpenCodeWeb.exe # Start on port 3000
./XCOpenCodeWeb.exe --port 8080 # Custom port
```
## Usage
```bash
xcopencodeweb # Start on port 3000
xcopencodeweb --port 8080 # Custom port
xcopencodeweb --ui-password secret # Password-protect
xcopencodeweb stop # Stop server
xcopencodeweb update # Update to latest
```
Connect to external OpenCode server
```bash
OPENCODE_PORT=4096 OPENCODE_SKIP_START=true xcopencodeweb
OPENCODE_HOST=https://myhost:4096 OPENCODE_SKIP_START=true xcopencodeweb
```
| Variable | Description |
|----------|-------------|
| `OPENCODE_HOST` | Full base URL of external server (overrides `OPENCODE_PORT`) |
| `OPENCODE_PORT` | Port of external server |
| `OPENCODE_SKIP_START` | Skip starting embedded OpenCode server |
Docker
```bash
docker compose up -d # Available at http://localhost:3000
```
**Optional env vars:**
```yaml
environment:
UI_PASSWORD: your_secure_password
```
**Data directory:** mount `data/` for persistent storage. Ensure permissions:
```bash
mkdir -p data/xcopencodeweb data/opencode/share data/opencode/config data/ssh
chown -R 1000:1000 data/
```
Background & daemon mode
```bash
xcopencodeweb --daemon # Run in background
xcopencodeweb stop # Stop background server
```
## What makes the web version special
- **Mobile-first PWA** - optimized chat controls, keyboard-safe layouts, drag-to-reorder projects
- **Background notifications** - know when your agent finishes, even from another tab
- **Self-update** - update and restart from the UI, server settings stay intact
- **Cross-tab tracking** - session activity stays in sync across browser tabs
Plus everything from the shared XCOpenCodeWeb UI: branchable timeline, Git sidebar, terminal, voice mode, and more.
## License
MIT