OpenCode Mobile security
OpenCode Mobile connects to a development server that may access source code, terminals, tools, and AI-provider credentials. Treat that connection as privileged infrastructure, not as a harmless consumer-app login.
Security model
- Your OpenCode server runs on infrastructure you control.
- The mobile client connects directly to the server URL you configure, or through an optional Cloud Link tunnel you pair with.
- Server passwords, custom HTTP header values, custom CA material, and OIDC access or refresh tokens are stored in Keychain/Keystore-backed secure storage on native builds. Non-secret connection metadata remains in app storage. Treat the device as privileged access to the server.
- A custom CA is trusted only for one connection’s
host:portand applies to API, SSE, and terminal WebSocket traffic. OIDC sign-in uses the system browser with PKCE, never an embedded WebView. - On-device voice processes audio locally after an explicit model download. System speech uses the OS speech provider. Diagnostics are local-first; optional remote telemetry can be disabled and never includes prompts, source code, or file contents.
- Extensions and plugins execute code on your OpenCode server. Review every plugin target before installing it, and treat extension editing as a server-administration action.
- The project does not store your OpenCode prompts or source code as part of normal direct connections. Optional Cloud Link processes only the data needed to verify a subscription and pair a machine; see the privacy policy and Cloud Link security documentation.
- Optional tunnels, VPNs, reverse proxies, Cloud Link, and AI providers have their own security and privacy policies. For Cloud Link product details, see the OpenCode Cloud Link website.
Required deployment practices
- Keep OpenCode bound to
127.0.0.1unless a trusted private network specifically requires another interface. - Set a strong OpenCode password with
opencode service set passwordon OpenCode 2, orOPENCODE_SERVER_PASSWORDon a standalone/V1 server. - Prefer Tailscale, an authenticated HTTPS reverse proxy, or a carefully configured Cloudflare Tunnel.
- Never expose an unauthenticated OpenCode port through router forwarding or a public tunnel.
- Review permission requests and file changes before approving high-impact work.
- Rotate credentials after losing a device, exposing a tunnel URL, or sharing a password.
The remote-access security guide explains the threat model and configuration choices in more detail.
Report a vulnerability
Do not publish exploitable details in a public issue. Email [email protected] with:
- the affected app version;
- the affected OpenCode version;
- reproduction steps or a minimal proof of concept;
- the security impact;
- whether the issue is already being exploited or publicly known.
The maintainer will acknowledge the report, reproduce it when possible, coordinate a fix, and publish release information after users have a reasonable opportunity to update.
For ordinary bugs without security impact, use the public issue tracker.