You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web UI over plain HTTP: sessions appear empty / missing because crypto.subtle and crypto.randomUUID are unavailable on insecure origins #46662
When opencode web is accessed over a plain http:// origin (e.g. http://<vps-ip>:4096 — a very common setup for self-hosted VPS users), multiple parts of the web UI silently fail:
Sessions list appears empty or stale — the UI relies on crypto.randomUUID() / other crypto APIs in several code paths; on insecure origins these throw, and session listing/switching breaks silently. The user sees "0 sessions" or a fresh state even though sessions exist on the server (verified via GET /session over the API — sessions were there all along).
This is a class of bugs rather than a single issue: any web-platform API gated on secure context breaks when self-hosters access the web UI over http://<ip>, which is the default for anyone running opencode web --hostname 0.0.0.0 on a VPS without a domain/TLS setup.
Steps to reproduce
On a VPS: OPENCODE_SERVER_PASSWORD=xxx opencode web --port 4096 --hostname 0.0.0.0
Open http://<vps-ip>:4096 in Chrome/Firefox from a remote machine
Try attaching an image via + → nothing happens, no error
Create a session, refresh — session list may appear empty even though GET /session returns sessions
Repeat the same over http://localhost:4096 (or via an HTTPS reverse proxy / tunnel) — everything works
Expected
Either:
Graceful fallbacks (crypto.getRandomValues instead of crypto.subtle.digest, Math.random-based UUID fallback) so the web UI fully works on insecure origins, or
A visible warning banner: "You are accessing over an insecure origin; some features (attachments, session management) may not work"
Actual
Silent failure with zero user feedback. Users on VPS deployments think sessions are lost or uploads are broken, and there is no hint that the origin is the problem.
Environment
opencode 1.18.25 (web UI, Linux VPS)
accessed via http://<ip>:4096 from a remote desktop browser
workaround verified: putting an HTTPS reverse proxy (Cloudflare tunnel) in front of the server makes everything work
Since you've already referenced both in your report, you may want to add any additional context (e.g. the sessions-list appearing empty) as a comment on #46168 rather than tracking it as a separate issue.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Sep 1, 2026
This issue might be a duplicate of existing issues. Please check:
crypto.randomUUID/crypto.subtleunavailable on non-localhost HTTP origins, breaking session delete and file attach in the Web UISince you've already referenced both in your report, you may want to add any additional context (e.g. the sessions-list appearing empty) as a comment on #46168 rather than tracking it as a separate issue.
hosein-ul commentedon Sep 5, 2026
hey??????
hosein-ul commentedon Sep 5, 2026
@Hona
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊