Skip to content

[Feature]: Zero-knowledge cloud relay for mobile companion (remote access without NAT/VPN) #7208

Closed

Description

@riba2534

Problem or use case

The mobile companion today requires direct network reachability to the desktop's WebSocket server (:6768) — either being on the same LAN, or having the user set up NAT/port-forwarding/Tailscale/Cloudflare Tunnel/ngrok themselves. When I'm out (commute/travel) and want to check on a long-running agent, approve a permission, or send a follow-up from my phone, network reachability is on me to solve, and that's real friction.

The existing SSH Worktree feature solves a different (and great) problem — running agents on a remote beefy box. It doesn't solve "I'm away from my desk and want to steer the agents already running on my Mac, from my phone."

For comparison, Paseo ships a public zero-knowledge relay (Cloudflare Worker): the local daemon makes an outbound connection to the relay, mobile clients connect to the same relay, and the relay forwards opaque ciphertext between them. No inbound port, no NAT traversal, no VPN — QR pairing just works across networks.

Proposed solution

  • Add an optional cloud-relay transport for the mobile companion: the Electron main process maintains an outbound E2EE connection to a public relay; mobile connects to the same relay and the relay forwards opaque ciphertext (zero-knowledge).
  • Reuse the existing tweetnacl E2EE primitives (Curve25519 + XSalsa20-Poly1305) already used for LAN WS pairing — the relay only ever sees ciphertext + a room id derived from the daemon's public key.
  • Mobile prefers direct LAN WS when reachable, and falls back to the relay when it isn't.
  • Support both an official relay (convenient default) and a self-hosted relay URL, for users/orgs that don't want any official server in the loop.
  • Off by default, opt-in (respects Orca's local-first positioning).

Alternatives or additional context

Workaround today: users bring their own Tailscale / Cloudflare Tunnel / ngrok — works, but it's setup friction the app doesn't help with.

Why I think this is relatively cheap to build (from reading the source):

  • The RPC layer is already transport-neutral: a RpcTransport interface (src/main/runtime/rpc/transport.ts) with two equivalent implementations (Unix socket for the CLI, WS :6768 for mobile) and a pure-function dispatcher. A relay transport is essentially a third implementation — no dispatcher changes.
  • The E2EE crypto (src/shared/e2ee-crypto.ts) is transport-agnostic and can be reused as-is; only the ~100–150 lines of ws-handle glue need generalizing.
  • mobile-rpc-allowlist keys off device.scope === 'mobile', not transport type, so the permission model carries over unchanged.

Main thing worth deciding before building: who operates the relay. Given Orca's "local-first, official builds are the only ones that emit telemetry" stance, an always-on official endpoint may feel off to some users even if it's zero-knowledge. Making it (a) strictly zero-knowledge (relay sees only ciphertext + room id), (b) opt-in / off-by-default, and (c) self-hostable should address that — but it's a product call, not just a code one.

Naming heads-up: relay is already used in-tree for the SSH relay (src/relay/, ~15 files), so this would want a different name (e.g. cloud-bridge / remote-link) to avoid confusion.

Rough size from a quick scan: ~1000–1500 LoC in Orca + a small standalone relay service (Cloudflare Worker, ~300–600 LoC). Happy to write up a more detailed breakdown or a PoC PR if there's interest.

Activity

  1. nwparker commented on Jul 3, 2026

    @nwparker
    Contributor

    Yes! Will ship this next week. Sorry for the delay

  2. added theissue type on Jul 12, 2026
  3. added
    enhancement
    on Jul 16, 2026
  4. AmethystLiang commented on Aug 2, 2026

    @AmethystLiang
    Contributor

    Thanks for the feature request!

    Mobile Relay is now available. Configure it under Settings → Mobile on the desktop app — the phone can connect when you're not on the same LAN (no Tailscale/VPN required for the common case).

    Notes:

    • Mobile is a companion, not a standalone runtime. Coding agents still need a host machine running Orca (your Mac, a Mac mini, a VPS, etc.).
    • For always-on remote access, keep the host awake or use a dedicated always-on box so the desktop/server side stays reachable via relay.
    • Pair once from Settings → Mobile, then connect from the phone over cellular or any network.

    Closing as shipped via mobile relay. If off-LAN still fails after pairing (e.g. stuck on Connecting on cellular), please open a bug with desktop + mobile versions and whether Relay shows as ready on the host.

    Related: #6722 (same request, closed for the same reason).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions