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


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


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

BASH
opencode web --hostname 0.0.0.0 --port 4096

Security: Set a password for LAN exposure:

BASH
export 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


📝 Exercises

  1. Basic: Start Web UI and complete a conversation in the browser.

  2. Intermediate: Configure Web UI for LAN access and connect from another device.

  3. Advanced: Use both Web UI and TUI on the same project, comparing experiences.

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏