This is the full developer documentation for OpenCode Mobile # OpenCode Mobile Documentation > Set up OpenCode Mobile, connect your OpenCode server, and use chats, projects, terminal, voice, extensions, notifications, sharing, and Cloud Link. OpenCode Mobile is a community-built Android and iOS client for an [OpenCode](https://opencode.ai/) server that you run yourself. It keeps agent work, approvals, project files, extensions, and terminal commands reachable from your phone. OpenCode Mobile is **not** an official OpenCode product, a hosted AI service, or a replacement for the OpenCode server. ## Choose your starting point | If you want to… | Start here | | ----------------------------------------------------------------------- | --------------------------------------------------- | | Understand what the app does | [What is OpenCode Mobile?](https://getopencode.app/docs/introduction/) | | Download the app | [Download and install](https://getopencode.app/docs/opencode-android-app/) | | Connect a server and finish a first task | [Set up OpenCode Mobile](https://getopencode.app/docs/getting-started/) | | Manage servers, QR pairing, custom headers, certificates, or Cloud Link | [Add or switch connections](https://getopencode.app/docs/connections/) | | Learn the controls after setup | [User manual](https://getopencode.app/docs/user-manual/) | | Fix a connection or feature problem | [Troubleshooting](https://getopencode.app/docs/guides/troubleshooting/) | ## The shortest safe path 1. **[Install the app](https://getopencode.app/docs/opencode-android-app/)** from Google Play, the direct APK, or TestFlight. 2. **[Start OpenCode 2 and pair](https://getopencode.app/docs/getting-started/#3-start-opencode)** on the machine that owns your project. 3. **[Connect the app](https://getopencode.app/docs/getting-started/#5-connect-the-app)** with a QR code, manual URL, headers, certificate, OIDC, or Cloud Link. 4. **[Select a project](https://getopencode.app/docs/getting-started/#6-select-a-project)** and send a small, verifiable task. If you only need the app on the same trusted network, the [local network guide](https://getopencode.app/docs/guides/local-network/) is the shortest route. For access outside your network, compare [Tailscale, Cloudflare Tunnel, a reverse proxy, SSH, and Cloud Link](https://getopencode.app/docs/remote-access/). ## Do a specific task * **[Start and monitor a task](https://getopencode.app/docs/guides/tasks/)** — send work, follow progress, use commands or mentions, steer a running turn, and stop a bad direction. * **[Manage chats and sessions](https://getopencode.app/docs/guides/sessions/)** — search, favorite, rename, delete, fork, or revert work. * **[Review approvals and changes](https://getopencode.app/docs/guides/approvals-and-changes/)** — answer permissions and review Turn, Uncommitted, or Branch diffs. * **[Use voice](https://getopencode.app/docs/guides/voice/)** — dictate a prompt or run a wake-word conversation. * **[Understand session usage](https://getopencode.app/docs/guides/usage/)** — read context pressure, tokens, steps, and cost estimates. * **[Work with project files](https://getopencode.app/docs/guides/workspace-files/)** — search, read, preview, download, move, and save files. * **[Use the terminal](https://getopencode.app/docs/guides/terminal/)** — open a project PTY in the xterm-based terminal. * **[Manage worktrees](https://getopencode.app/docs/guides/worktrees/)** — isolate parallel work. * **[Configure providers and models](https://getopencode.app/docs/guides/providers-and-models/)** — connect AI providers and choose models. * **[Enable automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/)** — classify prompts and map tiers to models. * **[Manage extensions](https://getopencode.app/docs/guides/extensions/)** — edit MCPs, plugins, agents, skills, commands, and plugin panels. * **[Manage MCP and diagnostics](https://getopencode.app/docs/guides/mcp-and-diagnostics/)** — inspect tools, realtime updates, logs, and server health. * **[Receive task notifications](https://getopencode.app/docs/guides/notifications/)** — completion and needs-input alerts. * **[Share from another app](https://getopencode.app/docs/guides/share-from-other-apps/)** — send text, links, and files into a chat on Android. * **[Use quick actions and widgets](https://getopencode.app/docs/guides/quick-actions-and-widgets/)** — reach recent chats from the launcher or Android home screen. ## Connect your way | Method | Best for | Guide | | ----------------- | --------------------------------------------------- | ---------------------------------------------------- | | Manual URL | Any reachable server, including a VPN or tunnel | [Connections](https://getopencode.app/docs/connections/) | | Local QR | Phone and computer on the same network (OpenCode 2) | [Local network](https://getopencode.app/docs/guides/local-network/) | | Tailscale | Private access between your own devices | [Tailscale](https://getopencode.app/docs/guides/tailscale/) | | Cloudflare Tunnel | A public HTTPS address with your own tunnel | [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/) | | Reverse proxy | Existing HTTPS infrastructure or an API prefix | [Reverse proxy](https://getopencode.app/docs/guides/reverse-proxy/) | | SSH forwarding | Advanced users with a mobile SSH client | [SSH forwarding](https://getopencode.app/docs/guides/ssh-forward/) | | Cloud Link | Managed remote access with a store subscription | [Cloud Link](https://getopencode.app/docs/cloud-link/) | Manual connections can also add custom HTTP headers, a private CA, or OIDC. Read the [remote access security model](https://getopencode.app/docs/guides/remote-access-security/) before exposing a server beyond a trusted network. ## How the pieces fit | Piece | What it is | Where it runs | | ---------------- | --------------------------------------------------- | ---------------------------- | | OpenCode Mobile | The mobile client you install | Android or iOS | | OpenCode server | The coding agent that owns your project | Your computer or server | | Connection route | LAN, VPN, tunnel, proxy, SSH forward, or Cloud Link | Between the phone and server | The app is a remote control. Your repository, provider credentials, build tools, and complete development environment stay on the machine that runs OpenCode. ## Configure the app Use [Settings and customization](https://getopencode.app/docs/guides/settings/) for the searchable settings map: appearance, chat behavior, voice, notifications, language, connections, providers, extensions, approvals, diagnostics, updates, and support. ## Fix a problem * **[Troubleshooting](https://getopencode.app/docs/guides/troubleshooting/)** — work from the server outward with a symptom-based checklist. * **[FAQ](https://getopencode.app/docs/faq/)** — short answers about platforms, connections, file editing, extensions, voice, sharing, widgets, and privacy. * **[Releases and compatibility](https://getopencode.app/docs/changelog/)** — current release, OpenCode 1.x/2.x support, and known limits. ## For AI assistants Use [Documentation for AI assistants](https://getopencode.app/docs/for-ai-agents/) for canonical facts, machine-readable endpoints, and citation guidance. The site also publishes [`llms.txt`](https://getopencode.app/llms.txt), [`llms-full.txt`](https://getopencode.app/llms-full.txt), and raw Markdown for every page. # Set Up OpenCode Mobile > Install OpenCode Mobile, start an OpenCode 2 server, pair with a QR code, connect from Android or iOS, and complete your first task. This guide covers the shortest safe path from an OpenCode server to your first completed mobile task. OpenCode 2 is the current primary target; the app also supports OpenCode 1.x servers with manual connections for the core surface. ## What you need * An Android device (64-bit ARM) or iPhone/iPad. * A computer or server running a current OpenCode version. * A network route from the phone to the server: local network, VPN, tunnel, reverse proxy, SSH forward, or Cloud Link. * The server URL and password, or a one-time pairing link/QR code. ## 1. Install OpenCode Mobile Use the [Download page](https://getopencode.app/download/) to choose an installation method: * **Google Play (recommended):** install and receive updates through Google Play. * **Direct GitHub APK:** download and install the latest release manually. Android release artifacts are arm64-v8a only. * **iOS TestFlight beta:** join the [OpenCode Mobile TestFlight release](https://testflight.apple.com/join/ddcE5Wzz) and install the beta. The Android options install the latest Android release; TestFlight installs the iOS beta. See [Download and install](https://getopencode.app/docs/opencode-android-app/) for platform-specific details. ## 2. Install or update OpenCode For OpenCode 2, use the current v2 installer: ```bash curl -fsSL https://opencode.ai/v2/install | bash ``` Or install the CLI with npm: ```bash npm install -g @opencode/cli ``` Confirm the installed major version: ```bash opencode --version ``` If you deliberately use an OpenCode 1.x server, install it with the 1.x installer (`https://opencode.ai/install` or `opencode-ai` on npm) and use the V1 startup note below. ## 3. Start OpenCode ### Recommended: OpenCode 2 shared service and pairing OpenCode 2 normally runs a shared background server. Start it explicitly, confirm its address, and create a pairing link: ```bash opencode service set password 'use-a-strong-password' opencode service set port 4096 opencode service start opencode service status opencode pair ``` `opencode pair` prints a one-time link and a QR code. Scan the QR code from OpenCode Mobile, or paste the pairing link into the app. Pairing links expire after five minutes and work once. If the phone is on the same trusted LAN, bind the service to a reachable interface before pairing: ```bash opencode service set hostname 0.0.0.0 opencode service start opencode pair ``` Only do this on a trusted network and protect the server with a password. For access through Tailscale, Cloudflare Tunnel, or a reverse proxy, keep the service on loopback and pair with the public URL. If you changed the hostname for LAN access, set it back and restart before pairing: ```bash opencode service set hostname 127.0.0.1 opencode service start opencode pair --url https://your-opencode-host.example ``` OpenCode 2 also supports `opencode pair --remote`, which exposes the server through an OpenTunnel address after an explicit confirmation. This is separate from Cloud Link. Treat the tunnel like any other public endpoint and review the [remote-access security guidance](https://getopencode.app/docs/guides/remote-access-security/). ### Standalone server `opencode serve` runs the same server in the foreground instead of through the shared background service: ```bash OPENCODE_SERVER_PASSWORD='use-a-strong-password' \ opencode serve --hostname 127.0.0.1 --port 4096 ``` Use this for an always-on host, a service supervisor, Docker, or a deliberately dedicated server. Pairing requires the shared service, so connect to a standalone server manually with its URL and password. ### OpenCode 1.x On OpenCode 1.x, start `opencode serve` for the API, or `opencode web` when you also want the browser UI: ```bash export OPENCODE_SERVER_USERNAME=your-user export OPENCODE_SERVER_PASSWORD='use-a-strong-password' opencode serve --hostname 127.0.0.1 --port 4096 ``` Connect V1 servers manually. Local QR pairing is an OpenCode 2 feature. V1 is maintained for the feature intersection with V2; archive/share, title summarization, worktree reset, LSP/formatter diagnostics, and the composer auto-approve/saved-rules surfaces are not available. ### Verify the server With the shared service running: ```bash opencode api get /api/info ``` For a manual or external connection, test the exact API base from the phone’s network: ```bash curl -u your-user:use-a-strong-password \ https://your-opencode-host.example/global/health ``` For a path-prefixed proxy, include the prefix: ```bash curl -u your-user:use-a-strong-password \ https://your-opencode-host.example/api/global/health ``` A healthy response includes `healthy: true` and may include the OpenCode version. If the root displays a web UI and the app reports a 404 or a non-API response, enter the API base URL instead—commonly the same address with `/api`. ## 4. Choose a connection route | Route | Best for | Phone-side action | | ----------------- | ---------------------------------------------- | ---------------------------------------------------------------- | | Local network | Phone and server on the same private network | Scan `opencode pair`, or enter the LAN URL | | Tailscale | Private access across networks | Scan a pair link created with `--url`, or enter the `ts.net` URL | | Cloudflare Tunnel | Public HTTPS without router port forwarding | Scan a pair link created with `--url`, or enter the tunnel URL | | Reverse proxy | Existing HTTPS infrastructure or a path prefix | Scan a pair link created with `--url`, or enter the API base | | SSH local forward | Advanced users with a mobile SSH client | Enter `http://127.0.0.1:4096` manually | | Cloud Link | Managed access with a store subscription | Scan the connector QR | Follow [Remote Access](https://getopencode.app/docs/remote-access/) for the exact commands and security tradeoffs. Use the dedicated [Tailscale](https://getopencode.app/docs/guides/tailscale/), [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/), [local network](https://getopencode.app/docs/guides/local-network/), or [Cloud Link](https://getopencode.app/docs/cloud-link/) guide for the route you choose. Cloud Link is a separate connector product. See the [OpenCode Cloud Link website](https://opencodecloud.link/) for connector downloads, platform support, and pricing. ## 5. Connect the app On first launch, onboarding walks through these steps: 1. **Welcome** — continue into setup. 2. **Permissions** — optionally enable notifications and voice input. 3. **Connect** — add a server connection. 4. **AI & providers** — optionally configure providers, models, and automatic routing. 5. **Project** — choose a server project or add a folder. 6. **General** — choose the interface language and, on V2, prompt delivery. 7. **Voice & responses** — choose how you talk and hear replies. 8. **Privacy** — choose local diagnostics and, when available, optional remote telemetry. 9. **Ready** — review the setup and start. The AI and Project steps appear after a connection exists, so a first run that skips the server sees fewer steps. Every step has a Skip action. In **Connect**, the Add connection chooser offers: * **Scan QR code** — scan the link printed by `opencode pair`. The link must contain an address the phone can reach; a loopback-only link will not work across devices unless the phone itself owns that loopback route. * **Manual** — enter a name (optional), the complete server URL, username, and password. Manual connections can also add custom HTTP headers, a custom CA certificate, or OpenID Connect. * **Cloud Link** — pair with a managed connector when the app was installed from the App Store or Google Play and an active subscription is available. For manual setup, include `https://` and any required path prefix. If a password is set and Username is blank, the client uses `opencode` as the Basic-auth username. Entering the explicit server username is clearer and easier to troubleshoot. You can skip permissions, connection, or project during onboarding and configure them later in **Settings → Connection** and the **Projects** tab. Editing a saved connection does not reconnect automatically; use **Reconnect** when you want to apply the change. See [Add or switch connections](https://getopencode.app/docs/connections/) for saved profiles, pairing details, custom headers, certificates, OIDC, Cloud Link, and switching servers. ## 6. Select a project Choose the project during onboarding or later in **Projects**. The picker lists the projects the server reports, in server order. Search filters the list; **Add project** opens a server folder browser with a manual path fallback. The selected project scopes chats, files, and terminal activity. The app remembers the last session used for each project. If a project does not appear, confirm the server reported it or add the server directory from the project picker. To hide a server project on this device only, use its archive action. On OpenCode 2, **Archived on OpenCode** shows server-archived projects as read-only with a location-based restore. See [Projects](https://getopencode.app/docs/guides/projects/). ## 7. Complete your first task 1. Open **Chat** and confirm the expected session title and project appear at the top. 2. Select the agent and model above the composer. 3. Send a small, verifiable request such as: `Inspect this project and summarize its purpose. Do not change files.` 4. Watch the transcript while OpenCode works. 5. Respond if a permission or question card appears. 6. Tap the change chip above the composer and confirm that the read-only task produced no edits. For your first implementation task, ask for one contained change and its related test. Review both the assistant response and the changes overlay before accepting the result. ## 8. Check optional capabilities After connecting, use **Settings → Diagnostics** and the **Projects** tab to confirm which features the server exposes: * Provider and model discovery, variants, and automatic model routing * Global realtime events * MCP, health, network, and app-error diagnostics * Extension management on OpenCode 2 * File status and VCS information * Device-local project archive and, on V2, server-archived projects * Experimental worktrees * PTY terminal support * V2 media preview, downloads, and file copy/move/rename/delete * V2 saved approval rules and composer auto-approve * V2 plugin GUI panels Missing optional endpoints should not prevent core chat use. See [Releases and compatibility](https://getopencode.app/docs/changelog/) for the current contract differences. ## Security notes * Never expose an unauthenticated OpenCode server to the public internet. * Prefer Tailscale, Cloudflare Tunnel, or an authenticated HTTPS reverse proxy over router port forwarding. * Use `0.0.0.0` only for a trusted LAN and restrict the port with the host firewall. * Set a strong OpenCode service password. Pairing links are credentials: they expire quickly and work once, but they still grant access while valid. * On native iOS and Android builds, connection passwords, custom header values, CA material, and OIDC tokens use secure storage; non-secret connection details use app storage. * Treat the device as containing access to your OpenCode server. Rotate credentials if a tunnel URL, device, or password is compromised. * Cloud Link is optional. Review the [privacy policy](https://getopencode.app/privacy-policy/) before subscribing. ## If connection still fails * Confirm the phone can reach the exact API URL. * Run `opencode service status` and `opencode api get /api/info` on the server. * Confirm the phone is connected to the same Tailscale tailnet when using Tailscale. * Check the password against `opencode service set password` or the `OPENCODE_SERVER_PASSWORD` environment variable. * For local pairing, run `opencode pair` again if the link expired or was already used. * For a standalone `opencode serve` process, connect manually; pairing requires the shared service. * If the address returns HTML, 404, or a JSON parse error, use the actual API base path. * If a gateway returns 401 or 403, check the connection’s custom headers. * If a certificate is rejected, confirm it covers the same `host:port` and has not expired. * If OIDC expires, confirm the issuer and redirect URI, then sign in again. * Update to the latest mobile release and check **Settings → Diagnostics**. * Continue with the [connection troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/) before filing a bug. # What Is OpenCode Mobile? > Learn what the community-built OpenCode mobile client does, how it connects to your server, which screens it includes, and where its limits are. OpenCode Mobile is a community-built mobile client for an OpenCode server. It keeps active coding work reachable from a phone without trying to turn a small screen into a full desktop IDE. The app is distributed for Android through Google Play and direct APK releases, and for iOS through [TestFlight](https://testflight.apple.com/join/ddcE5Wzz). Start on the [Download page](https://getopencode.app/download/), then connect it to an OpenCode server that you control. OpenCode 2 is the current primary target and supports the quickest setup through `opencode service start` and `opencode pair`. The client still detects and supports OpenCode 1.x (V1) servers with manual connections for the core surface. ## What you can do * Start, monitor, steer, stop, and continue OpenCode chats * Switch between saved servers, server projects, worktrees, and sessions without losing context * Favorite, rename, delete, fork, and revert sessions; jump back to the latest activity * Review transcript activity, changes, diffs, todos, permissions, and questions * Send prompts, attachments, shared content from other apps, slash commands, mentions, and shell commands * Choose agents, models, variants, reasoning behavior, and per-agent model memory * Let automatic model routing choose a model for each prompt * Use voice dictation, on-device wake-word conversation mode, and spoken replies * Receive completion and needs-input notifications on supported native builds * Use quick actions and three Android home-screen widgets * Inspect server health, realtime status, network behavior, MCP state, and app-error diagnostics * Work with project files, media previews, file actions, worktrees, MCP servers, extensions, and an xterm-based project terminal * Manage MCPs, plugins, agents, skills, and slash commands on OpenCode 2 * Open sandboxed plugin GUI panels inside the app * Connect through a LAN, Tailscale, Cloudflare Tunnel, reverse proxy, SSH forward, OIDC, or optional Cloud Link ## Main areas ### Chat Chat is the main operator surface. It includes the chat library, transcript, current activity, changes review, todos, model and agent controls, attachments, permissions, questions, and message actions such as fork, revert, and undo revert. The chat library groups sessions by server and project and shows project paths. It opens from the current chat title. A change chip above the composer opens the review overlay; there are no separate Session and Files Changed tabs. The composer supports server commands, `@` mentions, and `!` shell mode on OpenCode 2, plus the built-in `/compact` and `/btw` commands. On OpenCode 2, **Steer** and **Append** control whether a message sent during work applies at the next step or waits for a later turn. OpenCode Mobile listens for global server events and uses polling as a fallback. A temporary event-stream interruption should not make an active task invisible. A prompt attempted while offline is queued and sent once after reconnect; an uncertain timeout is marked and never replayed automatically. ### Projects Projects keep chats, files, and terminal sessions tied to the repository selected on the OpenCode server. The picker lists the server’s projects in server order; it does not keep a separate local “opened” list. Depending on server capabilities, you can: * Select a server project or add a directory through a folder browser * Hide a project on this device, or restore a server-archived project on OpenCode 2 * Search and read text files, preview media, download files, and save focused edits * Copy, move, rename, or delete files on OpenCode 2 * Inspect changed-file counts and the current VCS branch * Create, select, and remove experimental worktrees ### Terminal Terminal connects to project PTYs through a short-lived server ticket and a project-scoped WebSocket. The xterm-based surface supports ANSI/VT cursor behavior, alternate-screen programs, 10,000 lines of scrollback, resize, reconnect, and a mobile keyboard accessory with Esc, Tab, modifiers, arrows, and paste. It is still a mobile terminal, not a replacement for a desktop terminal workspace. ### Settings Settings is searchable and grouped into **App preferences** (Appearance, Chat & responses, Voice & audio, Notifications, Language, About & support), **Connections** (Connection, Cloud Link), and the **Selected server** (AI & providers, Extensions, Approvals, Diagnostics). See [Settings and customization](https://getopencode.app/docs/guides/settings/) for the complete map. ## Connection model The app can use: * A trusted local-network address * A local QR code created by `opencode pair` on OpenCode 2 * A private Tailscale HTTPS address * A Cloudflare Tunnel address * A reverse-proxy address, including a path prefix such as `/api` * A loopback address backed by a separate SSH forwarding app * A manual connection with custom headers, a custom CA, or OIDC * An optional Cloud Link machine Saved connection profiles let you switch servers without retyping the URL and password. See [Add or switch connections](https://getopencode.app/docs/connections/) and [Remote access](https://getopencode.app/docs/remote-access/). ## Important boundaries * OpenCode Mobile is not an official OpenCode product. * It is not a generic consumer chatbot or a replacement for a full IDE. * On native iOS and Android builds, non-secret connection details use app storage and credentials use Keychain/Keystore-backed secure storage. Browser builds cannot persist credentials through native secure storage. * OpenCode 1.x is supported for the core V1∩V2 surface. Archive/restore/share, title summarization, worktree reset, LSP/formatter diagnostics, and the composer auto-approve/saved-rules surfaces are not available. * Extensions management, plugin GUI panels, media preview, file mutations, composer mentions/shell mode, and server-classifier routing require OpenCode 2. * Cloud Link is an optional paid remote-access service available only in store-installed iOS and Android builds. Direct APK and web builds do not offer it. * Android release artifacts are arm64-v8a only; 32-bit-only devices are unsupported. * iOS inbound sharing and iOS home-screen widgets are not yet available; Android supports both. * Older removed API shapes are not compatibility targets. Use a current OpenCode server and the latest mobile release. The simplest mental model is: OpenCode runs the work; OpenCode Mobile is a focused control surface for it. ## Recommended learning path 1. Follow [Set Up OpenCode Mobile](https://getopencode.app/docs/getting-started/) to install, connect, and run a first task. 2. Open [Features and guides](https://getopencode.app/docs/features/) and choose the outcome that matches your situation. 3. Use the [User manual](https://getopencode.app/docs/user-manual/) for orientation, then open the focused guide from the sidebar. 4. Read [Remote access](https://getopencode.app/docs/remote-access/) before connecting outside your local network. # Connect OpenCode Mobile to Your Server > Add, save, and switch OpenCode server connections with a URL, local QR pairing, custom headers or certificates, OIDC, or Cloud Link. Use **Settings → Connection** to add a server, switch between saved servers, edit a profile, or reconnect. The app can keep multiple connection profiles, and every project, session, favorite, notification record, and terminal tab is scoped to the active connection. ## Choose how to add a connection | Method | Best for | Requirements | | ---------------- | -------------------------------- | ----------------------------------------------------------------------------------- | | **Manual** | Any reachable server | Server URL, optional username, password, and optional headers, certificate, or OIDC | | **Scan QR code** | Fast setup on the same network | `opencode pair`, camera, reachable server | | **Cloud Link** | Managed access over the internet | Store-installed app, active subscription, desktop connector | These are different from the network route. A manual connection can use a LAN, Tailscale, Cloudflare Tunnel, or reverse proxy. Cloud Link is its own managed route. See [Remote access](https://getopencode.app/docs/remote-access/). ## Add a manual connection 1. Open **Settings → Connection**. 2. Tap **Add connection**. 3. Choose **Manual**. 4. Enter a name, server URL, username, and password. 5. Optionally configure custom HTTP headers, a custom CA certificate, or OpenID Connect. 6. Tap **Save & connect**. The name is optional; the app uses the normalized hostname when it is blank. The server URL should include the protocol and any required path prefix, for example `https://dev.example.com/api`. The app preserves the prefix for API, event, file, and terminal requests. If a password is set and the username is blank, the app uses `opencode` as the Basic-auth username. Entering the configured username explicitly is easier to troubleshoot. After the address is entered, the app probes the server without switching the active connection. You can go back, change fields, and retry without losing the form values. ### Custom HTTP headers Manual connections can add header name/value pairs for gateways and proxies such as Cloudflare Access, Authelia, or oauth2-proxy. * Values are stored in Keychain/Keystore-backed secure storage, not in plain profile metadata. * Headers are sent on probes, REST requests, SSE, terminal connect-token requests, and native terminal WebSocket upgrades. * Attachment previews may load arbitrary hosts without the connection headers, so a server-hosted attachment behind Access can fail to preview. * Local QR and Cloud Link profiles cannot carry custom headers; configure those routes at the gateway or use a manual connection. ### Custom CA certificate Native manual connections can trust a private or self-signed CA for one server. * Import a PEM or DER certificate. * The trust applies only to that server’s `host:port` and covers API, SSE, and terminal WebSocket traffic. * The certificate is encrypted at rest with AES-256-GCM; the key stays in secure storage. * The form shows the subject, issuer, expiry, and SHA-256 fingerprint, and supports replace or remove. * The option is hidden for Cloud Link and cleared when the server is detected as OpenCode 1.x. * A certificate failure shows a distinct message instead of “unreachable.” ### OpenID Connect Manual connections can sign in through an OIDC provider with PKCE, with or without the server password. 1. Enter the issuer URL, client ID, scopes, and the request header that carries the token. The default header is `X-Auth-Request-Access-Token` with a raw JWT. 2. Register the displayed redirect URI with the provider. It defaults to the app’s own scheme. 3. Tap **Sign in**. The system browser opens; the app never uses an embedded WebView for the provider login. 4. Complete the provider flow and return to the app. With a password set, requests keep Basic `Authorization` and add the JWT header. A passwordless connection uses `Authorization: Bearer` plus the token header. The access token renews silently. An invalid or revoked refresh grant requires **Sign in again**; a temporary provider failure preserves the session. OIDC requires HTTPS, except for explicit loopback development. Access and refresh tokens are encrypted at rest and never appear in profile metadata. Cloud Link connections do not offer this option. ## Add a local QR connection Local QR pairing is an OpenCode 2 flow and requires the shared background service. On the computer running OpenCode: ```bash opencode service set password 'use-a-strong-password' opencode service set port 4096 opencode service start opencode service status opencode pair ``` `opencode pair` prints a one-time link and QR code. In the app, open **Settings → Connection → Add connection → Scan QR code** and scan it. A successful scan saves the profile and connects automatically. Links expire after five minutes and work once. The server must listen on an address the phone can reach. If the phone is on the same trusted LAN, bind the shared service before pairing: ```bash opencode service set hostname 0.0.0.0 opencode service start opencode pair ``` A link containing only `localhost` or `127.0.0.1` cannot work from another device. Only expose the server on a trusted network. Local QR pairing does not require a Cloud Link subscription. Camera scanning is available on native builds; FOSS builds omit the camera module and keep manual entry. For a public Tailscale, Cloudflare, or reverse-proxy URL, keep the service on loopback and create the link with that origin: ```bash opencode service set hostname 127.0.0.1 opencode service start opencode pair --url https://your-opencode-host.example ``` Pairing requires the shared service. A standalone `opencode serve` process must be connected manually. If the code is invalid or expired, run `opencode pair` again. A failed save or connection keeps the redeemed credential so you can retry without pairing again. Local QR and Cloud Link profiles cannot carry custom headers or a custom CA. Use a manual connection when the route needs them. ## Add a Cloud Link machine Cloud Link is the managed option. It requires an app installed from the App Store or Google Play, an active subscription, and the Cloud Link connector running on the computer. Download the connector and review platform support at the [OpenCode Cloud Link website](https://opencodecloud.link/). Direct APK and web builds do not show the Cloud Link section. Open **Settings → Cloud Link**, then follow the guided steps to subscribe or restore access, scan the connector QR code, approve the connection on the computer, and connect. See [Cloud Link](https://getopencode.app/docs/cloud-link/) for the full flow and limits. ## Manage saved connections Each saved connection appears as a collapsible row in **Settings → Connection**: * **Connect** switches to that server. * **Edit** updates the saved profile. Editing the active connection does not reconnect automatically; use **Reconnect** to apply it. * **Delete** removes a saved profile after confirmation. The active connection cannot be deleted. * The active row shows an **Active** or **Connecting** badge. * The current unsaved connection appears as **Current connection** until you save it. Switching connections saves the outgoing profile’s model selection, restores the target profile’s selection, clears server-derived state, and reconnects. A session running on the previous server is not transferred; favorites and notification records stay per connection. ## Credentials and privacy * Non-secret metadata such as the connection name, URL, username, and model selection is stored in app storage. * Server passwords, custom header values, CA private material, and OIDC tokens use secure storage as described above. * Notification records store the server URL and username but never the password. * Browser builds cannot persist credentials through native secure storage. * Treat a device with a saved connection as having access to that server. Rotate the password after losing a device. ## Verify the connection Test the exact API base from the phone’s network: ```bash curl -u your-user:use-a-strong-password \ https://your-opencode-host.example/global/health ``` A web page at the root is not proof that the API is reachable. If the app sees HTML, a 404, or a JSON parse error, use the API base path, commonly `/api`. ## Troubleshooting * **The server is unreachable:** confirm the URL, network route, VPN/tunnel, and firewall. * **Authentication is rejected:** confirm `OPENCODE_SERVER_USERNAME` and `OPENCODE_SERVER_PASSWORD`; reconnect after editing. * **A gateway returns 401 or 403:** confirm the custom header names and values, then reconnect. * **A certificate is rejected:** confirm the certificate covers the same `host:port`, re-import it, and check its expiry. * **OIDC loops or expires:** confirm the issuer, client ID, scopes, and redirect URI; sign in again after a revoked refresh grant. * **The app connects but no project appears:** refresh **Projects** and check diagnostics. * **Local QR says the address is loopback-only:** bind the server to a reachable interface on a trusted network. * **Cloud Link is missing:** confirm the app came from the App Store or Google Play and the subscription is available. Continue with [Troubleshooting](https://getopencode.app/docs/guides/troubleshooting/) or review the [remote-access security guide](https://getopencode.app/docs/guides/remote-access-security/). # Access OpenCode Remotely from Mobile > Connect OpenCode Mobile through a trusted LAN, local QR pairing, Tailscale, Cloudflare Tunnel, reverse proxy, SSH forward, or Cloud Link. OpenCode Mobile can connect through a local address, private VPN, HTTPS tunnel, reverse proxy, SSH forward, or managed Cloud Link machine. The app needs an OpenCode API base URL; it does not require a specific tunnel provider. Read the [remote-access security model](https://getopencode.app/docs/guides/remote-access-security/) before publishing any endpoint. ## Two separate decisions 1. **How will you reach the server?** Choose a LAN, VPN, tunnel, proxy, SSH forward, or Cloud Link. 2. **How will you add the connection in the app?** Use manual details, a local QR code, or Cloud Link. The [connection guide](https://getopencode.app/docs/connections/) covers the in-app flow. This page compares the network routes. ## Connection requirements Every manual route supplies the same three values: * **Server URL:** origin plus any required API path prefix * **Username:** `OPENCODE_SERVER_USERNAME` * **Password:** `OPENCODE_SERVER_PASSWORD` Manual connections can also attach custom HTTP headers for a gateway, trust a private CA for that `host:port`, or sign in through OIDC. Local QR and Cloud Link profiles do not carry custom headers or a custom CA. The client normalizes a missing protocol, preserves configured path prefixes such as `/api`, adds optional HTTP Basic authentication, and scopes session, file, terminal, and event requests to the selected project. The OpenCode 2 shared service uses the username `opencode` by default; its password is the one set with `opencode service set password`. ## Start OpenCode for mobile | OpenCode version | Recommended start | App connection | | ----------------------------- | ------------------------------------------------------------------ | ------------------------------------------ | | **OpenCode 2 shared service** | `opencode service start`, then `opencode pair` | Scan the QR code or paste the pairing link | | **OpenCode 2 standalone** | `opencode serve --hostname 127.0.0.1 --port 4096` | Enter the URL and password manually | | **OpenCode 1.x** | `opencode serve` for the API, or `opencode web` for the browser UI | Enter the URL and password manually | For OpenCode 2, set the service password before pairing: ```bash opencode service set password 'use-a-strong-password' opencode service set port 4096 opencode service start opencode service status opencode pair ``` The pair command prints a one-time link and QR code. Pairing links expire after five minutes and work once. When the hostname changes, restart the service before pairing again. For a remote URL behind Tailscale, Cloudflare Tunnel, or a reverse proxy, create the pair link with that public origin: ```bash opencode pair --url https://your-opencode-host.example ``` Pairing requires the shared background service. A standalone `opencode serve` process must be connected manually. ## Choose a route | Method | Use it when | Guide | | --------------------------- | -------------------------------------------------------------- | ---------------------------------------------------- | | Local network | Phone and server share a private Wi-Fi or LAN | [Local network](https://getopencode.app/docs/guides/local-network/) | | Local QR | You want same-network setup without typing the address | [Add or switch connections](https://getopencode.app/docs/connections/) | | Tailscale Serve | Only your own devices need access | [Tailscale](https://getopencode.app/docs/guides/tailscale/) | | Cloudflare Tunnel | You need a public HTTPS address without router port forwarding | [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/) | | Reverse proxy or API prefix | OpenCode is mounted under `/api` or another subpath | [Reverse proxy](https://getopencode.app/docs/guides/reverse-proxy/) | | SSH local forwarding | A mobile SSH client can hold a port forward open | [SSH forwarding](https://getopencode.app/docs/guides/ssh-forward/) | | Cloud Link | You want managed remote access with a store subscription | [Cloud Link](https://getopencode.app/docs/cloud-link/) | For a decision-focused comparison, see [Use OpenCode from your phone](https://getopencode.app/docs/guides/use-opencode-from-phone/). For the in-app choices, see [Add or switch connections](https://getopencode.app/docs/connections/). ## Local QR versus Cloud Link These are different features: * **Local QR** is a free, same-network setup shortcut on OpenCode 2. Start the shared service with `opencode service start`, run `opencode pair`, and scan the one-time code. The server must be reachable from the phone; a link containing only `localhost` will not work unless the phone owns that loopback route. Links expire after five minutes. * **Cloud Link** is an optional paid remote-access service for store-installed iOS and Android builds. It uses a desktop connector and a subscription to provide a managed route. It is not available in direct APK, F-Droid/FOSS, or web builds. See the [OpenCode Cloud Link website](https://opencodecloud.link/) for downloads, platform support, and pricing. If you already have Tailscale or a reliable tunnel, you do not need Cloud Link. ## Security guidance by method | Method | Exposure | Minimum guidance | | ----------------- | ---------------- | ------------------------------------------------------------------------------------------- | | LAN | Private network | Use auth, trusted Wi-Fi, and a private firewall rule | | Tailscale | Tailnet only | Keep auth enabled and restrict tailnet membership/ACLs | | Cloudflare Tunnel | Public HTTPS URL | Always use OpenCode auth; Cloudflare Access works with a manual connection’s custom headers | | Reverse proxy | Depends on proxy | Use HTTPS, preserve streaming/WebSocket behavior, and require OpenCode auth | | SSH forward | Local loopback | Protect the SSH key/account and keep the forwarding client alive | | Cloud Link | Managed tunnel | Protect the store account and device; review the Cloud Link privacy details | On native iOS and Android builds, non-secret connection details use app storage. Server passwords, custom header values, CA material, and OIDC tokens use Keychain/Keystore-backed secure storage. Pending notification records contain the server URL and username but not the password. Browser builds cannot persist credentials through native secure storage. ## Troubleshooting ### Browser works but the app does not 1. Test the exact API health URL, not only the browser UI. 2. Upgrade to the latest OpenCode Mobile release. 3. If the root serves HTML, enter the API base path, commonly `/api`. 4. Confirm that a reverse proxy forwards SSE and terminal WebSockets as well as ordinary HTTP requests. ### Authentication fails * Match the username and password to `OPENCODE_SERVER_USERNAME` and `OPENCODE_SERVER_PASSWORD`. * If Password is set but Username is blank, the app defaults the Basic-auth username to `opencode`. * Reconnect after editing connection fields; editing alone intentionally does not start a new connection. ### Connected but no project appears The server is reachable, but it may not expose a project catalog in the expected context. Refresh **Projects**, confirm the OpenCode version, and inspect **Settings → Diagnostics** for endpoint availability. ### Local QR will not pair * Confirm both devices are on a network that can reach each other. * Confirm the server is not listening only on `localhost`. * Run `opencode pair` again if the code expired or was already used. ### Cloud Link will not connect Confirm the app was installed from the App Store or Google Play, the subscription is active, the connector is running on the computer, and the QR code comes from the matching environment. See [Cloud Link](https://getopencode.app/docs/cloud-link/) and [Troubleshooting](https://getopencode.app/docs/guides/troubleshooting/). If the connection still fails, use the complete [OpenCode Mobile troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). # OpenCode Cloud Link: Remote Access from Mobile > Use Cloud Link to reach your OpenCode machine over the internet with a store subscription, connector QR pairing, and managed machines. Cloud Link is an optional managed remote-access service for OpenCode Mobile. It connects the app to a Cloud Link connector running on your computer, so you can reach an OpenCode machine without configuring your own VPN, tunnel, or reverse proxy. See the [OpenCode Cloud Link website](https://opencodecloud.link/) for connector downloads, platform support, pricing, and product documentation. Cloud Link is **not** an official OpenCode service. It is part of the independent OpenCode Mobile project. It is also different from the free local QR pairing flow: local QR works on the same network, while Cloud Link is designed for access over the internet. ## Who Cloud Link is for Cloud Link is a good fit when: * you want access from outside your home network without maintaining a tunnel; * the app was installed from the App Store or Google Play; * you are willing to use a paid store subscription; * you want to manage more than one machine from the app. Use a manual connection, [Tailscale](https://getopencode.app/docs/guides/tailscale/), or another [remote-access route](https://getopencode.app/docs/remote-access/) instead when: * you use a direct APK, F-Droid/FOSS build, or the web app; * you already have a reliable private VPN or tunnel; * you do not want a managed subscription service. ## Requirements * OpenCode Mobile installed from the App Store or Google Play. * An active Cloud Link subscription purchased or restored through the store. * The Cloud Link connector installed and running on the computer that runs OpenCode. * The connector QR code or pairing link. * A working internet connection on both devices. Cloud Link is not offered in direct APK, F-Droid/FOSS, or production web builds. Existing Cloud Link connection profiles and deep links can still work in an unsupported install, but the subscription and machine management surfaces are hidden. ## Set up Cloud Link 1. Install and open the Cloud Link connector on your computer. 2. In OpenCode Mobile, open **Settings → Cloud Link**. 3. Choose **Subscribe** and complete the App Store or Google Play purchase, or choose **Restore purchases** if you already subscribed. 4. Keep the connector’s QR code visible on the computer. 5. Tap **Scan QR code** and scan the connector code. 6. Confirm the connection on the computer if prompted. 7. Wait for the app to save the machine credentials and connect. Opening the Cloud Link section does not request camera access, pair a machine, purchase a subscription, or restore a purchase by itself. Those actions happen only after you choose them. If you already have an active subscription, the assistant can skip the purchase step and go to pairing. If access expires, the app returns to the subscription step. ## Manage machines and services The Cloud Link section shows verified access status, exposed services, subscription controls, and your machines. ### Machines * **Manage subscription** opens the App Store subscriptions page on iOS or the Google Play subscriptions page on Android. * **Restore purchases** recovers an existing store purchase on a new device or installation. * **Your machines** lists machines paired to the subscription. You can reconnect, forget a local profile, or revoke a machine when the connector supports it. * Credential expiry is shown in the section. Expired credentials stop data-plane access until access is renewed. The paid-through date is not a promise of automatic renewal. Billing and cancellation remain in the store. ### Exposed services A Cloud Link connector can expose additional local services through its tunnel. From **Settings → Cloud Link → Exposed services**, you can add, edit, copy the link for, enable, disable, or remove a service. Service settings can include: * a service ID and optional name; * a local target such as `127.0.0.1:3000`; * a public path, or the port root when the connector supports root services; * a dedicated service port on newer connectors; * private or public access; * whether to strip the matched path prefix. Changes apply to the running connector without restarting it. The connector validates the request and returns the canonical values; the app displays those values after saving. Older connectors may support only path services on the legacy port. The app shows an update hint when a connector is too old for root services or port selection. ## Cloud Link, local QR, and Tailscale | Option | Network scope | Cost | Setup | Best for | | ---------- | ---------------------- | ------------------------ | ----------------------------- | -------------------------------------- | | Local QR | Same reachable network | Free | `opencode pair` + scan | Quick local setup | | Tailscale | Your tailnet | Free/paid Tailscale plan | Tailscale Serve + app URL | Private access between your devices | | Cloud Link | Internet | Store subscription | Connector + subscription + QR | Managed access without your own tunnel | If you already run Tailscale successfully, you do not need Cloud Link. ## Cloud Link resources * [OpenCode Cloud Link website](https://opencodecloud.link/) — product overview, downloads, and pricing * [Download the Cloud Link connector](https://opencodecloud.link/download/) — macOS, Windows, and Linux * [Cloud Link pricing](https://opencodecloud.link/#pricing) — current store subscription details * [Cloud Link documentation](https://opencodecloud.link/docs/) — connector install, settings, and troubleshooting * [How Cloud Link works](https://opencodecloud.link/how-to/) — connection and security model * [Quick start](https://opencodecloud.link/docs/getting-started/) — install the connector and connect a phone * [Pair with OpenCode Mobile](https://opencodecloud.link/docs/pairing/) — connector-side pairing details * [Exposed services](https://opencodecloud.link/docs/exposed-services/) — publish local dev servers and dashboards * [Security and privacy](https://opencodecloud.link/docs/security/) — Cloud Link trust boundaries * [Cloud Link FAQ](https://opencodecloud.link/#faq) — common product questions ## Security and privacy Cloud Link processes the minimum data needed to verify the subscription and authorize the connection, including store transaction proof, service/session identifiers, and pairing/device identifiers. Payments are handled by Apple or Google; the project does not receive card details. Your prompts, source code, files, and provider credentials continue to flow between the app and your OpenCode machine. They are not stored by the Cloud Link control plane as part of normal tunnel traffic. Read the [privacy policy](https://getopencode.app/privacy-policy/) for the full data-handling description. Keep the store account, connector QR code, and pairing links private. A pairing link or QR code can grant access to a machine, so do not paste it into a public issue, chat, or screenshot. If a device is lost, revoke the machine or rotate access from the connector where available. ## Troubleshooting | Symptom | What to check | | ------------------------------------ | -------------------------------------------------------------------- | | Cloud Link section is missing | The app must come from the App Store or Google Play | | Subscription is inactive | Purchase or restore through the store, then retry | | QR code is rejected | Use a fresh connector QR from the matching environment | | Connection waits for approval | Confirm the connection on the computer | | Machine is listed but cannot connect | Check that the connector is running and the machine is online | | Services will not save | Confirm the target is loopback and the port/path is not already used | | Access expired | Reconnect and renew the subscription if needed | For account, purchase, or privacy requests that cannot be resolved in the app, use the contact details on the [support page](https://getopencode.app/support/) or email `contact@getopencode.app`. Continue with [Connections](https://getopencode.app/docs/connections/), [Remote access](https://getopencode.app/docs/remote-access/), or [Troubleshooting](https://getopencode.app/docs/guides/troubleshooting/). # OpenCode Mobile User Manual > Navigate OpenCode Mobile chats, projects, approvals, voice, usage, terminal, providers, extensions, settings, notifications, sharing, and widgets. This manual is the navigation hub for operating OpenCode Mobile after installation. It deliberately avoids repeating every control documented in the focused guides. If the app is not connected yet, start with [Set Up OpenCode Mobile](https://getopencode.app/docs/getting-started/). [![Your browser does not support embedded video.](https://getopencode.app/img/product/opencode-mobile-poster.avif)](https://getopencode.app/media/opencode-mobile-promo.mp4) ## Five-minute orientation | Area | What it is for | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | | **Chat** | Start and follow tasks, review changes, answer approvals, use voice, choose models, and check usage | | **Projects** | Choose a project or worktree, browse and edit files, preview media, and manage entries | | **Terminal** | Open and use project PTYs | | **Settings** | Search and manage appearance, chat, voice, notifications, language, connections, providers, extensions, approvals, diagnostics, and updates | The chat library opens from the title at the top of **Chat**. A change chip above the composer opens the changes review overlay; the old Session and Files Changed tabs are gone. ## Before sending work Confirm three pieces of context: 1. **Connection:** Settings shows the expected OpenCode server. 2. **Project:** Projects shows the repository that should receive the task. 3. **Session:** Chat shows the intended work thread. This prevents the most expensive mobile mistake: sending a valid instruction to the wrong project or session. ## Everyday work * [Start and monitor tasks](https://getopencode.app/docs/guides/tasks/) — choose a model, send a prompt, attach files, use commands or mentions, steer a running turn, and stop a bad direction. * [Chats and sessions](https://getopencode.app/docs/guides/sessions/) — search, favorite, rename, delete, fork, revert, and switch sessions. * [Approvals and changes](https://getopencode.app/docs/guides/approvals-and-changes/) — answer permissions and questions and review diffs. * [Voice](https://getopencode.app/docs/guides/voice/) — dictate one prompt or use the wake-word conversation loop. * [Session usage](https://getopencode.app/docs/guides/usage/) — interpret context pressure, tokens, steps, and cost. * [Notifications](https://getopencode.app/docs/guides/notifications/) — completion and needs-input alerts. ## Projects and tools * [Projects](https://getopencode.app/docs/guides/projects/) — select, add, archive, and switch projects; understand server-archived projects and worktrees. * [Project files](https://getopencode.app/docs/guides/workspace-files/) — search, read, preview, download, move, and save files. * [Terminal](https://getopencode.app/docs/guides/terminal/) — use the xterm-based project terminal and keyboard accessory. * [Worktrees](https://getopencode.app/docs/guides/worktrees/) — create, select, and remove isolated working directories. ## Device features * [Share from other apps](https://getopencode.app/docs/guides/share-from-other-apps/) — send text, links, and files into a chat on Android. * [Quick actions and widgets](https://getopencode.app/docs/guides/quick-actions-and-widgets/) — reach recent chats from the launcher or Android home screen. * [Deep links](https://getopencode.app/docs/guides/deep-links/) — open a specific session or pairing flow from a link. ## Configure the experience * [Settings and customization](https://getopencode.app/docs/guides/settings/) — the complete Settings map. * [Providers and models](https://getopencode.app/docs/guides/providers-and-models/) — connect AI providers, choose variants, and manage visible models. * [Automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/) — classify prompts and map each tier to a model. * [Extensions](https://getopencode.app/docs/guides/extensions/) — manage MCPs, plugins, agents, skills, commands, and plugin panels. * [MCP and diagnostics](https://getopencode.app/docs/guides/mcp-and-diagnostics/) — manage runtime MCP state and inspect server health. * [Add or switch connections](https://getopencode.app/docs/connections/) — manage multiple servers, custom headers, certificates, and OIDC. * [Cloud Link](https://getopencode.app/docs/cloud-link/) — optional managed remote access. ## Remote access and connection failures Choose a route from the [remote-access overview](https://getopencode.app/docs/remote-access/). Use the dedicated [Tailscale](https://getopencode.app/docs/guides/tailscale/), [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/), [local network](https://getopencode.app/docs/guides/local-network/), [reverse proxy](https://getopencode.app/docs/guides/reverse-proxy/), or [SSH forwarding](https://getopencode.app/docs/guides/ssh-forward/) guide when applicable. Read the [remote-access security guide](https://getopencode.app/docs/guides/remote-access-security/) before exposing a server. If the app returns HTML, 404, authentication errors, certificate errors, missing projects, stale realtime state, or terminal failures, work through the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). ## Product and support information * [Download and install](https://getopencode.app/docs/opencode-android-app/) * [OpenCode Mobile vs OpenCode Web](https://getopencode.app/docs/guides/mobile-vs-web/) * [Releases and compatibility](https://getopencode.app/docs/changelog/) * [Frequently asked questions](https://getopencode.app/docs/faq/) * [About the project and maintainer](https://getopencode.app/about/) * [Security reporting](https://getopencode.app/security/) # OpenCode Mobile Features and Guides > Choose an OpenCode Mobile workflow for tasks, sessions, approvals, voice, files, terminal, providers, extensions, Cloud Link, sharing, or remote access. Start with the outcome you need. Each guide explains when the capability is useful, the exact mobile workflow, what you should see, and the important limitations. [![Your browser does not support embedded video.](https://getopencode.app/img/product/opencode-mobile-poster.avif)](https://getopencode.app/media/opencode-mobile-promo.mp4) ## I want OpenCode to work on something Use [Start and monitor tasks](https://getopencode.app/docs/guides/tasks/) to choose an agent and model, write a useful prompt, attach context, follow live progress, steer a running turn, stop a bad direction, and decide when the result is actually complete. ## I want to continue or reorganize existing work Use [Chats and sessions](https://getopencode.app/docs/guides/sessions/) to search, switch, favorite, rename, delete, fork, or revert sessions without losing track of the active project. The library groups chats by server and project and shows running and recent sessions across the connection. ## OpenCode is waiting for me Use [Approvals and changes](https://getopencode.app/docs/guides/approvals-and-changes/) to understand permission choices, answer product questions, review Turn/Uncommitted/Branch diffs, and avoid approving a risky action by habit. ## I cannot conveniently type Use [Voice](https://getopencode.app/docs/guides/voice/) to dictate a reviewed draft or run the wake-word conversation loop. System speech and On-device voice are separate input modes, and playback can use a system or on-device voice. ## The session is getting long or expensive Use [Session usage](https://getopencode.app/docs/guides/usage/) to interpret context utilization, input/output/reasoning tokens, cache activity, steps, and provider cost estimates. ## I need to inspect, move, or adjust a file Use [Project files](https://getopencode.app/docs/guides/workspace-files/) to search the active project, read a file, preview media, download a file, move or rename entries on OpenCode 2, and save a small text patch. File editing is available on both contracts, with a conflict check before saving. ## I need to run a command Use [Terminal](https://getopencode.app/docs/guides/terminal/) for tests, status checks, short logs, and project commands in an xterm-based project PTY. It supports common full-screen programs and a mobile keyboard accessory, but it is not a desktop terminal replacement. ## I need isolated parallel work Use [Worktrees](https://getopencode.app/docs/guides/worktrees/) to create, select, and remove experimental OpenCode worktrees safely. ## A model is missing or a provider needs sign-in Use [Providers and models](https://getopencode.app/docs/guides/providers-and-models/) to distinguish server authentication from AI-provider authentication, complete OAuth/manual setup, manage multiple provider accounts, choose model variants, and control which models appear in Chat. ## I want the app to choose the model Use [Automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/) to classify each prompt as Simple, Standard, or Complex and map each tier to a model, with an on-device or OpenCode server classifier. ## I need to change server configuration Use [Manage extensions](https://getopencode.app/docs/guides/extensions/) to edit MCP servers, plugins, agents, skills, and slash commands for a project or the whole server, and to open plugin GUI panels in Chat. ## Tools or realtime updates are not behaving as expected Use [MCP and diagnostics](https://getopencode.app/docs/guides/mcp-and-diagnostics/) to manage runtime MCP servers on OpenCode 1.x, read OpenCode 2 MCP state, and inspect health, realtime fallback, network behavior, local logs, and app errors. ## I want to leave while a task runs Use [Notifications](https://getopencode.app/docs/guides/notifications/) to enable completion and needs-input alerts, review Android background behavior, and understand when iOS delivery may be delayed. ## I want to connect or switch servers * [Add or switch connections](https://getopencode.app/docs/connections/) — manual setup, local QR pairing on OpenCode 2, custom headers, custom certificates, OIDC, saved profiles, and Cloud Link. * [Remote access](https://getopencode.app/docs/remote-access/) — compare LAN, Tailscale, Cloudflare Tunnel, reverse proxy, SSH, and Cloud Link. * [Cloud Link](https://getopencode.app/docs/cloud-link/) — managed remote access with a store subscription. See the [Cloud Link website](https://opencodecloud.link/) for connector downloads and pricing. ## I want to send content from another app Use [Share from other apps](https://getopencode.app/docs/guides/share-from-other-apps/) to send text, links, images, and documents into a reviewed chat draft on Android. Nothing is submitted until you press Send. ## I want faster access from my home screen Use [Quick actions and widgets](https://getopencode.app/docs/guides/quick-actions-and-widgets/) for launcher shortcuts and the Android Latest replies, Awaiting actions, and Plan progress widgets. ## I want to configure or customize the app Use [Settings and customization](https://getopencode.app/docs/guides/settings/) for the searchable settings map: appearance, chat behavior, voice, notifications, language, connections, providers, extensions, approvals, diagnostics, updates, and support. ## I cannot connect to the server Use [Troubleshooting](https://getopencode.app/docs/guides/troubleshooting/) to work through authentication, local QR, custom headers, certificates, OIDC, Cloud Link, HTML/404 responses, realtime updates, terminal WebSockets, and missing projects. # OpenCode Mobile Documentation for AI Assistants > Canonical facts, machine-readable documentation endpoints, and citation guidance for AI assistants answering questions about OpenCode Mobile. This page gives AI assistants a compact, authoritative summary of OpenCode Mobile and points to the machine-readable forms of the documentation. ## Canonical facts * **What it is:** a community-built Android and iOS client for an OpenCode server that the user runs. * **Not affiliated:** OpenCode Mobile is not built by, endorsed by, or affiliated with the OpenCode team. * **Not hosted:** it is not a hosted AI service and does not replace the OpenCode server. * **Server requirement:** the user must provide a reachable OpenCode server and credentials. * **OpenCode contracts:** 2.x (V2) is the current primary target; 1.x (V1) remains supported with manual connections for the core V1∩V2 surface. Feature availability varies by contract and server capabilities. * **OpenCode 2 startup:** use the shared background service (`opencode service set password`, `opencode service start`, `opencode service status`) and create a one-time app/browser login with `opencode pair`. Use `opencode pair --url ` behind Tailscale, Cloudflare, or a reverse proxy. * **Android distribution:** Google Play and direct APK releases. Release artifacts are arm64-v8a only; 32-bit-only devices are unsupported. * **iOS distribution:** TestFlight beta. * **Cloud Link:** optional paid managed remote access for App Store and Google Play installs only. It is not available in direct APK or production web builds. Product site: ; connector docs: . * **Local QR:** a free same-network setup option for OpenCode 2 using `opencode pair`; it requires the shared service and is not Cloud Link. * **Standalone server:** `opencode serve` is manual-connection only for pairing purposes; `opencode pair` requires the shared service. * **Credentials:** server passwords, custom header values, CA material, and OIDC tokens use Keychain/Keystore-backed secure storage on native builds; non-secret connection details use app storage. * **Settings:** searchable and grouped into App preferences, Connections, and Selected server. * **Themes:** light, dark, or system, with six accent themes and a slim interface. * **Languages:** English, Spanish, Hindi, German, French, Simplified Chinese, Portuguese, Japanese, Russian, Arabic, and Hebrew. Arabic and Hebrew use RTL layout. * **Voice:** System speech or opt-in On-device voice, wake phrase, confirmation, local speech models, speaker verification, and system or on-device playback. * **Models:** provider/model selection, OpenCode 2 variants, per-agent model memory, per-reply model labels, and opt-in automatic model routing. * **Extensions:** OpenCode 2 only for full management; MCP, plugins, agents, skills, commands, project/global scope, and sandboxed plugin GUI panels. * **Removed surfaces:** session archive/restore/share, title summarization, worktree reset, LSP/formatter diagnostics, and the V1 composer auto-approve/saved-rules surfaces are not available. * **Current release:** use [GitHub Releases](https://github.com/alvarolorentedev/opencode-mobile/releases) as the authoritative source. Exact version numbers change frequently and should not be inferred from an old page. * **License:** Apache-2.0. ## Machine-readable documentation | Resource | URL | | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Documentation index for agents | `https://getopencode.app/llms.txt` | | Abridged documentation | `https://getopencode.app/llms-small.txt` | | Complete documentation | `https://getopencode.app/llms-full.txt` | | Topic sets | `https://getopencode.app/_llms-txt/*.txt` | | Raw Markdown | Append `.md` to a documentation page path, for example `https://getopencode.app/docs/getting-started.md`; the documentation hub is `https://getopencode.app/docs.md` | | Sitemap | `https://getopencode.app/sitemap-index.xml` | Raw Markdown responses are intentionally available to agents but marked `noindex` for search engines. The canonical HTML page remains the indexed source. ## How to cite Prefer the canonical HTML URL, for example: > Source: OpenCode Mobile documentation, “Set Up OpenCode Mobile,” When accuracy matters: 1. Check the page’s last-updated date and the current GitHub release. 2. Distinguish app behavior from server behavior. 3. State the OpenCode contract when a feature is V1- or V2-specific. 4. Distinguish local QR pairing from Cloud Link. 5. Do not describe OpenCode Mobile as official or affiliated. 6. Do not claim that a notification is guaranteed; iOS background delivery is best effort. 7. Do not claim that iOS inbound sharing or iOS widgets exist yet. 8. Do not describe archive/share sessions or worktree reset as current features. 9. Do not claim that on-device voice sends audio to a speech vendor. ## Documentation map * **Start:** [Documentation hub](https://getopencode.app/docs/), [What is OpenCode Mobile?](https://getopencode.app/docs/introduction/), [Set up](https://getopencode.app/docs/getting-started/) * **Connect:** [Connections](https://getopencode.app/docs/connections/), [Remote access](https://getopencode.app/docs/remote-access/), [Cloud Link](https://getopencode.app/docs/cloud-link/) * **Use:** [User manual](https://getopencode.app/docs/user-manual/), [Tasks](https://getopencode.app/docs/guides/tasks/), [Chats and sessions](https://getopencode.app/docs/guides/sessions/), [Approvals](https://getopencode.app/docs/guides/approvals-and-changes/), [Terminal](https://getopencode.app/docs/guides/terminal/) * **Configure:** [Settings](https://getopencode.app/docs/guides/settings/), [Providers](https://getopencode.app/docs/guides/providers-and-models/), [Automatic routing](https://getopencode.app/docs/guides/auto-model-routing/), [Extensions](https://getopencode.app/docs/guides/extensions/), [MCP and diagnostics](https://getopencode.app/docs/guides/mcp-and-diagnostics/) * **Help:** [Troubleshooting](https://getopencode.app/docs/guides/troubleshooting/), [FAQ](https://getopencode.app/docs/faq/), [Releases and compatibility](https://getopencode.app/docs/changelog/) ## Contact For privacy or security questions, use the contact details on the [security page](https://getopencode.app/security/). For reproducible bugs, use the [public issue tracker](https://github.com/alvarolorentedev/opencode-mobile/issues). # Review OpenCode Changes on Mobile > Answer OpenCode permissions and questions, review Turn, Uncommitted, or Branch diffs, and manage saved approval rules in the mobile app. Use this workflow when OpenCode needs permission, asks a product question, or has produced code that you want to inspect before continuing. ## Answer a permission A permission card describes the requested operation and may include a command, pattern, or path. If a subagent requested the action, the card names the requesting session. * **Allow once** approves only this request. * **Always allow** approves that permission category for future requests. * **Deny** refuses it. Read the request before deciding. Prefer **Allow once** for destructive commands, unfamiliar projects, external network access, and paths outside the selected project. On OpenCode 2, the composer has an auto-approve control. **Settings → Approvals** lists saved rules created by **Always allow**; removing a rule makes the server ask again. OpenCode 1.x does not expose auto-approve or saved approval rules. The approval view follows the website’s current color theme. ![Pending file permission request in OpenCode Mobile, light theme](https://getopencode.app/img/docs/approval-request-light.webp) ![Pending file permission request in OpenCode Mobile, dark theme](https://getopencode.app/img/docs/approval-request-dark.webp) ## Answer a question Question cards can allow one choice, multiple choices, or a custom response. On OpenCode 2, forms can also include booleans, numbers, external links, required fields, defaults, and conditional fields. * Answer in the order presented and submit. * Drafts survive dismissal and reopening. * Rejecting a question tells OpenCode not to continue with that unanswered decision. * A failed submission keeps the answers for retry. Conversation mode pauses for permissions and questions because they require deliberate on-screen input. ## Review changed files Chat no longer uses a separate **Files Changed** tab. A centered change chip above the composer shows the file count and additions/deletions. Tap it to open the review overlay. The overlay’s source button offers three diff scopes: | Scope | What it shows | | --------------- | ---------------------------------------------------------------------------------------------- | | **Turn** | The diff recorded for a user turn. The latest turn with a recorded change is shown by default. | | **Uncommitted** | The project’s current VCS working-tree changes. Not session-scoped. | | **Branch** | Changes against the project’s default branch. Not session-scoped. | When more than one turn has a recorded diff, the Turn scope lets you choose an earlier turn. If a turn has no structured diff, the app shows the changed-file list and notes that diff lines are unavailable for that turn. To review: 1. Tap the change chip above the composer. 2. Compare the changed-file count with the task scope. 3. Expand each file and review added and removed lines. 4. Use the source button to switch to the working tree or branch view. 5. Close the overlay and ask for a correction when something is unexpected. The overlay follows the website’s current color theme. ![Expanded file diff in OpenCode Mobile, light theme](https://getopencode.app/img/docs/file-changes-light.webp) ![Expanded file diff in OpenCode Mobile, dark theme](https://getopencode.app/img/docs/file-changes-dark.webp) ## When a request disappeared Pending interactions are refreshed from both realtime events and server list APIs. If one vanishes, it may already have been answered elsewhere. Refresh the session before assuming it was lost. Next: [Edit a project file](https://getopencode.app/docs/guides/workspace-files/), [manage sessions](https://getopencode.app/docs/guides/sessions/), or review the [remote-access security model](https://getopencode.app/docs/guides/remote-access-security/). # Automatic Model Routing in OpenCode Mobile > Let OpenCode Mobile classify each prompt and choose a simple, standard, or complex model, using an on-device or server classifier. Auto model routing is opt-in. When it is enabled, OpenCode Mobile classifies each new prompt as **Simple**, **Standard**, or **Complex** and sends it with the model mapped to that tier. It is useful when you want routine checks on a fast model without manually switching models for every turn. Routing never guesses a tier with a heuristic. If the classifier is unavailable, the send uses your normal default model. ## Before you enable it * Connect to the server and confirm its model catalog is loaded. * Configure at least one provider and enable the models you want routing to consider. * Decide which classifier to use: on-device or OpenCode server. ## Choose a classifier Open **Settings → AI & providers** and find the auto-routing controls. ### On-device classifier The private option. The app downloads a small instruction model and classifies the prompt locally. * The pack is about 491 MB and is downloaded only after you choose it. It is never bundled with the app. * Classification works on both OpenCode 1.x and 2.x because it does not call the server. * The model is released after five minutes idle or when the app backgrounds. * If the pack is missing, removed, or fails to load, routing is skipped for that send. ### OpenCode server classifier The server option uses the connected OpenCode 2 server’s experimental text-generation endpoint. * The classifier prompt is sent to the selected classifier model on your server before the main prompt. * The endpoint is probed before the option is enabled. A missing endpoint, authentication failure, or unsupported server leaves the option unavailable. * A send-time classifier failure falls back to your default model; it does not switch to the on-device classifier or invent a tier. * OpenCode 1.x does not offer this option. ## Map the tiers Each tier can stay **Auto** or point at an explicit model: | Tier | Automatic suggestion | | ------------ | ------------------------------------------------------------------------------ | | **Simple** | The cheapest enabled model that supports tools | | **Standard** | Your current default model, falling back to the simple suggestion | | **Complex** | The most capable enabled model: reasoning first, then context size, then price | You can also choose an optional thinking level or model variant for each tier. A variant applies only when the routed model exposes it; otherwise routing continues with the model default. Automatic suggestions only consider enabled, configured, non-deprecated models. If an explicit tier model becomes unavailable, that send skips routing rather than falling back to a different tier. ## Protect long chats Prompt-cache protection is enabled by default. Above roughly 32,000 context tokens, a downgrade to a cheaper simple or standard model is skipped unless the target model’s input price is at most half of the current model’s. Complex upgrades are still allowed. This avoids losing a warm prompt cache just to save a small amount on a long conversation. Turn it off in the auto-routing settings if you prefer cost savings over cache reuse. ## What you see in Chat * The model picker shows an **Auto-routing** row when the selected classifier is available. * Choosing an explicit model turns routing off for that chat. Choose **Auto-routing** again to restore it. * Each assistant reply shows the model that actually answered it, including auto-routed replies. This is the record of the routed choice after a later turn switches models. * Settings reports the classifier state, pack status, tier mapping, and cache guard. ## When routing is skipped Routing is deliberately skipped when: * auto-routing is off; * an explicit model is selected; * the session is not idle; * the prompt is empty or too long for the classifier; * no visible models are available; * the selected classifier is unavailable; * attachments or the estimated context do not fit the selected model; * the routed model is already the session model; * the selected tier is unavailable; * the long-chat cache guard rejects a downgrade. A skipped route is not an error. The prompt is sent with the normal model selection. ## Privacy * On-device classification never sends the prompt off the device. * Server classification sends the classifier prompt to the classifier model on your OpenCode server before the main prompt. * The app does not log or persist prompts or classifier results for training. ## Troubleshooting * **The Auto-routing row is missing:** confirm the classifier is available and the model catalog has loaded. * **On-device routing is unavailable:** download the pack, or remove and reinstall it if it is corrupt. * **Server routing is unavailable:** confirm OpenCode 2, the experimental endpoint, and the classifier model. * **A reply used the default model:** routing was skipped or the classifier failed for that send. Check the settings status and try again. * **A routed model is missing:** enable it in Providers and models, or map the tier to another model. Next: [Providers and models](https://getopencode.app/docs/guides/providers-and-models/), [Start and monitor a task](https://getopencode.app/docs/guides/tasks/), or [Manage extensions](https://getopencode.app/docs/guides/extensions/). # OpenCode Mobile with Cloudflare Tunnel > Route an authenticated localhost OpenCode 2 server through a temporary or named Cloudflare Tunnel and pair or connect securely from mobile. Cloudflare Tunnel provides a public HTTPS address without router port forwarding. Because the hostname is publicly reachable, OpenCode authentication is mandatory. Use Tailscale instead when access only needs to work between your own devices. ## 1. Start an authenticated OpenCode 2 service ```bash opencode service set password 'use-a-strong-password' opencode service set hostname 127.0.0.1 opencode service set port 4096 opencode service start opencode service status ``` ## 2. Choose a temporary or named tunnel For short testing: ```bash cloudflared tunnel --url http://127.0.0.1:4096 ``` For a stable hostname: ```bash cloudflared tunnel login cloudflared tunnel create opencode-mobile cloudflared tunnel route dns opencode-mobile opencode.example.com ``` Configure the named tunnel: ```yaml tunnel: opencode-mobile credentials-file: /home/your-user/.cloudflared/.json ingress: - hostname: opencode.example.com service: http://127.0.0.1:4096 - service: http_status:404 ``` Then run `cloudflared tunnel run opencode-mobile`. ## 3. Pair or verify Create a pairing link with the public origin: ```bash opencode pair --url https://opencode.example.com ``` Scan the QR code in OpenCode Mobile, or paste the link. Pairing links expire after five minutes and work once. For a manual connection, verify the API first: ```bash curl -u opencode:use-a-strong-password \ https://opencode.example.com/global/health ``` Enter `https://opencode.example.com` in the app only after the health endpoint succeeds. If a reverse proxy mounts the API below `/api`, enter that complete base instead. ## OpenCode 1.x or a standalone server If you use OpenCode 1.x, or deliberately run a foreground server, start `opencode serve` with authentication and connect manually. Pairing requires the OpenCode 2 shared service. ## Production cautions * Never remove OpenCode authentication because the tunnel uses HTTPS. * Restrict DNS and Cloudflare account access with strong authentication. * Confirm that the route supports server-sent events and terminal WebSockets. * Treat temporary `trycloudflare.com` URLs as public and disposable. * Cloudflare Access may add protection, but verify that its authentication flow is compatible with the mobile API before relying on it. If the tunnel works in a browser but not in the app, use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). Compare this method with [Tailscale](https://getopencode.app/docs/guides/tailscale/) and read the [remote-access threat model](https://getopencode.app/docs/guides/remote-access-security/). # OpenCode Mobile Deep Links and Session Links > Open a specific OpenCode Mobile session from a custom-scheme or web link, understand connection scoping, and handle errors. OpenCode Mobile can open a specific session from a deep link. Notifications, quick actions, and some shared links use the same resolver. ## Session link format ```text opencodemobile://session/?project= ``` Example: ```text opencodemobile://session/ses_abc123?project=%2FUsers%2Fyou%2Fcode%2Fmy-project ``` The app: 1. resolves the link against the currently configured server; 2. switches to the given project if it differs from the active project; 3. opens the session and replaces the current route with the Chat tab. The link does not carry a server identity. It resolves against the active connection. A saved notification or quick-action link may include a connection scope so the app can switch servers first. Sessions the server excludes, such as archived or deleted sessions, are not reachable through a session deep link. Restore or unarchive the session on the server first. ## Web path On the web build, the equivalent route is: ```text /session/ ``` Universal/app links over HTTPS are not configured. A link works when it uses the app scheme or the web path directly. ## Errors If the session does not belong to the given project or cannot be found, the app shows a **Could not open session** screen with the server message. It does not create a replacement session or silently open a different chat. Common causes: * the session was archived, deleted, or belongs to another server; * the project path is wrong or not URL-encoded; * the active connection changed after the link was created; * the app is not onboarded or connected. ## Pairing links Cloud Link pairing links use a different format and include a pairing identifier and token. Treat them as credentials. Do not paste them into public issues, logs, or screenshots. See [Cloud Link](https://getopencode.app/docs/cloud-link/). ## Session links in the app Notifications, quick actions, widgets, and external links create the session link for you. The current app does not publish a public session share URL from the Chats library. Treat a copied session link like any other credential-bearing route. ## Security * Deep links can open a session but cannot approve permissions or submit prompts. * A link does not bypass server authentication. * Pairing links and session links can grant access or expose content; handle them as sensitive. * If a link is exposed, rotate the relevant credentials or revoke the Cloud Link machine. Next: [Chats and sessions](https://getopencode.app/docs/guides/sessions/), [notifications](https://getopencode.app/docs/guides/notifications/), or [Cloud Link](https://getopencode.app/docs/cloud-link/). # Manage OpenCode Extensions from Mobile > Manage MCP servers, plugins, agents, skills, and slash commands from OpenCode Mobile, including project or global scope and plugin GUI panels. Use **Settings → Extensions** when you need to change how OpenCode itself works: add an MCP server, install a plugin, create an agent, write a skill, or edit a slash command. Extensions are server configuration, not app preferences. Extensions management requires an OpenCode 2 server. On OpenCode 1.x, the app keeps the runtime MCP controls under **Settings → Diagnostics** and does not offer the broader editor. ## Open the extensions manager 1. Connect to the OpenCode 2 server that owns the configuration. 2. Open **Settings → Extensions**. 3. Choose the scope: * **This project** edits the selected project’s configuration. * **All projects** edits the user-global configuration for this server. 4. Choose **MCPs**, **Plugins**, **Agents**, **Skills**, or **Commands**. The current server and project stay visible while you edit. Global changes show a one-time confirmation for that scope visit so a project edit cannot silently become a server-wide change. ## What each tab manages ### MCPs Add a local MCP command or a remote HTTP(S) server, then connect, disconnect, enable, disable, or remove it. Local entries use an executable plus individual arguments, without shell parsing. Remote entries require a valid HTTP(S) URL. On OpenCode 2, MCP definitions are written to the selected `opencode.json` or `opencode.jsonc`. Runtime status stays separate: use the row controls to connect or refresh the server, and use the Extensions editor to change the stored definition. Remote MCP authentication can open the provider flow in the browser and submit the authorization code or wait for completion. ### Plugins Add or remove a plugin package or local target. Plugins execute code inside the OpenCode server process, so install only plugins you trust and review the target before saving. Built-in plugins are not listed because the app cannot change them. ### Agents Create, view, edit, rename, or remove agents. New agents default to Markdown under `.opencode/agents` for the project or the global `agents` directory. Existing JSONC agents stay editable in place and are never migrated silently. The focused editor exposes the description, mode, model, permissions, and instructions. Model selection uses a searchable, provider-grouped picker with inheritance and variants, independently of which models are visible in Chat. Legacy `mode`/`modes` agents and inherited definitions are read-only in the app. ### Skills Create a skill under the selected scope, edit its `SKILL.md`, and choose whether it can be invoked automatically. Advanced source editing preserves metadata and comments the structured fields do not expose. Removing a skill moves it to `.opencode-mobile-trash` so a failed server reload can restore it. ### Commands Create slash commands as Markdown under `.opencode/commands` for the project or the global `commands` directory. Existing Markdown commands in canonical and legacy directories are discovered and editable. JSONC commands stay editable in place. A JSONC definition overridden by a same-name Markdown file stays visible as overridden and removable. The app prevents duplicate names across formats and scopes. ## Plugin GUI panels Installed plugins can expose a graphical panel, such as a workflow graph. When the active chat has a plugin GUI, a plugin button appears in the chat header, including on an empty chat. * The panel opens in a sandboxed viewer inside the app. * It can run as a large overlay or in a side-by-side layout. * Opening a session from a panel stays inside OpenCode Mobile instead of leaving the app. * The plugin still runs on your OpenCode server; the viewer only renders its interface. ## Safety and limits * Every save is backed up and replaced atomically, then checked against the server’s reloaded configuration. A failed validation restores the previous file. * Editing is disabled for system-managed configuration, symlinked files, ambiguous global roots, unreadable or invalid JSONC/frontmatter, Windows servers, and servers without the required shell utilities. * The app never silently converts JSONC definitions to Markdown or rewrites unknown metadata. * Removing a plugin or command can change what the agent can do. Review the change before relying on the next turn. * An extension may require a new chat or a refreshed capability catalog before it appears in Chat. ## If an extension is missing * Confirm the active server is OpenCode 2. * Confirm the correct project or global scope is selected. * Refresh the extension list after saving. * Check that the server accepted the configuration; a rejected save keeps your draft. * For runtime MCP state, check **Settings → Diagnostics** on either contract. * If the server reports a read-only configuration, edit it on the server directly. Next: [Auto model routing](https://getopencode.app/docs/guides/auto-model-routing/), [Providers and models](https://getopencode.app/docs/guides/providers-and-models/), or [MCP and diagnostics](https://getopencode.app/docs/guides/mcp-and-diagnostics/). # Connect OpenCode Mobile on a Local Network > Start an OpenCode 2 server on a private LAN, pair with a QR code, and connect the mobile app without exposing a public port. Use a trusted local network when the phone and the OpenCode machine are on the same private Wi-Fi or LAN. This keeps the connection off the public internet, but it still requires authentication and a firewall rule that is limited to the private network. ## Recommended: pair over the LAN OpenCode 2 uses a shared background service and a one-time pairing link: ```bash opencode service set password 'use-a-strong-password' opencode service set hostname 0.0.0.0 opencode service set port 4096 opencode service start opencode service status opencode pair ``` `opencode pair` prints a QR code and link. In OpenCode Mobile, open **Settings → Connection → Add connection → Scan QR code** and scan it. The link expires after five minutes and works once. Find the machine’s private address from `opencode service status`, for example: ```text http://192.168.1.20:4096 ``` Allow TCP port `4096` only on the private-network firewall profile. Do not forward this port through your router or use this approach on an untrusted network. ## Verify the API Confirm the health endpoint works before opening the app: ```bash curl -u opencode:use-a-strong-password \ http://192.168.1.20:4096/global/health ``` ## Manual connection If you use a standalone `opencode serve` process, or an OpenCode 1.x server, connect manually with the URL and password: ```bash OPENCODE_SERVER_PASSWORD='use-a-strong-password' \ opencode serve --hostname 0.0.0.0 --port 4096 ``` Then enter `http://192.168.1.20:4096` in the app and use `opencode` as the username if the server expects the default. Pairing requires the OpenCode 2 shared service. ## If the local-network address does not connect * Use the machine’s LAN address, not `localhost` or `127.0.0.1`. * Confirm OpenCode is listening on `0.0.0.0` or the specific LAN interface. * Run `opencode service status` and confirm the port. * Allow the port through the private-network firewall profile. * Disable client isolation on the Wi-Fi network if devices cannot reach each other. * If the pairing link contains a loopback address, bind the service to the LAN interface and pair again. For other routes, return to the [remote-access overview](https://getopencode.app/docs/remote-access/) or use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). # OpenCode MCP and Diagnostics on Mobile > Manage runtime MCP servers on OpenCode 1.x and read OpenCode Mobile diagnostics for health, realtime, network, errors, and logs. Use **Settings → Diagnostics** when realtime updates look stale, a server integration is unavailable, or you need to inspect app health. MCP management depends on the OpenCode contract. ## Manage MCP servers ### OpenCode 2 MCP definitions are managed in **Settings → Extensions → MCPs**. The Extensions editor writes the selected project or global configuration, validates it, and keeps a backup. Use the row’s runtime controls to connect, disconnect, or refresh a server after the definition exists. Remote servers may require an OAuth flow. See [Manage extensions](https://getopencode.app/docs/guides/extensions/). ### OpenCode 1.x OpenCode 1.x keeps the runtime MCP controls under **Settings → Diagnostics → MCP**. * Add a local command or remote URL. * Connect, disconnect, enable, disable, or remove a server. * Start remote OAuth in the browser and submit the authorization code callback. After changing an MCP server: 1. Refresh its status. 2. Confirm it is enabled and connected. 3. Start a new task if the active session does not discover the changed tool set. ## Read diagnostics Diagnostics may show: * OpenCode health and version; * global realtime event stream status and polling fallback; * MCP server state and counts when the endpoint is available; * normalized network type, online/offline, constrained or metered state, reconnect attempts, and local request latency; * the last JavaScript error recorded on the device, with a fatal/handled marker; * local log, span, and metric storage, retention, recent events, and key metric summaries; * optional remote telemetry controls when an OTLP backend is configured. A polling fallback means the app can keep refreshing important task state, but realtime updates may be less immediate. Reconnect after changing the server URL, proxy, authentication, or OpenCode configuration. Each diagnostic request can fail independently. Refresh re-reads server diagnostics and the last app error. ## Local logs and export Diagnostics records structured logs, spans, and metrics locally by default. Storage is bounded to about seven days or 10 MB. * Choose a normal or verbose recording level. * Inspect local storage use, recent events, and the most recent failure. * **Export** creates a sanitized ZIP report on explicit action. It does not upload anything. * **Clear** removes local history after confirmation. Local recording can be disabled in **Settings → Diagnostics** or during onboarding. The privacy step in onboarding exposes the same choice. ## Optional remote telemetry When the build is configured with an OTLP backend, Diagnostics exposes a master remote-telemetry switch and separate crash-report and usage categories. Remote reporting is optional and applies only to new events. * Only unhandled or fatal JavaScript errors and the minimal server contract counter leave the device. * Prompts, source code, file contents, and session text are not sent. * Native hard crashes and ANRs are not captured because no native telemetry SDK is included; only the next-launch JavaScript crash record is available. * Remote Hermes/JavaScript stacks are not symbolically resolved by the OTLP path. Use a local export for detailed stacks. * FOSS and unconfigured builds hide the remote controls. ## Supported and unsupported diagnostics OpenCode 2 and OpenCode 1.x expose different server endpoints. LSP server counts and formatter diagnostics are not part of the supported V1∩V2 surface and are not shown. Missing MCP, LSP, or formatter data usually means the endpoint is unsupported rather than broken. ## When to use it * **MCP tools are missing:** manage definitions under Extensions on V2 or Diagnostics on V1, then refresh status. * **Updates look stale:** confirm whether the event stream is connected or polling. * **A request failed:** check the last app error, network state, and request statistics before filing a bug. * **A server feature is missing:** confirm the OpenCode version and contract in [Releases and compatibility](https://getopencode.app/docs/changelog/). * **You need to share a report:** export the sanitized ZIP and review it before sending. Next: [Configure providers](https://getopencode.app/docs/guides/providers-and-models/), [manage extensions](https://getopencode.app/docs/guides/extensions/), or use the [connection troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). # OpenCode Mobile vs OpenCode Web > Compare the native OpenCode client for Android and iOS with OpenCode Web across installation, sessions, voice, notifications, sharing, widgets, and remote access. Both interfaces can reach an OpenCode server from a phone. Choose based on the workflow, not on the assumption that an installed app is automatically better. | Need | OpenCode Mobile | OpenCode Web | | -------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------- | | Installation | Android: Play or APK; iOS: TestFlight | No client installation | | Updates | Play, new APK, TestFlight, or in-app update check | Updated with the server | | Session monitoring | Native mobile workflow with changes chip and activity runs | Browser workflow | | Voice follow-ups | Dictation and wake-word conversation mode, with optional on-device models | Depends on browser UI | | Model selection | Models, variants, per-agent memory, and automatic routing | Server/browser workflow | | Server configuration | Extensions for MCPs, plugins, agents, skills, and commands (V2) | Server configuration UI | | Task notifications | Native completion and needs-input alerts | Not supported by the app’s background monitor | | Share into the app | Android share sheet | Browser share target depends on the browser | | Home-screen access | Quick actions; Android widgets | Bookmarks or installed browser shortcut | | Focused files and terminal | Native project surfaces, media previews, and file actions (V2) | Browser-provided surfaces | | Saved server profiles | Multiple connections with in-app switching | Usually one browser origin at a time | | Remote route | LAN, VPN, tunnel, proxy, SSH forward, or Cloud Link | Same network choices, without Cloud Link management | | Server requirement | OpenCode server/API | OpenCode 2 server; V1 `opencode web` | ## Choose OpenCode Mobile when * you regularly check or redirect sessions away from your desk; * native navigation, voice input, sharing, widgets, or device notifications matter; * you work with several saved OpenCode servers; * you want a focused control surface instead of a complete desktop-style UI; * you are comfortable installing a community-built version. ## Choose OpenCode Web when * you want zero client installation; * the browser interface already fits your workflow; * you use several device platforms and want one interface; * you prefer the server release to control UI updates; * you need a desktop-sized workspace more than mobile alerts. ## They can coexist Use the OpenCode web UI when you want the browser interface. In OpenCode 2, run the shared service and open a link printed by `opencode pair`; the web UI is served by the same server. In OpenCode 1.x, use `opencode web` when you want the browser UI and API from the same server. Depending on the deployment, the API may be at the origin or below a prefix such as `/api`. OpenCode Mobile must receive the API base, not merely a URL that returns an HTML page. Regardless of the client, do not expose an unauthenticated server publicly. Use the [remote-access overview](https://getopencode.app/docs/remote-access/) and [security guide](https://getopencode.app/docs/guides/remote-access-security/). To try the native client, follow the [OpenCode Mobile app setup](https://getopencode.app/docs/opencode-android-app/). If an existing deployment returns HTML or 404 responses, use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). # OpenCode Task Notifications on Mobile > Enable OpenCode completion and needs-input notifications on Android and iOS, and understand background delivery limits. Use notifications when you want to leave the app while a task runs and receive an alert when the tracked session finishes, fails, or needs input. ## Enable notifications 1. Open **Settings → Notifications**. 2. Request notification permission when the operating system asks. 3. Return to the app; the section re-reads permission and background status when it opens and when the app returns to the foreground. 4. If necessary, open the device’s notification settings and allow OpenCode Mobile. On Android, also review battery optimization and battery-saver settings if alerts are delayed; some devices aggressively suspend background work. The section links directly to the relevant system settings where supported. ## What you can receive * **Completion alerts** when a tracked task finishes. * **Failure alerts** when a tracked task finishes with an error. * **Needs-input alerts** when a tracked task blocks on a permission or question while the app is not in the foreground. * **Android ongoing activity** for server-wide work, including tasks started on another project or on the desktop. Tapping a notification opens the owning connection, project, and session when the app can resolve them. ## How background checking works The app creates a pending tracker after you submit a prompt. It confirms the result against the server before alerting; a cached idle status is not treated as completion. * Stopping a session clears its pending completion tracker. * Interrupted or aborted runs are dropped without a completion alert. * A record for another project is kept instead of being cleared by the active project. * On supported native builds outside Expo Go, a background task checks pending sessions periodically. * On Android, a foreground service and Headless JS keep provider SSE/polling alive while work is active. The ongoing notification stops when all tracked work is idle, dismissed, or the service times out. * On iOS, background delivery is best effort. iOS grants background time opportunistically, so a suspended app may deliver a completion only when it next runs or when the system schedules the task. Background monitoring does not work on web or in Expo Go. Android force-stop, removing the app from Recents, and process termination end live monitoring; the server job keeps running. ## What expectations are realistic Notifications are a convenience, not a guaranteed job queue. Delivery can be affected by: * device power management and battery settings; * connectivity; * app lifecycle and platform restrictions; * notification permission; * Android foreground-service limits. Always open Chat to verify the actual server state when a notification is missing or delayed. ## Widgets and quick actions Android home-screen widgets can show recent replies, awaiting actions, and plan progress without opening the app. See [Quick actions and widgets](https://getopencode.app/docs/guides/quick-actions-and-widgets/). Next: [Start and monitor tasks](https://getopencode.app/docs/guides/tasks/), [manage sessions](https://getopencode.app/docs/guides/sessions/), or troubleshoot [stale server state](https://getopencode.app/docs/guides/troubleshooting/). # Select and Manage OpenCode Projects on Mobile > Choose, add, archive, and switch OpenCode projects from the mobile app, including server-archived projects, worktrees, and project files. A project is the OpenCode directory that owns the chats, files, and terminal sessions shown in the app. The **Projects** tab is the home for that context. ## Choose a project Use any of these entry points: * **Projects** — the project name in the header opens the project picker. * **Chat** — the chat library’s project button opens the same picker. * **Onboarding** — the Project step lists the server’s projects. The picker shows the projects the **server** reports, in server order. The app does not keep an “opened on this device” list, so a stale local entry cannot hide or invent a project. Search filters the list. The currently active project is labeled **Active**; a project that matches the server’s current location may be labeled **Current**. ## Add a project 1. Open the project picker. 2. Tap **Add project**. 3. Browse server folders, or choose **Enter path manually**. 4. Select a folder or type its directory, then submit. Folder browsing lists direct child folders with the current path and an **Up** action. **Select this folder** fills the directory field. The app asks the server to resolve the directory, refreshes the project catalog, and selects the resolved project root. An invalid directory keeps the form open with the error. Adding a project registers the directory on the OpenCode server. It does not copy the repository onto the phone. ## Archive projects There are two different archive concepts. Neither one deletes repository files. ### Archived on this device A project row’s device-local archive action hides that server project only on this device. * Hidden projects move to a collapsed **Archived on this device (N)** section. * **Restore** brings one back. * Search expands and filters the archived section. * Hiding the active project activates the first remaining visible project on that connection. These markers are stored per connection and never create a local project row. ### Archived on OpenCode On OpenCode 2, the picker also offers an **Archived on OpenCode** switch. * The normal list stays the server’s default and excludes archived projects. * Enabling the switch fetches archived entries from the server and shows them as read-only. * **Restore** asks the server to resolve the project’s directory again. It succeeds only when the folder exists; the server error is shown otherwise. * The app does not offer a server-side archive action for an active project. * OpenCode 1.x hides this section. A project can be archived on the device and on the server at the same time. While the server still reports it as archived, the server-archived section determines how it is shown. ## Switch projects Selecting another project clears the current session selection and rehydrates or creates the appropriate session for that project. The app remembers the last session used per project. Switching projects changes: * which chats appear in the chat library; * which files and worktrees the Projects tab shows; * which terminal PTYs are available; * the scope used for diffs, approvals, and terminal requests. The active connection remains the same unless you switch servers in Settings. ## Worktrees as projects A worktree is an isolated checkout managed by OpenCode. When a project has more than one checkout, a worktree selector appears beside the project name. * Create a worktree from **New chat**; an optional name is accepted. * Select a worktree as the active location. * Remove a worktree from the management mode in the worktree switcher. Removal requires destructive confirmation. Worktree reset and an optional start command are not available in the current app. Worktree operations use experimental OpenCode endpoints, so availability depends on the server. ## Files and branches The **Projects** tab opens the project’s Files surface. It can show the current VCS branch and changed-file count when the server supplies them. From there you can search, read files, preview images, audio, and video on OpenCode 2, download files, and save focused text edits. On OpenCode 2 you can also copy, move, rename, and delete entries. See [Project files](https://getopencode.app/docs/guides/workspace-files/). ## Troubleshooting * **No projects appear:** confirm the server is connected and reports a project catalog, then refresh Projects. * **Add project fails:** confirm the path exists on the OpenCode server and the server resolved the directory. * **A project disappeared:** check the device-local archive section and, on OpenCode 2, the server-archived switch. * **Sessions seem missing:** confirm the active project and connection; sessions are scoped to both. * **A worktree is not selectable:** confirm the server still resolves that worktree directory. * **Restore fails:** the server-archived folder may no longer exist. Recreate it on the server first. Next: [Work with files](https://getopencode.app/docs/guides/workspace-files/), [manage worktrees](https://getopencode.app/docs/guides/worktrees/), or [start a task](https://getopencode.app/docs/guides/tasks/). # OpenCode Providers and Models on Mobile > Connect AI providers, manage accounts, choose visible models and variants, and understand model memory in OpenCode Mobile. Use this page when a model is missing from Chat, a provider needs authentication, or you want a shorter model picker. ## Understand the two authentications * **Connection credentials** protect access to your OpenCode server. * **Provider credentials** allow OpenCode to call an AI provider. Changing one does not configure the other. A provider key is stored by the connected OpenCode server, not used as the mobile server password. ## Add a provider 1. Open **Settings → AI & providers**. 2. Tap **Add provider**. 3. Choose a provider with an available login method. 4. Select **API key**, OAuth, or another method supplied by the server. 5. Complete the browser flow or enter the requested credential. 6. Return to Settings and confirm the provider appears as configured. Some OAuth flows open the browser and wait for completion. Others show a pairing/device code or ask you to paste an authorization code. The app shows the instructions and a copy action when the code is available. A provider can have multiple stored accounts on OpenCode 2 servers. Select the active account from the provider row, or add another account for the same provider. Removing an account deletes the credentials stored through OpenCode for that account. ## Choose visible models Configured providers appear once as expandable rows with their model count, accounts, and remove action. Expand a provider to enable or disable its models. * Enabling a model makes it available in the Chat picker; disabling it removes clutter without deleting the provider. * Models are grouped by provider and several providers can stay expanded. * If every stored enabled model disappears, the currently available configured models become enabled by default. In Chat, the model picker is searchable, groups models by provider, and shows **Selected** and **Recent** sections. Selecting a model also selects its provider. Model capabilities come from the server, including attachment support, input modalities, tool use, reasoning, status, and context/output limits. If an attachment action is unavailable, select a model that advertises attachment support. If neither the stored model nor the server-configured default resolves, the picker shows **Select model** and the app sends without a model so the server default can apply. It does not silently choose a blocked model. ## Model variants and memory On OpenCode 2, the picker shows **Default** plus the model’s server-reported variants. The selected variant is saved per model and applied to new prompts and commands. Models without variants hide the selector. The composer remembers the latest model per agent. Switching agents restores that agent’s last explicit model; an agent without one lets the server or agent default apply. Onboarding does not ask for a global default model. Each assistant reply records the model that produced it, including auto-routed replies, so a later model switch does not erase which model answered an earlier turn. ## Automatic model routing OpenCode Mobile can classify each prompt as Simple, Standard, or Complex and choose a model for that tier. It is opt-in, supports an on-device or server classifier, and never falls back to a guessed tier. See [Automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/) for the classifier choices, tier mapping, thinking levels, and long-chat cache guard. ## Choose how to send messages during work On OpenCode 2, **Settings → Chat & responses → Messages sent while working** controls prompt delivery: * **Steer** applies the next message at the next step of the current response. * **Append** queues it for a later turn. This setting affects prompt delivery, not model selection. ## Pick for the job * Use a capable reasoning model for planning and difficult code changes. * Use a faster or less expensive model for routine summaries and status checks. * Consider automatic routing when you want that choice made per prompt. * Keep the session focused so model choice is not compensating for unrelated context. * Check [Session usage](https://getopencode.app/docs/guides/usage/) when cost or context pressure matters. ## Troubleshooting * **No providers appear:** connect to the server first and refresh. * **A provider is missing from Add provider:** the server did not expose an interactive login method for it. Configure environment-only providers on the server. * **A model is missing:** confirm the provider is configured, the model is enabled, and the server reports it. * **A variant is missing:** the model may no longer expose it; choose Default. * **OAuth never finishes:** reopen the provider row, retry the browser flow, or cancel the pending attempt. * **Provider credentials are rejected:** remove and re-add the account, or check the provider dashboard. * **A reply used a different model:** check whether automatic routing is on or an agent restored its remembered model. Next: [Automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/), [understand usage](https://getopencode.app/docs/guides/usage/), or [start a task](https://getopencode.app/docs/guides/tasks/). # OpenCode Mobile Quick Actions and Android Widgets > Use launcher quick actions and Android home-screen widgets to reach recent OpenCode chats, approvals, and plan progress. OpenCode Mobile can surface recent work outside the app. Quick actions are available on iOS and Android; home-screen widgets are Android-only. ## Launcher quick actions Long-press the app icon or open the launcher’s quick-action menu to see: * **New chat**; * up to three running or recently updated sessions from the active connection. Session labels follow the app language and update when sessions change. Tapping a session opens the owning connection, project, and chat. Opening a session from another saved connection switches connections first. Quick actions are published while the app is in the foreground and are debounced to avoid excessive launcher updates. If the app is not connected, no session items are published. ## Android home-screen widgets Android offers three resizable widgets: | Widget | What it shows | | -------------------- | --------------------------------------------------------------------------------------- | | **Latest replies** | The newest readable assistant reply from up to three recent root chats | | **Awaiting actions** | Up to three conversations with permission or question counts and short request excerpts | | **Plan progress** | The current chat’s todo steps, completed/total count, current step, and upcoming steps | Widgets use the app’s existing realtime and polling data. They show the last successful update time, so a suspended app can display a dated snapshot. Widgets do not require notification permission. ### Privacy Android supports **Show widget previews** under **Settings → Notifications**. When disabled, reply, request, and plan text is removed from snapshots and placed widgets; titles, counts, and status remain. Widgets do not include approve, deny, reply, abort, or auto-approve controls. Tapping a widget opens the app, where the action can be reviewed. ### Limitations * Widget content depends on the app having synced recently. A force-stopped app cannot update widgets until it runs again. * Gallery labels and descriptions are English-only; rendered widget content follows the app language. * iOS home-screen widgets and Live Activities are not available yet. * Quick actions are not a background task queue; they only open existing sessions or create a new chat. ## Requirements * Native Android or iOS build. Web and Expo Go do not provide these surfaces. * The app must be connected to a server for session items. * Android widgets require a native Android build and at least one app launch. Next: [Notifications](https://getopencode.app/docs/guides/notifications/), [manage sessions](https://getopencode.app/docs/guides/sessions/), or [configure settings](https://getopencode.app/docs/guides/settings/). # Secure OpenCode Remote Access from Mobile > Threat-model an OpenCode mobile connection, protect server credentials, compare private and public routes, and respond to a lost device or exposed endpoint. An OpenCode server may read and change source files, execute commands, and invoke configured AI providers. Remote access therefore creates a privileged path into a development machine. HTTPS alone does not make that path safe. ## Threats to plan for * A public scanner discovers an exposed OpenCode endpoint. * A weak or reused Basic-auth password is guessed or leaked. * A lost phone retains a working server URL and credentials. * A proxy forwards normal HTTP but breaks or exposes realtime and terminal traffic. * A user approves a dangerous tool action without reviewing the active project or session. * A temporary tunnel URL is pasted into a public issue, log, or screenshot. * An untrusted plugin or MCP server is installed without reviewing what runs on the OpenCode host. ## Minimum controls 1. Bind OpenCode to `127.0.0.1` when using a VPN, tunnel, or local reverse proxy. 2. Configure a unique username and strong password. 3. Prefer a private [Tailscale route](https://getopencode.app/docs/guides/tailscale/) over a public hostname when possible. 4. If using [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/), keep OpenCode authentication enabled and protect the Cloudflare account. 5. Restrict firewall rules and tailnet ACLs to the minimum required scope. 6. Keep OpenCode Mobile and the OpenCode server current. 7. Review permissions, questions, changed files, and the selected project before accepting completion. ## Credential handling On native iOS and Android builds, non-secret connection details use app storage. Server passwords, custom header values, custom CA material, and OIDC access or refresh tokens use Keychain/Keystore-backed secure storage. Treat the device as holding access to the development server. Use device encryption and a strong screen lock, and rotate the OpenCode password after a device is lost or transferred. Browser builds cannot persist credentials through native secure storage. A custom CA is trusted only for one connection’s `host:port`; it does not become a device-wide trust anchor. OIDC sign-in uses the system browser with PKCE, never an embedded WebView. Multiple saved connections each have their own stored password. Editing a connection does not reconnect it automatically, so a stale connection can remain active until you choose **Reconnect**. Extensions and plugins execute code on the OpenCode host. Install only targets you trust, review plugin and MCP changes before saving, and treat extension editing as server administration. OpenCode 2 `opencode pair` links and Cloud Link pairing links are credentials. They expire quickly and work once, but still grant access while valid. Do not paste them into public issues, logs, chat messages, or screenshots. If a link is exposed, create a fresh pairing link or revoke the machine where available. Cloud Link adds an optional managed route and store subscription. Review the [Cloud Link page](https://getopencode.app/docs/cloud-link/) and the [privacy policy](https://getopencode.app/privacy-policy/) before using it. Cloud Link does not change the fact that your prompts and source code are sent to the OpenCode server you select. Do not reuse an AI-provider API key as the OpenCode server password. Provider authentication and server connection authentication protect different systems. ## Incident response If an endpoint or credential is exposed: 1. Stop or disable the tunnel or proxy route. 2. Rotate the OpenCode username/password. 3. Review server, proxy, and provider logs for unexpected activity. 4. Revoke affected provider credentials if tool or environment exposure is plausible. 5. Update the app connection only after the route is secured again. Report product vulnerabilities privately through the [security page](https://getopencode.app/security/). Use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/) for failures without security impact. # Connect OpenCode Mobile Through a Reverse Proxy or API Prefix > Point OpenCode Mobile at an OpenCode 2 server mounted behind a reverse proxy or under an API path prefix such as /api, with pair or manual setup. OpenCode Mobile accepts a base URL with a prefix, for example: ```text https://dev.example.com/api ``` With that setting, health and session calls stay under the prefix, such as: ```text https://dev.example.com/api/global/health ``` Terminal WebSockets also preserve the prefix and switch to `wss:` for HTTPS endpoints. ## When to use a path prefix * `/` serves a web application instead of the OpenCode API * A proxy mounts OpenCode under `/api` or another subpath * The app reports that the server returned HTML, a JSON parse error, 404, or another non-API response Do not append `/api` blindly. Verify the resulting `/global/health` endpoint first. ## Pair through the proxy Start the OpenCode 2 shared service on loopback behind the proxy: ```bash opencode service set password 'use-a-strong-password' opencode service set hostname 127.0.0.1 opencode service set port 4096 opencode service start opencode service status ``` Create the pairing link with the public proxy URL: ```bash opencode pair --url https://dev.example.com/api ``` Scan the QR code in OpenCode Mobile, or paste the link. Pairing links expire after five minutes and work once. If you use a standalone `opencode serve` process or OpenCode 1.x, connect manually with the complete API base and password instead. Pairing requires the OpenCode 2 shared service. ## Proxy requirements A reverse proxy must forward ordinary HTTP requests, server-sent events (SSE), and terminal WebSockets. If streaming or WebSocket upgrades are dropped, tasks appear to stall or the terminal fails while the browser UI still works. ## Before you publish Read the [remote-access security model](https://getopencode.app/docs/guides/remote-access-security/) first. Use HTTPS, require OpenCode authentication, and avoid exposing an unauthenticated server. For other routes, return to the [remote-access overview](https://getopencode.app/docs/remote-access/) or use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). # Manage OpenCode Sessions from Mobile > Search, switch, favorite, rename, delete, fork, or revert OpenCode sessions from the mobile app, and review changes without losing context. Sessions separate different pieces of work. Use them like focused work threads: one goal, its discussion, and its resulting changes. ## Open the chat library Tap the current chat title at the top of **Chat** to open the library. From there you can: * search the active or favorite list; * switch to an existing session or create a new one; * open a session from another project or server; * favorite a session for quick access; * hide subagent chats; * rename or delete a session. The library groups sessions by server and project and shows each project’s path, so two projects with similar names are distinguishable. The **Running & recent** group shows up to four sessions from the whole connection, running ones first. Selecting one switches to its project and opens it in one tap. ## Create, rename, and organize * **New chat** opens a sheet that preselects the current server and project. Choose another server, project, or worktree if needed, then confirm. The app creates the session there and switches the Chat view to it. * **Rename** opens a focused editor with Save, Cancel, and keyboard submit. Empty names are rejected, and the action stays below the title field. * **Delete** permanently removes a session after confirmation. * **Favorite** keeps a session accessible across projects. * **Hide subagent chats** keeps delegated child sessions out of the list. Archive, restore, and share actions are not part of the current app. Use delete for finished work you no longer need, and fork or revert when you want to preserve or change a direction. Project-scoped row actions are offered only for sessions in the active project. Sessions from other projects can still be opened and favorited; the app switches project first. ## Read the transcript * Chat no longer uses separate **Session** and **Files Changed** tabs. The transcript fills the chat, and a change chip above the composer opens the review overlay. * Each assistant bubble shows the model that produced that reply, including auto-routed replies, and the reasoning variant when the server reports one. * Contiguous reasoning, tool calls, and patches appear as a two-level activity run. Expand a run to inspect thoughts, commands, reads, and per-file diffs. * While you are away from the bottom, **Jump to latest** appears and changes to **New messages** when rows arrive. Tap it to restore follow mode. * Opening a session loads the newest page. Scrolling to the top keeps paging older history; loaded history is not capped. * Long-press a message to copy it. Use the speaker action on an assistant message to hear it aloud. * Undo a revert from its notice; the reverted prompt and attachments return to the composer. ## Explore a different direction Use actions on one of your messages: * **Fork** starts a separate session from that point. Use it to compare approaches without losing the original. * **Revert** asks OpenCode to undo session changes after that message. An in-flight reply is stopped before the rewind is staged. * **Undo revert** restores the reverted session state and the prompt. Forking is the safer choice when you want to preserve both directions. Revert changes server-side session state and deserves the same care as any source-changing action. ## Session commands On OpenCode 2, two client built-ins are available from the composer: * `/compact` asks the server to compact the session. Compaction events rebuild the transcript window. * `/btw ` asks a transient question about the session context. The answer opens in a local sheet and is not added to the conversation, does not run tools, and disappears when the sheet closes. Server-provided slash commands, `@` mentions, and `!` shell mode are documented under [Start and monitor a task](https://getopencode.app/docs/guides/tasks/). ## Session links A session can be opened from a notification, quick action, widget, or deep link. See [Deep links](https://getopencode.app/docs/guides/deep-links/) for the link format and behavior. Next: [Start and monitor a task](https://getopencode.app/docs/guides/tasks/), [review approvals and changes](https://getopencode.app/docs/guides/approvals-and-changes/), or [understand session usage](https://getopencode.app/docs/guides/usage/). # OpenCode Mobile Settings and Customization > Understand every OpenCode Mobile setting for appearance, chat, voice, connections, providers, extensions, approvals, diagnostics, and updates. OpenCode Mobile groups configuration into three areas: **App preferences**, **Connections**, and the **Selected server**. This page is the map; follow the focused guides for details. ## Open Settings Open the **Settings** tab. The home screen is searchable, and every category opens in a sheet without changing the active chat. * **Search settings** matches localized labels, descriptions, and category keywords. * Selecting a result opens the category and reveals the control, including a collapsed group. * Search does not index current values, credentials, or content returned by the server. * Closing a result keeps the query; clear it to restore the grouped list. The settings map follows the website’s current color theme. ![Grouped and searchable OpenCode Mobile settings, light theme](https://getopencode.app/img/docs/settings-home-light.webp) ![Grouped and searchable OpenCode Mobile settings, dark theme](https://getopencode.app/img/docs/settings-home-dark.webp) ## App preferences ### Appearance * **Theme mode:** follow the system, or lock the app to light or dark. * **Theme:** choose Green, Blue, Red, Purple, Pink, or Gray. The accent changes surfaces, accents, chat bubbles, code blocks, and the terminal. * **Slim interface:** reduce control sizes, padding, and header heights so more of the transcript or output fits on screen. The app applies the theme immediately and remembers it across connections. ### Chat & responses * **Messages sent while working** on OpenCode 2: choose **Steer** to apply the next message at the next step, or **Append** to queue it for a later turn. * **Chat text size:** adjust message text from small to large. * **Flat conversation:** remove message bubbles for a denser transcript. * **Response scope:** brief, balanced, or detailed answers. * **Simple next actions:** ask the assistant to end with a short recommendation when there is a clear next move. Response scope and next actions shape the generated prompt hints; they do not change the app layout. ### Voice & audio Voice has separate input and playback choices. See [Voice](https://getopencode.app/docs/guides/voice/) for the full workflow. * Choose **System speech** or **On-device voice** input. * Set the wake phrase, confirmation, and interim-progress readback. * Pick the speech locale, speech rate, and playback voice or on-device pack. * Adjust the working sound. * Run the voice check for microphone, recognition, and playback status. ### Notifications Use Notifications to request permission and review readiness. Android also links to notification, battery optimization, and battery-saver settings. On Android, **Show widget previews** controls whether reply, request, and plan text appears in home-screen widget snapshots. See [Notifications](https://getopencode.app/docs/guides/notifications/) and [Quick actions and widgets](https://getopencode.app/docs/guides/quick-actions-and-widgets/). ### Language Choose **System default** or an explicit interface language. Supported languages are English, Spanish, Hindi, German, French, Simplified Chinese, Portuguese, Japanese, Russian, Arabic, and Hebrew. Arabic and Hebrew use right-to-left layout and navigation direction. The interface language also drives date, number, currency, and relative-time formatting. ### About & support * **Rate us on Play Store** (Android), **Give us feedback**, and **Open support page**. * **Update checks** on supported store builds: enable or disable checks, and choose **When available**, **Daily**, or **Weekly**. * **Reset onboarding** reopens the setup assistant without clearing connections, providers, or preferences. Update checks control the app’s own prompts and reminders, not the store’s automatic-update setting. See [Releases and compatibility](https://getopencode.app/docs/changelog/). ## Connections ### Connection Add a manual server, scan a local QR code, switch saved profiles, or reconnect. Editing a profile does not reconnect automatically. See [Add or switch connections](https://getopencode.app/docs/connections/). ### Cloud Link Cloud Link appears only when the app was installed from the App Store or Google Play. Use it to subscribe or restore access, pair a machine, manage machines, and edit exposed services. Direct APK and web builds do not show this section. See [Cloud Link](https://getopencode.app/docs/cloud-link/). ## Selected server The selected server is chosen once on Settings home. Its category sheets show the server and project context instead of repeating the selector. ### AI & providers Add providers, manage multiple accounts, enable the models shown in Chat, and configure automatic model routing. Provider credentials belong to the connected OpenCode server, not the mobile app. See [Providers and models](https://getopencode.app/docs/guides/providers-and-models/) and [Automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/). ### Extensions On OpenCode 2, Extensions manages MCP servers, plugins, agents, skills, and slash commands for the current project or all projects. Plugin GUI panels are launched from the chat header. See [Manage extensions](https://getopencode.app/docs/guides/extensions/). ### Approvals On OpenCode 2, Approvals lists saved rules created by **Always allow**. Removing a rule makes the server ask again. The composer’s auto-approve control is also available only on OpenCode 2. OpenCode 1.x does not expose the composer auto-approve control or saved approval rules. ### Diagnostics Diagnostics reports: * OpenCode health and version; * global realtime status and polling fallback; * MCP counts when available; * network type, online state, reconnect attempts, latency, and data use; * the last JavaScript error recorded on the device; * local log, span, and metric storage, recent events, and export; * optional remote telemetry when an OTLP backend is configured. On OpenCode 1.x, the Diagnostics sheet also has an **MCP** tab for runtime MCP actions. On OpenCode 2, manage MCP definitions under **Extensions**. See [MCP and diagnostics](https://getopencode.app/docs/guides/mcp-and-diagnostics/). ## Server selection and disconnected servers * Only connected servers appear in server and project selectors. * Disconnected, connecting, and unavailable profiles remain in **Connection** so you can reconnect them. * Chat can fail over to another healthy server when the focused server drops. The failed server stays enabled but is omitted from selectors until it reconnects. ## Related guides * [Add or switch connections](https://getopencode.app/docs/connections/) * [Providers and models](https://getopencode.app/docs/guides/providers-and-models/) * [Automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/) * [Manage extensions](https://getopencode.app/docs/guides/extensions/) * [Cloud Link](https://getopencode.app/docs/cloud-link/) * [Notifications](https://getopencode.app/docs/guides/notifications/) * [Voice](https://getopencode.app/docs/guides/voice/) * [MCP and diagnostics](https://getopencode.app/docs/guides/mcp-and-diagnostics/) # Share Files and Text into OpenCode Mobile > Share text, links, images, and documents from Android apps into an OpenCode Mobile chat draft, with limits and privacy details. On Android, OpenCode Mobile can receive content from another app’s Share menu. Use it to send a screenshot, document, log excerpt, or link into a chat without copying and pasting. iOS inbound sharing is not available yet. ## Share into the app 1. In the source app, choose **Share**. 2. Select **OpenCode Mobile**. 3. Review the share preview. 4. Choose the destination chat, or choose **New chat** in the current project. 5. Tap **Add to chat**. 6. Review the draft and attachments in the composer. 7. Tap Send when the content is ready. Shared content is added to the draft; it is **never submitted automatically**. ## What you can share The Android share sheet accepts single or multiple items, including: * text and links; * images; * documents such as PDFs; * other files the source app exposes. Limits and behavior: * up to **10 items** per share; * **10 MB per file**; * the selected model must support attachments before sending; * unsupported, missing, or oversize items remain visible as warnings; * the draft keeps existing text and attachments; * a staged share expires after **10 minutes**. ## Choose the destination The preview defaults to the current chat and project. You can change the target project before adding the content, or create a new chat after it is staged. If the app is not fully onboarded when the share arrives, it shows a finish-setup state and keeps the staged content until it expires. Complete setup, then return to the preview or share again. ## Privacy Shared content is staged in memory on the device and then sent to the OpenCode server you selected. It is not uploaded to OpenCode Mobile infrastructure. The normal attachment and permission rules still apply. Avoid sharing secrets, customer data, or private URLs into sessions that other people can access. ## Troubleshooting * **OpenCode Mobile is not in the share sheet:** open the app once after installing it, then try again. * **An item was skipped:** check its type and size; files over 10 MB are rejected. * **The share preview disappeared:** the 10-minute staging window expired. Share again. * **Send is disabled:** choose a model that supports attachments or remove unsupported files. * **iOS share sheet:** inbound sharing is not implemented yet. Next: [Start and monitor tasks](https://getopencode.app/docs/guides/tasks/), [review approvals and changes](https://getopencode.app/docs/guides/approvals-and-changes/), or [use quick actions and widgets](https://getopencode.app/docs/guides/quick-actions-and-widgets/). # Connect OpenCode Mobile with SSH Port Forwarding > Keep an OpenCode 2 server bound to loopback and reach it from a mobile SSH client with a local port forward. A mobile SSH client or terminal app can keep a local port forward open: ```bash ssh -N -L 4096:127.0.0.1:4096 your-user@your-server ``` While the tunnel is active, use: ```text http://127.0.0.1:4096 ``` ## Start OpenCode on the expected port For the OpenCode 2 shared service, set the port and keep it on loopback: ```bash opencode service set password 'use-a-strong-password' opencode service set hostname 127.0.0.1 opencode service set port 4096 opencode service start opencode service status ``` Alternatively, run a foreground standalone server on the same port: ```bash OPENCODE_SERVER_PASSWORD='use-a-strong-password' \ opencode serve --hostname 127.0.0.1 --port 4096 ``` ## Connect manually In OpenCode Mobile, add a manual connection: * **Server URL:** `http://127.0.0.1:4096` * **Username:** `opencode`, or the configured `OPENCODE_SERVER_USERNAME` * **Password:** the OpenCode service or server password SSH forwarding is managed by the separate SSH client. A pairing link printed on the server is not useful here unless the phone itself owns the forwarded loopback port, so use manual entry. ## Important limitation This transport is managed by the separate SSH client, not OpenCode Mobile. Background restrictions on the SSH app can interrupt the connection, so the forward may close when the app is suspended. ## Before you start Keep OpenCode bound to `127.0.0.1`, enable password authentication, and protect the SSH key or account that opens the forward. For other routes, return to the [remote-access overview](https://getopencode.app/docs/remote-access/) or use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). # Connect OpenCode Mobile with Tailscale > Keep OpenCode on loopback, publish it through Tailscale Serve, and pair the mobile app with a private HTTPS address without opening a router port. Tailscale is the preferred default when only your own devices need remote access. It keeps the route inside your tailnet, provides a stable private HTTPS hostname, and avoids opening a router port. ## 1. Start OpenCode 2 on loopback Set a password and start the shared service on loopback: ```bash opencode service set password 'use-a-strong-password' opencode service set hostname 127.0.0.1 opencode service set port 4096 opencode service start opencode service status ``` Keeping the service on `127.0.0.1` prevents direct LAN or public access. Tailscale Serve becomes the intended network entry point. ## 2. Publish it inside the tailnet ```bash tailscale serve --bg 4096 tailscale serve status ``` The status output should show an HTTPS hostname forwarding to `http://127.0.0.1:4096`. ## 3. Pair or connect the phone Create a pairing link that uses the Tailscale HTTPS origin: ```bash opencode pair --url https://machine-name.tailnet-name.ts.net ``` Scan the QR code in OpenCode Mobile, or paste the link. The link expires after five minutes and works once. If you prefer a manual connection, install Tailscale on Android or iOS, sign in to the same tailnet, and enter the complete `https://...ts.net` address plus the OpenCode password. ## 4. Verify before troubleshooting the app From another tailnet-connected device, run: ```bash curl -u opencode:use-a-strong-password \ https://machine-name.tailnet-name.ts.net/global/health ``` If this fails, fix Tailscale Serve, device membership, ACLs, or OpenCode authentication first. The mobile client cannot compensate for an unreachable API. ## OpenCode 1.x or a standalone server If you use OpenCode 1.x, or deliberately run a foreground `opencode serve` process, start it with authentication and connect manually: ```bash export OPENCODE_SERVER_USERNAME=your-user export OPENCODE_SERVER_PASSWORD='use-a-strong-password' opencode serve --hostname 127.0.0.1 --port 4096 ``` Pairing requires the OpenCode 2 shared service. ## Common failures * **Phone is on the internet but not the tailnet:** open Tailscale and reconnect it. * **Hostname opens a web interface but the API fails:** use the correct API base path, potentially `/api`. * **Serve points at the wrong port:** compare `tailscale serve status` with the OpenCode port. * **ACL rejection:** allow the phone’s identity to reach the serving device and port. * **Old mobile build:** update before diagnosing a path-prefix bug. Review the [security model](https://getopencode.app/docs/guides/remote-access-security/), the broader [remote-access overview](https://getopencode.app/docs/remote-access/), and the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/). # Monitor OpenCode Tasks on Mobile > Start a task in OpenCode Mobile, attach context, follow live progress, steer or stop a run, and judge whether the result is complete. Use Chat to start work from your phone, check whether a task is progressing, or give OpenCode its next instruction. The screenshot follows the website’s current color theme. ![Running task with activity and composer controls in OpenCode Mobile, light theme](https://getopencode.app/img/docs/task-session-light.webp) ![Running task with activity and composer controls in OpenCode Mobile, dark theme](https://getopencode.app/img/docs/task-session-dark.webp) ## Before you start * Select the intended project in **Projects** or through the chat library’s project button. * Confirm the session title and project at the top of **Chat**. * Choose the agent and model above the composer. * Check whether auto model routing is on if you expect a different model to answer. * Keep approval prompts enabled when working in an unfamiliar repository. ## Start a new chat Tap **New chat** in the chat library. The sheet preselects the current server and project; choose another server, project, or worktree if needed. Confirming creates the session there and switches Chat to it while the transcript hydrates in the background. ## Send a task 1. Write the outcome you want in **Ask anything**. 2. Add constraints that OpenCode should preserve. 3. Say how the result should be checked. 4. Tap send. A useful prompt is specific without dictating every implementation detail: > Fix the empty state on the account page. Reuse the existing button component, do not change the API, and run the related tests. You may also attach files with **+**, dictate into the draft with the microphone, or use the composer’s command and mention suggestions. ## Use commands, mentions, and shell mode On OpenCode 2: * Type `/` at the start of the draft to see server commands and the built-in `/compact` and `/btw`. Selecting one inserts its name; unknown commands never become an ordinary prompt. * Type `@` to mention an agent, skill, project file, or reference. Mentions are sent as structured context and are dropped if you edit them out. * Start the draft with `!` to run a shell command through the session shell. The output appears as a shell activity row in the transcript. On iOS and Android, leading `/` commands and `@` mentions are highlighted in the composer as you type. Attachments disable shell mode and use normal prompt submission. ## Attach context * Attachments are limited to **10 MB per file**. * The selected model must advertise attachment support. * Images, documents, and other supported files can be previewed before sending. * On Android, content shared from another app opens a review screen first; see [Share from other apps](https://getopencode.app/docs/guides/share-from-other-apps/). * Shared or attached content is never submitted automatically. ## Follow the work The transcript shows the conversation, running status, activity runs, and anything waiting for you. * Reasoning, tool calls, and patches appear as compact activity runs. Expand a run to inspect thoughts, shell output, reads, and per-file diffs. Runs stay open or closed until you toggle them. * The progress control shows the current step and completed count; tap it for the full task list. * A centered change chip above the composer shows the file count and additions/deletions. Tap it to open the review overlay. * When you scroll away from the bottom, **Jump to latest** appears; **New messages** marks unseen activity. If the composer is empty while the task is running, its main action becomes **Stop**. Use it to abort a task that is going in the wrong direction. ## Send another message while work is running Open **Settings → Chat & responses → Messages sent while working** on OpenCode 2: * **Steer** applies the message at the next step of the current response. * **Append** queues the message for a later turn. Choose the behavior that matches the intent. Steering can correct a run quickly; appending preserves the current turn. A prompt attempted while offline is queued and sent once after reconnect; a timeout with an unknown server outcome is marked delivery-uncertain and is not replayed automatically. ## Choose the model The model picker groups models by provider, supports search, and includes model variants on OpenCode 2. The app remembers the latest model per agent, so switching agents restores that agent’s last explicit model. If [automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/) is enabled, the picker shows an **Auto-routing** row. Choosing an explicit model turns routing off for that chat. ## What good completion looks like * The assistant explains what changed. * The change chip and review overlay match the requested scope. * Relevant validation passed or any failure is clearly reported. * No permission or question is still waiting for you. * The notification, if enabled, matches the actual server state. Next: [Review approvals and changes](https://getopencode.app/docs/guides/approvals-and-changes/), [inspect session usage](https://getopencode.app/docs/guides/usage/), or [manage the session](https://getopencode.app/docs/guides/sessions/). # Use the OpenCode Terminal from Mobile > Use the xterm-based project terminal in OpenCode Mobile, including PTY tickets, full-screen programs, keyboard controls, and limits. Use **Terminal** for a focused command such as checking Git status, running a test, reading a short log, or invoking a project script. The terminal is backed by a project PTY and an xterm-based renderer, so it handles far more than a single-line command box. ## Open a terminal 1. Select a project in **Projects**. 2. Open **Terminal**. 3. Tap **+** to create a project PTY, or open the title menu to reconnect to an existing one. 4. Type directly in the terminal. Input is sent as you enter it. Use refresh to reload the server’s terminal list. Closing the active terminal terminates that PTY after confirmation. The terminal preserves the configured API path prefix, switches `http`/`https` to `ws`/`wss`, and uses a short-lived server-issued connect ticket. Basic-auth credentials are not embedded in the WebSocket URL. ## What the terminal supports * ANSI/VT cursor behavior and common terminal escape sequences * Alternate-screen programs and full-screen terminal UIs * Up to 10,000 lines of scrollback per opened terminal * Resize events when the mobile layout changes; the terminal fills the host width in landscape * Reconnect with acknowledged output cursors and a fresh ticket * A system-keyboard accessory with **Esc**, **Tab**, sticky modifiers, arrow keys, and an expandable function/navigation/paste row * Active-terminal marking, inline opening rows, named close targets, and copy confirmation * The selected app theme, including its accent and code colors Opened terminals survive tab and terminal switches. The provider bounds pending output to avoid unbounded memory growth. ## Commands that work well ```bash git status --short npm test npm run typecheck tail -n 80 path/to/log ``` The terminal output follows the website’s current color theme. ![Terminal output in OpenCode Mobile, light theme](https://getopencode.app/img/docs/terminal-light.webp) ![Terminal output in OpenCode Mobile, dark theme](https://getopencode.app/img/docs/terminal-dark.webp) ## What it is not The mobile terminal is not a replacement for a desktop terminal workspace. Small screens, the software keyboard, copy/paste, and mobile focus behavior still make long interactive sessions awkward. It also depends on compatible OpenCode PTY endpoints and a WebSocket path through your proxy or tunnel. If a full-screen program does not respond as expected: * Confirm the command is available on the server. * Check that the proxy forwards WebSocket upgrades. * Try the command in a desktop terminal to separate app and server issues. * Reconnect the terminal to refresh its ticket and cursor state. ## Troubleshooting * **Terminal tab is empty:** confirm the server exposes PTY endpoints and a project is selected. * **Chat works but terminal fails:** the proxy or tunnel is probably dropping WebSocket upgrades. * **Input looks wrong:** use the keyboard accessory for Esc, Tab, arrows, and modifiers; some full-screen programs need them. * **Terminal disconnects:** reconnect from the title menu. The app retries unexpected disconnects with backoff. Next: [Troubleshoot the connection](https://getopencode.app/docs/guides/troubleshooting/), review [remote-access options](https://getopencode.app/docs/remote-access/), or [work with files](https://getopencode.app/docs/guides/workspace-files/). # Fix OpenCode Mobile Connection Problems > Diagnose OpenCode Mobile authentication, local QR, Cloud Link, HTML and 404 responses, Tailscale, Cloudflare, proxies, realtime updates, and missing projects. Debug the connection from the server outward. Reinstalling the app before proving the API is reachable usually wastes time. ## Start with the symptom | Symptom | Most likely area | | ----------------------------------- | ---------------------------------------------------------------------------- | | Server URL cannot be reached | Network route, firewall, VPN, tunnel, or wrong address | | HTML page, 404, or JSON parse error | Wrong API base or missing `/api` prefix | | 401 or 403 | Server username/password, custom gateway headers, OIDC, or Cloud Link access | | Certificate rejected | Custom CA does not match the host, expired, or not trusted | | OIDC sign-in loops | Issuer, client ID, scopes, redirect URI, or revoked refresh grant | | Connected but no project appears | Project catalog, server context, or permission | | Messages update only after refresh | SSE blocked or polling fallback | | Terminal fails while chat works | PTY endpoint or WebSocket forwarding | | File save is rejected | File changed, editing unsupported, or V2 conflict | | Model is missing | Provider configuration, model visibility, or routing | | Local QR fails | Loopback-only address, expired code, or different networks | | Cloud Link is missing or inactive | Store install, subscription, connector, or environment | | Notifications are delayed | Battery optimization, iOS scheduling, or app lifecycle | ## 1. Confirm versions and server mode Update OpenCode Mobile and use a current OpenCode release. OpenCode 2 is the primary target and normally runs as a shared background service: ```bash opencode --version opencode service status opencode api get /api/info ``` Start it with `opencode service start` if needed. For a foreground server, use `opencode serve`; OpenCode 1.x also supports `opencode web` for the browser UI. Pairing requires the OpenCode 2 shared service, so a standalone server uses manual connection details. Check **Settings → Diagnostics** for the OpenCode version, health status, realtime state, network behavior, local logs, and last app error. ## 2. Test the exact API base Append `/global/health` to the same base URL entered in the app: ```bash curl -i -u your-user:your-password \ https://your-opencode-host.example/global/health ``` Expected: a successful HTTP response containing OpenCode health data. * **HTML response:** you probably entered the web UI rather than the API base. * **404:** check whether the API is mounted below `/api` or another prefix. * **401/403:** for OpenCode 2, verify the password set with `opencode service set password`; for a standalone or V1 server, verify `OPENCODE_SERVER_USERNAME` and `OPENCODE_SERVER_PASSWORD`. For Cloud Link, check subscription access. * **Timeout/DNS failure:** fix the network, tunnel, VPN, or hostname before changing the app. ### Gateway headers, certificates, and OIDC * **401 or 403 behind Cloudflare Access, Authelia, or oauth2-proxy:** confirm the connection’s custom header names and values, then reconnect. Local QR and Cloud Link profiles do not carry custom headers. * **Certificate rejected:** import the correct PEM or DER certificate for the same `host:port`, confirm it has not expired, and reconnect. The custom CA is hidden and cleared on OpenCode 1.x. * **OIDC loops or expires:** confirm the issuer, client ID, scopes, token header, and registered redirect URI. A revoked refresh grant requires **Sign in again**; a temporary provider outage should preserve the session. * **OIDC is unavailable:** it requires HTTPS except for loopback development, and Cloud Link connections do not offer it. ## 3. Check the selected transport For [Tailscale](https://getopencode.app/docs/guides/tailscale/), confirm both devices are connected to the same tailnet, ACLs allow the route, and `tailscale serve status` points at the OpenCode port. For [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/), confirm `cloudflared` is running, the hostname resolves, ingress targets `127.0.0.1:4096`, and authentication remains enabled. For a [reverse proxy](https://getopencode.app/docs/guides/reverse-proxy/), preserve the API prefix, authorization header, server-sent events, and WebSocket upgrade headers. For a [local network](https://getopencode.app/docs/guides/local-network/) connection, use the machine’s LAN address, allow the port on the private firewall profile, and disable Wi-Fi client isolation if devices cannot reach each other. ## 4. Local QR pairing * Confirm `opencode service status` shows a running OpenCode 2 service. * Run `opencode pair` again if the link expired or was already used. Links expire after five minutes and work once. * If pairing is disabled, run `opencode service unset disabled`; pairing requires the shared service. * Confirm the server listens on an address reachable from the phone, not only `localhost`. * If the app reports a loopback-only link, bind the service to a trusted reachable interface and pair again. * For a public URL, create the link with `opencode pair --url https://your-host.example`. * Confirm both devices are on the same network and that camera permission is allowed. A standalone `opencode serve` process cannot pair; use manual URL and password instead. See [Add or switch connections](https://getopencode.app/docs/connections/) for the full flow. ## 5. Cloud Link * Confirm the app was installed from the App Store or Google Play. * Confirm the subscription is active, or use **Restore purchases**. * Confirm the connector is running on the computer. * Use a fresh connector QR code from the matching environment. * Approve the connection on the computer if prompted. * If access expired, reconnect and renew the subscription if needed. See [Cloud Link](https://getopencode.app/docs/cloud-link/) for setup, machines, and exposed services. ## 6. Interpret the app state * **Connected but no project appears:** refresh **Projects**, confirm the server reported a project, and inspect diagnostics. * **Messages update only after refresh:** inspect realtime status and proxy support for the event stream. * **Terminal fails but chat works:** verify project PTY endpoints and WebSocket forwarding. Terminal support is optional. * **File save fails:** reopen the file, check that the connected contract supports editing, and retry after resolving the conflict. * **File actions are missing:** copy, move, rename, and delete require OpenCode 2 and the server shell utilities. * **A model is missing:** provider authentication and model visibility are server settings; use [Providers and models](https://getopencode.app/docs/guides/providers-and-models/) or [Automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/). * **Extensions are missing:** extension management requires OpenCode 2. On V1, use the MCP tab under Diagnostics. * **Diagnostics are missing:** the connected server may not expose those optional endpoints. * **Voice recognition fails:** check the permission, locale, recognizer availability, and on-device model status in **Settings → Voice & audio**. ## 7. Collect a useful bug report Include: * mobile release and platform; * OpenCode version and V1/V2 contract; * connection method (manual, local QR, Tailscale, Cloudflare, proxy, SSH, or Cloud Link); * sanitized API base shape; * health-response status and visible error; * whether the issue affects chat, realtime, terminal, files, or notifications. Never include passwords, provider keys, private hostnames, Cloud Link pairing tokens, customer data, or source code. Search the [public issue tracker](https://github.com/alvarolorentedev/opencode-mobile/issues) before opening a duplicate. Security-sensitive reports belong on the [private security contact page](https://getopencode.app/security/). # OpenCode Session Usage on Mobile > Interpret OpenCode session usage, context utilization, token activity, steps, cache activity, and provider cost estimates on mobile. Use session usage when a conversation is becoming long, a model feels expensive, or you want to understand how much context OpenCode is carrying. ## Open the usage sheet Tap the usage indicator in the Chat header. The sheet summarizes the current session and active model. Each assistant reply also shows the model that produced it, including an auto-routed model. If the app has only a partial transcript window loaded, totals may cover loaded history only; the sheet says so when that applies. The usage sheet follows the website’s current color theme. ![Session usage and token activity in OpenCode Mobile, light theme](https://getopencode.app/img/docs/session-usage-light.webp) ![Session usage and token activity in OpenCode Mobile, dark theme](https://getopencode.app/img/docs/session-usage-dark.webp) ## Read the numbers * **Context utilization** is the portion of the model’s input window currently represented by session input. * **Input** and **output tokens** measure text sent to and returned by the model. * **Reasoning tokens** are reported separately when the provider supplies them. * **Cache read/write** shows reused or newly cached context when supported. * **Steps** counts recorded assistant processing steps. * **Estimated cost** appears only when the server has usable pricing metadata. “Pricing unavailable” does not mean the request was free. It means the app cannot calculate a reliable amount. “Included or unpriced” may represent subscription-included usage or missing provider pricing. ## Use the information * Start a fresh session when unrelated history is consuming context. * Keep one session focused on one outcome. * Choose a smaller model for routine follow-ups when appropriate. * Treat cost as an estimate and use the provider’s billing dashboard as the source of truth. * Use `/compact` on OpenCode 2 when a session is becoming difficult to review, or start a fresh session. Next: [Manage sessions](https://getopencode.app/docs/guides/sessions/), [configure models](https://getopencode.app/docs/guides/providers-and-models/), or [start a focused task](https://getopencode.app/docs/guides/tasks/). # How to Use OpenCode from Your Phone > Run OpenCode on your computer and safely control its sessions, permissions, files, voice input, and terminal commands from a mobile device. The reliable architecture is simple: OpenCode runs on the machine that owns your project, while your phone acts as a remote control. Do not move the repository, model credentials, build tools, and complete development environment onto the phone unless on-device development is your explicit goal. ## Recommended architecture ```text Mobile phone → private VPN or authenticated HTTPS route → OpenCode server on your computer → project files, tools, providers, and sessions ``` This keeps execution close to the real workspace while making approvals and follow-up work available away from the desk. ## Set it up 1. [Download OpenCode Mobile](https://getopencode.app/download/). 2. Set a password and start OpenCode 2’s shared service: `opencode service set password '…'`, `opencode service start`, then `opencode service status`. 3. Choose [Tailscale](https://getopencode.app/docs/guides/tailscale/), [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/), [local QR](https://getopencode.app/docs/connections/), [Cloud Link](https://getopencode.app/docs/cloud-link/), or another [remote-access method](https://getopencode.app/docs/remote-access/). 4. Create a one-time login with `opencode pair`, or test the server’s `/global/health` endpoint for a manual connection. 5. Scan the pairing QR code, or add the full API base URL and password manually. 6. Select the project and confirm the expected session before sending work. A standalone `opencode serve` process works too, but pairing requires the shared service, so use manual connection details. You can save multiple servers and switch between them in **Settings → Connection**. Projects and sessions come from the active server, while favorites, notification records, and terminal state are scoped to the connection. ## Good mobile workflows * Check whether a long task is still progressing. * Answer a permission or product question. * Review Turn, Uncommitted, or Branch changes before accepting completion. * Send a short follow-up, steer a running turn, or dictate it with voice input. * Inspect a specific file, save a focused edit, or run a test command in the project terminal. * Share a screenshot, document, or link from another app into a chat on Android. * Switch, favorite, rename, fork, or delete sessions while keeping each thread focused. Use the desktop when a change requires broad code navigation, prolonged terminal interaction, complex conflict resolution, or detailed visual review. ## Security boundaries Your phone can become a route to source code and terminal access. Use strong server authentication, keep public exposure minimal, review permission prompts deliberately, and rotate credentials if a device is lost. Read the [remote-access security guide](https://getopencode.app/docs/guides/remote-access-security/) before treating the setup as production-ready. Continue with the [mobile app setup guide](https://getopencode.app/docs/opencode-android-app/), compare [OpenCode Mobile with OpenCode Web](https://getopencode.app/docs/guides/mobile-vs-web/), or diagnose a failure with the [connection checklist](https://getopencode.app/docs/guides/troubleshooting/). # Use Voice with OpenCode Mobile > Use voice dictation and hands-free conversation mode in OpenCode Mobile, including system speech, on-device models, wake phrases, and limits. Use voice for quick follow-ups while walking, reviewing another screen, or when typing a detailed prompt is inconvenient. Voice input and spoken replies are separate choices: you can dictate with the system recognizer and still play replies through an on-device voice, or the reverse. ## Dictate one prompt 1. Make sure the composer is empty. 2. Tap the microphone. 3. Speak one instruction. 4. Review and edit the recognized draft. 5. Send it when it says what you intended. Dictation fills the draft; it does not bypass your review or send automatically. ## Choose an input mode Open **Settings → Voice & audio**. ### System speech The default path uses the operating system’s speech recognizer. * It is available wherever the OS recognizer is available. * Conversation mode can require a wake phrase, `hey code` by default. * Recognition audio is handled by the OS or its speech provider under that vendor’s policy. * Confirmation is on by default, so a recognized command is shown before it is sent. Turning the wake phrase off makes conversation mode listen immediately. In that mode, ambient speech may reach the OS speech provider and every recognized utterance becomes a confirmation candidate. ### On-device voice The private, opt-in path runs wake-word detection, speaker verification, and speech recognition on the device. * Choose **On-device** as the input mode, then download the base wake pack and a command model. The default English pack is about 152 MB; the multilingual Whisper tiny option is about 161 MB. * Available wake phrases are **Hey code** and **Hey opencode**. The wake phrase remains English because the local keyword model is English. * Voice enrollment is optional. When verification is enabled, a detected turn must match the enrolled voice before it is transcribed. * Recognized audio is not sent to a speech vendor. Model downloads are the only network traffic. * On-device input is foreground-only. If the models, native runtime, or microphone permission are unavailable, the app falls back to the system phrase gate and says so. ## Use conversation mode With the composer empty, tap the waveform button. The app runs a hands-free loop: 1. **Armed** — listens for the wake phrase when required. 2. **Listening** — captures the command after the phrase. 3. **Confirming** — shows the command when confirmation is enabled. Say or tap **yes** to send, retry to capture again, or edit the text. 4. **Submitting** — sends the command. 5. **Waiting** — follows the running turn. 6. **Speaking** — reads the assistant reply, then returns to listening. The overlay shows the active session, current phase, and recognized speech. The animated voice ribbon indicates the active audio state. Tap **End conversation** to stop. Conversation mode: * can re-arm immediately after a submission, so the next command can steer or queue work while the assistant is still speaking; * can read completed interim progress updates before the final reply; * pauses for permissions or questions that need on-screen input; * stops when connectivity is lost; * keeps the screen awake while active. ## Choose spoken replies Playback is independent of the input mode. * **System voice** is always available and is the default. The app prefers an Enhanced voice in the selected locale when you have not chosen one. * **On-device playback** requires an explicitly installed Piper or Kokoro pack. Piper is available for English, Spanish, Hindi, German, French, Simplified Chinese, and Brazilian Portuguese. Kokoro is the natural English option and exposes multiple speakers. Japanese stays on the system voice. * Removing the active pack switches playback back to the system voice. * If the pack language does not match an explicit speech locale, the app warns and uses the system voice instead of reading in the wrong language. * Long replies are split at paragraph and sentence boundaries. Markdown headings, links, inline code, file paths, and tables are converted to speakable prose or short cues. Set **Speech rate** and the working sound in the same section. ## Check permissions and capabilities Use the voice check in Settings to review: * microphone and speech permission; * speech recognition availability; * on-device support and model status; * the selected playback engine and voice; * a playback test. If permission was denied, open the device settings from the check. On Android, a recognizer that ends immediately retries the available compatibility modes before showing a retry error. On iOS, an on-device attempt that cannot run retries through network recognition before reporting a failure. ## Know the boundaries * Conversation mode is foreground-only; continuous background microphone capture is not supported. * The wake phrase is a submission gate, not an always-on background listener. In system mode the recognizer still runs while armed. * Overlapping speech is not separated. A noisy room can still contaminate a turn; keep the confirmation and tap fallback. * On-device speaker verification reduces accidental turns but does not identify every speaker perfectly. * TTS failures show feedback and leave input ready instead of silently ending the loop. * Always review high-impact instructions on screen before allowing changes. * Background completion notifications are independent of voice and may be delayed on iOS. Next: [Configure providers and models](https://getopencode.app/docs/guides/providers-and-models/), [start a task](https://getopencode.app/docs/guides/tasks/), or review [permissions and changes](https://getopencode.app/docs/guides/approvals-and-changes/). # Browse and Edit Project Files in OpenCode Mobile > Search, read, preview, download, move, and save project files from OpenCode Mobile, including conflict checks and OpenCode 1.x limits. Use **Projects → Files** to inspect the selected project, preview media, move files around, or make a small, deliberate text correction without opening a desktop editor. ## Find and read a file 1. Select the correct project in **Projects**. 2. Open the project’s Files surface. 3. Search by path or filename, or browse folders. 4. Tap a result to load its current server content. The header shows the selected project, worktree when applicable, and the current VCS branch when the server supplies it. Changed files are marked as added, modified, or deleted; deleted file content may be unavailable. Android Back walks up one folder at a time. At the project root it performs normal navigation. An active search is dismissed before folder navigation. The file view follows the website’s current color theme. ![Open project file in OpenCode Mobile, light theme](https://getopencode.app/img/docs/workspace-files-light.webp) ![Open project file in OpenCode Mobile, dark theme](https://getopencode.app/img/docs/workspace-files-dark.webp) ## Preview media and download files On OpenCode 2: * Raster images, audio, and video open inline. * Images open in a full-screen viewer with pinch zoom, panning, double-tap zoom, and a save/share action. * Any readable file can be downloaded. Native builds use the OS save/share sheet; web uses a browser download. * Inline media is bounded at 25 MB; larger files fall back to a streaming download. * PDFs, archives, installers, and other binaries show a download card. OpenCode 1.x does not return binary file bytes, so binary files show an unavailable message while text preview, editing, and download continue to work. ## Move, copy, rename, or delete On OpenCode 2, file and folder rows expose actions from a swipe-left or long-press menu: * **Copy path** writes the absolute server path to the device clipboard. * **Rename** opens a focused Save/Cancel sheet. A single non-empty basename is required, and an existing name is never overwritten. * **Copy** and **Cut** stage one entry per connection. A strip below the breadcrumbs shows the staged source with **Paste** and **Clear**. * **Paste** targets the browsed folder. It can cross projects or worktrees on the same connection. * Replacing a file requires confirmation. Folder collisions and type mismatches are rejected. * Cut removes the source only after a verified paste. Copy stays reusable. These mutations require OpenCode 2 and the server shell utilities the app uses for file operations. If an operation fails, the input and clipboard state are preserved. If the result is uncertain, inspect both paths before retrying. ## Make a focused text edit 1. Open a supported text file. 2. Tap **Edit**. 3. Change only the necessary content. 4. Tap **Save patch**. 5. Review the resulting VCS change before continuing. Before saving, the app re-reads the server file and compares it with the content you opened. If the file changed in the meantime, the save is rejected instead of overwriting newer content. Reopen the file, incorporate the current version, and try again. OpenCode 2 uses the native `file.write` API for saving. The same read-before-write check applies, but V2 has no conditional-write API, so a concurrent edit that lands between the final read and the write cannot be fully prevented. Treat the check as a safety net, not a lock. OpenCode 1.x uses its compatible save path. Only non-base64 text files are editable. Binary content is read-only. ## Choose the right tool Mobile file editing works well for a typo, configuration value, or small documentation adjustment. For multi-file refactors, use Chat to describe the goal and review the diff, or return to a desktop editor. If editing or file actions are unavailable, the connected server did not report the required capability, or the connection is OpenCode 1.x. Next: [Review approvals and changes](https://getopencode.app/docs/guides/approvals-and-changes/), [use worktrees](https://getopencode.app/docs/guides/worktrees/), or run a focused [terminal command](https://getopencode.app/docs/guides/terminal/). # Manage OpenCode Worktrees from Mobile > Create, select, and remove isolated OpenCode worktrees from the mobile app, with current availability and experimental-endpoint limits. Use a worktree when you want an isolated project directory for a parallel change without disturbing the main working directory. ## Create one 1. Open **New chat**. 2. Choose the project that should own the worktree. 3. Select **New worktree** and enter an optional name. 4. Confirm. The server decides the resulting directory and branch details. The app selects the new location and opens a chat there. Confirm the project and branch before starting work. You can also select an existing worktree from the worktree switcher beside the project name in **Projects**, **Chat**, or **New chat**. ## Remove one 1. Open the worktree switcher. 2. Enter its management mode. 3. Choose **Remove** for the worktree. 4. Confirm the destructive action. Removal deletes the worktree managed by OpenCode. Check the displayed directory and branch and make sure any valuable work is committed or backed up first. ## What is not available * **Reset** to a server-defined starting state is not part of the current app. * An optional **start command** when creating a worktree is not available. * Worktree creation is a chat flow, not a separate Projects tab. Worktree management relies on experimental OpenCode endpoints. Availability and behavior may change more frequently than core session functionality. If the worktree controls are missing, the connected server may not expose them. ## Important limitation A worktree is still a server directory. It uses the same connection, providers, and permissions as the project that owns it. It is not a sandbox for untrusted code. Next: [Start a task](https://getopencode.app/docs/guides/tasks/) in the intended project, [work with files](https://getopencode.app/docs/guides/workspace-files/), or review [permissions and changes](https://getopencode.app/docs/guides/approvals-and-changes/). # OpenCode Mobile App — Setup and Download > Download OpenCode Mobile for Android or iOS, install the APK or TestFlight beta, and connect it to your own OpenCode server. OpenCode Mobile is an independent Android and iOS client for an OpenCode server that you run. It lets you start and monitor coding tasks, review permissions and changes, manage projects and sessions, inspect files, and use a project terminal from a phone. It is not an official OpenCode product, a hosted AI service, or a replacement for the OpenCode server. ## Download the app Use the [OpenCode Mobile download page](https://getopencode.app/download/) to choose an installation path: * **Google Play (recommended):** install and receive updates through Google Play. * **Direct APK:** download the latest release from the project’s public [GitHub Releases](https://github.com/alvarolorentedev/opencode-mobile/releases) when Play is unavailable or you prefer manual installation. * **iOS TestFlight beta:** join the [OpenCode Mobile TestFlight release](https://testflight.apple.com/join/ddcE5Wzz) on an iPhone or iPad. Do not install APK files reposted by unrelated download sites. The current release history and source code are public. ## What the app requires You need: 1. An Android device (64-bit ARM) or iPhone/iPad. 2. A current OpenCode installation on a computer or server that owns the project. 3. OpenCode running in server mode. 4. A network route from the phone to that server. 5. A one-time pairing link/QR from OpenCode 2, or a server URL and password for manual setup. The complete setup is in [Set Up OpenCode Mobile](https://getopencode.app/docs/getting-started/). The in-app connection choices are explained in [Add or switch connections](https://getopencode.app/docs/connections/). ## Install the app ### Android 1. Open the [download page](https://getopencode.app/download/) and choose Google Play or the direct APK. 2. Confirm the device is 64-bit ARM (arm64-v8a). Release artifacts do not support 32-bit-only Android devices. 3. If Android asks, allow installation from your browser or file manager for the APK path. 4. Open OpenCode Mobile and continue with onboarding. ### iOS 1. Install TestFlight from the App Store if needed. 2. Join the [OpenCode Mobile TestFlight release](https://testflight.apple.com/join/ddcE5Wzz). 3. Install the beta and continue with onboarding. The iOS build is a beta. Features that depend on native iOS integrations may lag behind Android; see [Releases and compatibility](https://getopencode.app/docs/changelog/). ## Start an OpenCode server OpenCode 2 is the current primary target. Install it with the v2 installer: ```bash curl -fsSL https://opencode.ai/v2/install | bash ``` Start the shared background service, set a password, and create a pairing link: ```bash opencode service set password 'use-a-strong-password' opencode service set port 4096 opencode service start opencode service status opencode pair ``` Scan the printed QR code in the app, or paste the pairing link. Pairing links expire after five minutes and work once. For access through [Tailscale](https://getopencode.app/docs/guides/tailscale/), [Cloudflare Tunnel](https://getopencode.app/docs/guides/cloudflare-tunnel/), or a [reverse proxy](https://getopencode.app/docs/guides/reverse-proxy/), keep the service on loopback and pass the public URL to the pairing command: ```bash opencode pair --url https://your-opencode-host.example ``` If you need a foreground server instead, use `opencode serve`: ```bash OPENCODE_SERVER_PASSWORD='use-a-strong-password' \ opencode serve --hostname 127.0.0.1 --port 4096 ``` Pairing requires the shared service; connect to a standalone `opencode serve` process manually with its URL and password. OpenCode 1.x uses `opencode serve` or `opencode web` and also connects manually. Never publish an unauthenticated OpenCode port to the internet. ## Connect the app On first launch, onboarding walks through **Welcome**, **Permissions**, **Connect**, **AI & providers**, **Project**, **General**, **Voice & responses**, **Privacy**, and **Ready**. The AI and Project steps appear after a connection exists, and every step can be skipped. In **Connect**, choose: * **Scan QR code** for a local OpenCode 2 pairing code created by `opencode pair` * **Manual** for a server URL, username, and password, with optional custom headers, a custom certificate, or OIDC * **Cloud Link** for a managed remote machine, when available in a store-installed build After onboarding, use **Settings → Connection** to add or switch saved servers. See [Add or switch connections](https://getopencode.app/docs/connections/). ## App versus browser access Use OpenCode Mobile when you want native navigation, voice input, notifications, sharing from other apps, home-screen widgets, and saved server profiles. Use the OpenCode web UI when you want the browser interface: in OpenCode 2, open a link printed by `opencode pair`; in OpenCode 1.x, run `opencode web`. The complete tradeoff is documented in [OpenCode Mobile vs OpenCode Web](https://getopencode.app/docs/guides/mobile-vs-web/). ## Verify the connection Before opening the app, test the same API base URL from a device on the intended network: ```bash curl -u your-user:use-a-strong-password \ https://your-opencode-host.example/global/health ``` If the root URL serves HTML, the API may live below a prefix such as `/api`. Enter the complete API base in the app and verify `/global/health` instead of guessing. Use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/) for authentication, HTML responses, local QR pairing, Cloud Link, proxy, realtime, and project problems. ## Update or remove the app * **Google Play:** updates are delivered by the store. Supported builds can also start a flexible background download and wait for an explicit **Restart** tap. Configure checks in **Settings → About & support → Update checks**. * **Direct APK:** install a newer APK from GitHub Releases over the existing app. * **iOS TestFlight:** install the latest TestFlight build when it appears. * Removing the app removes local settings and saved credentials. It does not delete data from your OpenCode server or cancel a Cloud Link subscription. # OpenCode Mobile Releases and Compatibility > Check the current OpenCode Mobile release, recent highlights, OpenCode 1.x and 2.x compatibility, and current app and platform support. The latest public release at the time of this review is **v1.0.139**, published **November 6, 2026**. Use [GitHub Releases](https://github.com/alvarolorentedev/opencode-mobile/releases) as the authoritative source for the current version and complete release notes. OpenCode 2 is the current primary target. It uses the shared background service and one-time `opencode pair` links for the quickest app setup. OpenCode 1.x (V1) remains supported with manual connections for the core chat, project, file, and terminal surface. Feature availability also depends on the capabilities the connected server exposes. ## Recent releases | Release | Focus | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | [v1.0.139](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.139) | Chat library grouped by server and project path, V2 `/compact` and `/btw`, direct update install | | [v1.0.137](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.137) | Onboarding privacy step, project search, per-agent model memory, Play update priority | | [v1.0.135](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.135) | Mention and command highlighting, device-local project archive | | [v1.0.133](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.133) | Server-derived project and session ordering, explicit update restart | | [v1.0.131](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.131) | Server-archived projects, folder-browser project setup | | [v1.0.129](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.129) | Arabic and Hebrew RTL, extension button on every chat | | [v1.0.128](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.128) | Sandboxed plugin GUI panels | | [v1.0.126](https://github.com/alvarolorentedev/opencode-mobile/releases/tag/v1.0.126) | OpenID Connect PKCE connections | ## Highlights since v1.0.81 * **Settings and appearance:** searchable grouped settings, light/dark/system modes, six accent themes, and a slim interface. * **Voice:** System and On-device input modes, wake phrase, spoken confirmation, local speech models, speaker verification, and Piper/Kokoro playback. * **Models:** automatic model routing, variants, per-agent model memory, and the model used for each reply. * **Chat:** provider command suggestions, `@` mentions, `!` shell mode, `/compact`, `/btw`, live highlighting, and a two-level activity timeline. * **Extensions:** MCP, plugin, agent, skill, and command management with project/global scope, plus sandboxed plugin GUI panels. * **Projects:** server-derived catalogs, device-local archive markers, server-archived projects, folder-browser setup, and file copy/move/rename/delete. * **Connections:** custom HTTP headers, per-connection CA certificates, and OIDC PKCE. * **Diagnostics:** local-first logs, spans, metrics, sanitized export, and optional OTLP telemetry. * **Updates:** Play-priority flexible downloads that wait for an explicit Restart. * **Languages:** Russian, Arabic, and Hebrew added; Arabic and Hebrew mirror the interface right-to-left. ## Current technical baseline | Component | Current declaration | | ------------------------- | ------------------------------------------------------ | | Public app release | `v1.0.139` | | OpenCode client contracts | OpenCode 1.x (V1) and 2.x (V2), detected at connection | | `@opencode-ai/sdk` | `^1.18.3` | | `@opencode/client` | `2.2.5` | | Expo | `58.0.22` | | React Native | `0.88.1` | | React | `19.3.0` | | License | Apache-2.0 | These values describe the current source and recent release. Inspect the [application package](https://github.com/alvarolorentedev/opencode-mobile/blob/main/package.json), [app configuration](https://github.com/alvarolorentedev/opencode-mobile/blob/main/app.config.ts), and [GitHub Releases](https://github.com/alvarolorentedev/opencode-mobile/releases) for exact shipped versions. ## Compatibility and feature availability | Capability | V1 | V2 | Notes | | ------------------------------------------ | ----------- | ----------- | ---------------------------------------------------------------- | | Chats, tasks, projects, terminal | Yes | Yes | Core server endpoints still required | | Diffs and todos | Yes | Yes | V2 todos are derived from transcript tool parts | | File search, read, text save | Yes | Yes | Conflict check is best effort | | Media preview and download | No | Yes | V1 does not return binary file bytes | | File copy, move, rename, delete | No | Yes | Requires V2 shell utilities | | Session delete, rename, fork, revert | Yes | Yes | Where the server supports them | | Session archive, restore, share | No | No | Removed from the current app | | Composer auto-approve and saved rules | No | Yes | **Settings → Approvals** on V2 | | Composer `/`, `@`, `!`, `/compact`, `/btw` | No | Yes | V2-only API surface | | Auto model routing (on-device) | Yes | Yes | No server API dependency | | Auto model routing (server classifier) | No | Yes | Experimental endpoint | | Extensions management and plugin GUI | No | Yes | V2-only | | Worktrees | Yes | Yes | Create, select, remove; reset/start command unavailable | | MCP lifecycle | Yes | Yes | V1 runtime controls; V2 definitions in Extensions | | LSP and formatter diagnostics | No | No | Not part of the supported surface | | Local QR pairing | No | Yes | Same-network only; requires the shared service and native camera | | Cloud Link | Independent | Independent | Store installs only; subscription required | | Android inbound sharing | Yes | Yes | Android only | | Android home widgets | Yes | Yes | Android only | | Quick actions | Yes | Yes | iOS and Android | | Completion notifications | Yes | Yes | Android has richer background monitoring | | Themes, languages, RTL | Yes | Yes | 11 interface languages; Arabic/Hebrew RTL | | iOS inbound sharing/widgets | No | No | Deferred | “Yes” still depends on the connected server exposing the relevant endpoint. The app hides unsupported actions rather than inventing them. ## Update the app * **Google Play:** updates are delivered by the store. On supported Play-installed builds, the app can start a flexible background download and then waits for an explicit **Restart** tap. Play release priority decides whether a flexible or immediate flow is requested first. * **Direct APK:** install a newer APK from GitHub Releases over the existing app. * **iOS TestFlight:** install the latest TestFlight build when it appears. iOS in-app update checks require a verified App Store listing and may be disabled in beta builds. * **Settings → About & support → Update checks** controls the app’s update prompt and check period, not the store’s automatic-update setting. ## Support boundaries * **Android:** distributed through Google Play and direct APK releases. Release artifacts are **arm64-v8a only**; 32-bit-only Android devices are unsupported. * **iOS:** distributed through [TestFlight](https://testflight.apple.com/join/ddcE5Wzz). * Cloud Link is available only for App Store and Google Play installs. * OpenCode 1.x is maintained for the feature intersection with OpenCode 2. Removed V1-only surfaces are not coming back through the mobile app. * Experimental worktrees, PTYs, extensions, MCP management, and diagnostics depend on server capabilities. * The mobile terminal is an xterm-based project terminal, not a desktop terminal replacement. * iOS inbound sharing and iOS home-screen widgets are not available yet. * OpenCode Mobile is independent and community-built, not an official OpenCode product. Start with [Download and install](https://getopencode.app/docs/opencode-android-app/), then use the [troubleshooting checklist](https://getopencode.app/docs/guides/troubleshooting/) if a current release cannot reach a current server. # FAQ > Answers about OpenCode Mobile platforms, connections, Cloud Link, file editing, extensions, voice, updates, languages, privacy, and support. ## Is OpenCode Mobile an official OpenCode product? No. It is an open-source, community-built companion for OpenCode and is not affiliated with the OpenCode team. ## Which devices are supported? Android is available through [Google Play](https://play.google.com/store/apps/details?id=app.getopencode) and as a [direct APK](https://getopencode.app/download/). Android release artifacts are arm64-v8a only; 32-bit-only Android devices are unsupported. The iOS beta is available through [TestFlight](https://testflight.apple.com/join/ddcE5Wzz). ## Is it a general AI chatbot or mobile IDE? No. It is a focused mobile control surface for an OpenCode server. It includes project files and a terminal, but it is not a replacement for a full desktop IDE or terminal workspace. ## Which OpenCode version should I use? Use OpenCode 2, the current primary target. It supports the quickest setup through the shared service and `opencode pair`, plus extensions, plugin panels, media preview, file mutations, composer mentions and shell mode, and auto-approve. The client also detects OpenCode 1.x (V1) servers with manual connections for core chats, projects, files, and terminal work. Removed V1-only surfaces such as archive/share and worktree reset are not supported. See [Releases and compatibility](https://getopencode.app/docs/changelog/). ## How do I start OpenCode 2 for OpenCode Mobile? OpenCode 2 normally uses the shared background service: ```bash opencode service set password 'use-a-strong-password' opencode service set port 4096 opencode service start opencode service status opencode pair ``` Scan the QR code or paste the pairing link into the app. The link expires after five minutes and works once. For a remote URL, use `opencode pair --url https://your-host.example`. If you run a standalone `opencode serve` process instead, connect manually with the URL and password; pairing requires the shared service. ## Should I run `opencode web` or `opencode serve`? On OpenCode 2, you normally do not need `opencode web`: the web UI is served by the same server, and `opencode pair` prints a link you can open in a browser. Use `opencode serve` when you want a foreground standalone server, such as on an always-on host or under a process supervisor. On OpenCode 1.x, use `opencode serve` for the API or `opencode web` when you also want the browser UI. Connect either V1 server manually. ## Which connection methods work? Supported routes include: * trusted local LAN; * local QR pairing with `opencode pair` on OpenCode 2; * Tailscale Serve; * Cloudflare Tunnel; * HTTPS reverse proxies, including path-prefixed APIs; * a loopback port created by a separate SSH forwarding client; * a manual connection with custom headers, a custom CA, or OIDC; * optional Cloud Link. See [Remote access](https://getopencode.app/docs/remote-access/) and [Add or switch connections](https://getopencode.app/docs/connections/). ## What is the difference between local QR and Cloud Link? **Local QR** is a free same-network setup shortcut for OpenCode 2. Start the shared service with `opencode service start`, run `opencode pair`, scan the one-time code, and the app saves the connection. The server must be reachable from the phone, not only from `localhost`. Links expire after five minutes. Local QR profiles cannot carry custom headers or a custom CA. **Cloud Link** is an optional paid remote-access service for App Store and Google Play installs. It uses a desktop connector and a subscription to provide a managed route over the internet. It is not available in direct APK or web builds. See the [OpenCode Cloud Link website](https://opencodecloud.link/) for connector downloads, platform support, and pricing. ## Can I save more than one server? Yes. Use **Settings → Connection** to add, switch, edit, or delete saved servers. Projects and sessions come from the active server; favorites, notification records, and terminal state are scoped to the connection. ## Was the Tailscale connection problem fixed? Yes. The path-prefix and connection handling fixes were validated with Tailscale and Cloudflare before the public issue was closed. Update to a current release before troubleshooting an old build. ## Should I bind OpenCode to `0.0.0.0`? Only for direct access on a trusted LAN. Use authentication, restrict the port to the private firewall profile, and never expose it through router port forwarding. For remote access, prefer loopback plus Tailscale, Cloudflare Tunnel, a reverse proxy, SSH forwarding, or Cloud Link. ## Do I need authentication with Tailscale or Cloudflare Tunnel? Keep OpenCode authentication enabled. A tailnet or HTTPS tunnel controls transport and reachability, but OpenCode Mobile still expects the server credentials when the server is protected. If your gateway adds its own auth, configure the connection’s custom headers. ## Can the server URL contain `/api` or another path? Yes. The client preserves a configured path prefix for API requests, realtime events, and terminal WebSockets. Use the prefix only when the proxy or web deployment actually mounts the OpenCode API there. Verify `/global/health` before connecting. ## Where are connection credentials stored? On native iOS and Android builds, non-secret connection details use app storage. Server passwords, custom header values, CA material, and OIDC tokens use Keychain/Keystore-backed secure storage. Pending notification records contain the server URL and username but not the password. Browser builds cannot persist credentials through native secure storage. ## Can I use custom headers, a private CA, or OIDC? Yes, on manual native connections. Custom headers support gateways such as Cloudflare Access, Authelia, and oauth2-proxy. A custom CA is trusted only for that server’s `host:port`. OIDC uses the system browser with PKCE and renews tokens silently. Local QR and Cloud Link profiles do not carry these settings. ## What happens if realtime events disconnect? The app reconnects the global SSE stream with backoff and uses polling while the stream is unavailable or work is active. Core session visibility should continue without a manual reconnect. **Settings → Diagnostics** shows the current realtime state and network statistics. ## Is the Terminal tab a full terminal emulator? It is an xterm-based terminal backed by an OpenCode PTY. It supports ANSI/VT cursor behavior, alternate-screen programs, 10,000 lines of scrollback, resize, reconnect, and a mobile keyboard accessory. It is still a mobile terminal, not a desktop terminal replacement. ## Can I edit files from the app? Yes. File search, read, text save, and download are available on both OpenCode 1.x and 2.x when the server exposes the required endpoints. OpenCode 2 also previews images, audio, and video, opens images in a zoomable viewer, and can copy, move, rename, and delete files when the server provides the required shell utilities. V2 uses `file.write`; the app re-reads the file before saving and rejects an obvious conflict, but V2 has no conditional-write API. V1 binary files are not previewable or downloadable. ## Can I share content into the app? On Android, yes. Use the system Share sheet to send text, links, images, and documents into a preview, choose a chat, review the draft, and press Send. Up to 10 items and 10 MB per file are accepted. Nothing is submitted automatically. iOS inbound sharing is not available yet. ## Are there widgets or quick actions? Quick actions are available on iOS and Android. Android also has three home-screen widgets: Latest replies, Awaiting actions, and Plan progress. iOS home-screen widgets and Live Activities are not available yet. See [Quick actions and widgets](https://getopencode.app/docs/guides/quick-actions-and-widgets/). ## Which languages does the app support? The app interface supports English, Spanish, Hindi, German, French, Simplified Chinese, Portuguese, Japanese, Russian, Arabic, and Hebrew, plus a system-default option. Arabic and Hebrew use right-to-left layout. The website documentation is currently English-only. ## Can I change the theme? Yes. **Settings → Appearance** offers system, light, and dark modes, six accent themes, and a slim interface. See [Settings and customization](https://getopencode.app/docs/guides/settings/). ## Does the app update itself? Google Play and TestFlight deliver updates. Supported Play builds can start a flexible background download and then wait for an explicit **Restart** tap; Play release priority decides whether a flexible or immediate flow is requested first. Configure checks in **Settings → About & support → Update checks**. Direct APK users install a newer APK from GitHub Releases. ## Can I control which model answers each prompt? Yes. Choose a model explicitly, or enable [automatic model routing](https://getopencode.app/docs/guides/auto-model-routing/) to classify each prompt as Simple, Standard, or Complex. Routing can run on-device or through an OpenCode 2 server classifier, and each reply shows the model that produced it. ## What are Extensions? On OpenCode 2, **Settings → Extensions** manages MCP servers, plugins, agents, skills, and slash commands for the current project or all projects. Installed plugins can also expose GUI panels inside the app. See [Manage extensions](https://getopencode.app/docs/guides/extensions/). ## Do all servers support worktrees, terminal, MCP, and diagnostics? No. These features depend on compatible server endpoints. Worktree operations use experimental APIs and may change more often than core session behavior. MCP lifecycle is available on both contracts, but full extension editing and plugin GUI panels require OpenCode 2. Auto-approve and saved approval rules are OpenCode 2 only. LSP and formatter diagnostics are not part of the supported surface. See [Releases and compatibility](https://getopencode.app/docs/changelog/). ## Can I use voice mode in the background? Conversation mode is a foreground listen → submit → wait → speak loop. It is not continuous background microphone capture, and it pauses for permissions or questions that require on-screen input. On-device mode processes audio locally; system mode uses the OS speech provider. Background completion notifications are separate. ## Where can I report a problem? Use the [GitHub issue tracker](https://github.com/alvarolorentedev/opencode-mobile/issues). Include the mobile release, platform, OpenCode version, connection method, API base URL shape without credentials, and the visible error. Security-sensitive reports belong on the [security page](https://getopencode.app/security/). ## Where is the screen-by-screen documentation? The [User manual](https://getopencode.app/docs/user-manual/) is the operating hub. It links to focused guides for tasks, sessions, approvals, voice, usage, projects, files, terminal, settings, extensions, notifications, sharing, and widgets.