A few minutes at your computer
Take your sessions
with you.
Connect an installable PWA to a local OpenCode session. Pairing is local, encrypted, and does not require an account.
Install and pair →Before you begin
What you'll need
- OpenCode v2 installed on the computer running the session.
- Node.js 22 or newer for the one-off
npxcommand. - A browser on the device to pair. HTTPS is required outside localhost.
Hosted service
Pair a device
- Install the OpenCode plugin.
opencode plugin add opencode-remotty - Create a device invite.
npx --yes --package opencode-remotty@latest remotty pairThe output contains a sensitive ten-minute token, a pairing URL, and a QR code. Do not share, paste into tickets, or publish any of it.
- Open the printed pairing URL, scan its QR code, or paste the token on the pairing page.
- Quit the running OpenCode process, then restart it so the installed plugin starts with the paired relay configuration.
opencode --continue - Verify the connection by keeping the local OpenCode TUI running, then opening the PWA and checking that the session appears.
Custom broker or PWA
Set both endpoints explicitly
Use the CLI's supported --broker and --app options when the broker or browser app is not hosted by remotty.
npx --yes --package opencode-remotty@latest remotty pair --broker wss://broker.example/ws --app https://app.example
Use ws:// and http:// only for loopback local development.
Keep this handy
Commands
npx --yes --package opencode-remotty@latest remotty pair
npx --yes --package opencode-remotty@latest remotty invite
npx --yes --package opencode-remotty@latest remotty devices
npx --yes --package opencode-remotty@latest remotty revoke <device-id>
npx --yes --package opencode-remotty@latest remotty remove <device-id>
npx --yes --package opencode-remotty@latest remotty remove --revoked
npx --yes --package opencode-remotty@latest remotty status
For an upgrade, run opencode plugin add opencode-remotty, quit OpenCode, then run opencode --continue.
When you need a hand
Configuration and troubleshooting
The CLI stores relay authority keys, device records, invitation hashes, and revocation state in ~/.config/remotty/config.json, or $XDG_CONFIG_HOME/remotty/config.json when XDG_CONFIG_HOME is set. It creates the file with mode 0600.
- Invite expired: run
npx --yes --package opencode-remotty@latest remotty inviteand pair again. - Wrong hosted endpoint: create a new invite with the correct
--brokerand--appvalues. - Plugin does not appear: rerun the OpenCode plugin install command, quit OpenCode, then run
opencode --continue. - Device access should end: use
npx --yes --package opencode-remotty@latest remotty devicesto find its ID, thennpx --yes --package opencode-remotty@latest remotty revoke <device-id>.