You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mobile: iOS app cannot connect through pair --remote #54627
I was working with the OpenCode iOS app and it disconnected suddenly. I then tried opencode pair --remote multiple times, but every attempt failed to connect.
Environment
opencode version: 2.0.26
iOS app version: 0.1.0 (278)
OS: Linux x86_64
Terminal: Ghostty
Shell: Bash
Install/channel: Latest release
Active plugins: None configured
Reproduction
Start OpenCode on Linux.
Run:
opencode pair --remote
Open the generated pairing link or scan the QR code using the OpenCode iOS app.
Repeat with newly generated pairing links.
Expected Behavior
The iOS app should connect to the running OpenCode server through the generated remote pairing link.
Actual Behavior
The iOS app repeatedly displays:
OpenCode connection error
Phase: Pair
Couldn’t reach the OpenCode server
The terminal prints a valid-looking HTTPS pairing URL and QR code, but the app cannot reach the server.
Additional Context
The issue is reproducible with multiple newly generated pairing links.
opencode pair without --remote generates a local 127.0.0.1 URL successfully.
The local OpenCode service is running and listening normally.
The generated remote hostname resolves, but HTTPS requests to it time out or fail during TLS connection.
opencode service stop followed by retrying did not help.
Pairing URLs and remote hostnames have been omitted to avoid exposing temporary credentials.
Thanks for the detailed report! I tried this on 2.0.26 on Linux x86_64 with a fresh config at about 21:35–21:40 UTC today. I couldn't reproduce it: opencode pair --remote printed the link and QR code, the tunnel hostname completed the TLS handshake with a valid certificate, and both the one-time connect link and /global/health answered right away. A second try after opencode service stop also worked. I couldn't test the iOS app itself, but the HTTPS requests to the tunnel hostname that time out for you worked from here.
Some related cases:
cli: pair --remote fails with opentunnel.xyz service errors (525, storage unavailable, ACME no nonce) #54596: on the same day, the opentunnel.xyz service had a regional outage (Cloudflare 525 errors from some regions). After it recovered, opencode service restart was needed to stop a stuck retry loop. DNS blocklists such as Pi-hole that block *.opentunnel.xyz also caused the same "Couldn't reach the OpenCode server" error there.
Does it still happen now? If it does, try opencode service restart and then opencode pair --remote.
From the Linux machine and from the phone's network, what does curl -v https://<your-tunnel-host>/global/health print? Please mask the hostname. It helps to know whether it fails at DNS, connect or TLS, and the exact error.
Are you on a VPN, a proxy, a DNS filter such as Pi-hole or NextDNS, or a restricted network on either device? Roughly which region are you in?
Please share any errors from opencode pair --remote --print-logs, with links and codes removed.
Thanks for letting us know, glad it's working again! Since the tunnel also worked when I tested it, this was most likely a temporary problem with the opentunnel.xyz service (like the one in #54596) rather than a bug in OpenCode. If it happens again, opencode service restart followed by opencode pair --remote is worth trying first. If that doesn't help, please open a new issue with the output of curl -v https://<your-tunnel-host>/global/health (hostname masked). The bot will close this issue in about a day.
Closing this, since you confirmed that opencode pair --remote works again and I couldn't reproduce the problem on 2.0.26. It was most likely a temporary problem with the opentunnel.xyz service (see #54596). If the iOS app can't reach the server again, try opencode service restart and then opencode pair --remote. If that doesn't help, please open a new issue with your OpenCode version and the output of curl -v https://<your-tunnel-host>/global/health (hostname masked). Thanks for the report!
Activity
opencode-agent commentedon Oct 11, 2026
Thanks for the detailed report! I tried this on 2.0.26 on Linux x86_64 with a fresh config at about 21:35–21:40 UTC today. I couldn't reproduce it:
opencode pair --remoteprinted the link and QR code, the tunnel hostname completed the TLS handshake with a valid certificate, and both the one-time connect link and/global/healthanswered right away. A second try afteropencode service stopalso worked. I couldn't test the iOS app itself, but the HTTPS requests to the tunnel hostname that time out for you worked from here.Some related cases:
opencode service restartwas needed to stop a stuck retry loop. DNS blocklists such as Pi-hole that block*.opentunnel.xyzalso caused the same "Couldn't reach the OpenCode server" error there.Could you check:
opencode service restartand thenopencode pair --remote.curl -v https://<your-tunnel-host>/global/healthprint? Please mask the hostname. It helps to know whether it fails at DNS, connect or TLS, and the exact error.opencode pair --remote --print-logs, with links and codes removed.heymaaz commentedon Oct 13, 2026
It's fixed now :)
opencode-agent commentedon Oct 13, 2026
Thanks for letting us know, glad it's working again! Since the tunnel also worked when I tested it, this was most likely a temporary problem with the opentunnel.xyz service (like the one in #54596) rather than a bug in OpenCode. If it happens again,
opencode service restartfollowed byopencode pair --remoteis worth trying first. If that doesn't help, please open a new issue with the output ofcurl -v https://<your-tunnel-host>/global/health(hostname masked). The bot will close this issue in about a day.opencode-agent commentedon Oct 14, 2026
Closing this, since you confirmed that
opencode pair --remoteworks again and I couldn't reproduce the problem on 2.0.26. It was most likely a temporary problem with the opentunnel.xyz service (see #54596). If the iOS app can't reach the server again, tryopencode service restartand thenopencode pair --remote. If that doesn't help, please open a new issue with your OpenCode version and the output ofcurl -v https://<your-tunnel-host>/global/health(hostname masked). Thanks for the report!