OpenCode: OpenCode Web Interface
Last updated: 2026-08-31
--- title: OpenCode Web Usage description: Learn to use the Web UI for browser-based AI development collaboration order: 9 lang: en
OpenCode provides a Web UI for browser-based AI collaboration.
1. What You Will Learn
- Web UI startup
- Interface features
- Differences from TUI
- Use cases
2. Start Web UI
BASH
opencode web
Optional parameters:
| Parameter | Description |
|---|---|
--port |
Listen port (default 4096) |
--hostname |
Listen address |
--cors |
Allow cross-origin |
After starting, the browser opens automatically, or visit http://localhost:4096.
3. Interface Features
- Chat area: Natural language input, similar to TUI
- File browser: Left sidebar file tree for browsing and viewing
- Code preview: Modifications shown as diffs with syntax highlighting
- Tool execution: Shows AI tool call details
4. Web UI vs TUI
| Feature | Web UI | TUI |
|---|---|---|
| Interface | Browser graphical | Terminal character |
| File browsing | File tree | @ references |
| Code preview | Diff view | Terminal display |
| Mobile access | Supported | Not supported |
| Remote collaboration | Supported | Not supported |
| Resource usage | Higher | Lower |
5. Use Cases
- Remote development: Start on server, access locally
- Team collaboration: Configure
--hostname 0.0.0.0for LAN access - Mobile work: Access from phone/tablet browser
BASH
opencode web --hostname 0.0.0.0 --port 4096
Security: Set a password for LAN exposure:
BASHexport OPENCODE_SERVER_PASSWORD=your_password opencode web --hostname 0.0.0.0
❓ FAQ
Q Does Web UI support HTTPS?
A OpenCode includes HTTP service. For HTTPS, configure Nginx reverse proxy with SSL.
Q Multiple users on the same Web UI session?
A Conflicts occur. Web UI is single-session. For multi-user, start separate OpenCode instances.
Q Alice uses Web UI at office, Bob uses TUI at home—can they collaborate?
A Yes. Both operate the same project via Git. Code changes sync through Git.
📖 Summary
opencode webstarts browser interface- Supports file browsing, code preview, tool execution
- Ideal for remote development and team collaboration
- Configure security for LAN usage
📝 Exercises
-
Basic: Start Web UI and complete a conversation in the browser.
-
Intermediate: Configure Web UI for LAN access and connect from another device.
-
Advanced: Use both Web UI and TUI on the same project, comparing experiences.