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
[Feature]: Make relay endpoint configurable / support self-hosted relay #10577
I'm using Orca Relay from the Middle East and hitting noticeable performance
issues — everything routes through relay.onorca.dev, so the round trip is long
enough to make the mobile terminal feel laggy.
Proposed solution
It would be great to be able to configure the relay endpoint, ideally with the
option to run my own self-hosted relay closer to me. A region-aware cell
assignment would also solve it if self-hosting is too much scope.
Strong +1 from mainland China — this is currently the biggest blocker for using Orca Mobile remotely.
What I see: with Orca Relay, the round trip to relay.onorca.dev is long and unstable from mainland China. The mobile terminal feels laggy, and the connection is not always stable (slow responses, occasional drops/reconnects). Direct LAN / Tailscale pairing is smooth, but on a mobile network I cannot always keep both devices on the same tailnet, so Relay is the only official "works from anywhere" path — and it is the slow one.
Requests, in priority order:
Self-hosted relay (as mentioned earlier in this thread). If the phone↔desktop channel is end-to-end encrypted, a relay only forwards ciphertext, so running one on a nearby VPS (Hong Kong / Singapore / mainland China) would fix latency without weakening the security model.
If self-hosting is still far out, a configurable relay endpoint and/or regional relay cells (Asia / China) would already help a lot.
A direct-address fallback when Relay degrades, instead of staying on Relay after pairing.
Is there any update on the self-hostable relay mentioned above? Happy to test a self-hosted relay or a regional endpoint from mainland China, and happy to provide latency / traceroute data if that helps.
Update after reading the public source: the self-hosted relay MVP may be smaller than it looks — most of the plumbing is already public.
I went through cloud/ and the desktop/mobile relay code. What already exists today:
cloud/apps/relay is public MIT source with a Dockerfile, and ORCA_RELAY_ROLE=combined|director|cell (default combined) lets one process act as director + cell. Per cloud/README.md, ORCA_RELAY_ASSIGNMENT_SIGNING_KEY is the only required secret; DATABASE_URL is optional (Postgres in production, SQLite for local dev).
The desktop already accepts a non-production director: ORCA_RELAY_URL overrides https://relay.onorca.dev in profile-cloud-auth-config.ts (packaged builds require HTTPS; loopback HTTP only in dev).
The pairing offer (mobile-relay-pairing-offer.ts) already carries relay.directorUrl / relay.cellUrl and only requires a canonical HTTPS origin — there is no *.onorca.dev allowlist — and the phone dials the offer's directorUrl (mobile-relay-invite-director.ts).
The region contract already has us-central1 and asia-east2 (relay-regions.ts).
So the missing piece is not the protocol, but an officially supported deployment path. Concrete gaps:
Deployable artifact + docs. Publish a multi-arch relay image (or an orca relay subcommand) with a documented docker run for ORCA_RELAY_ROLE=combined: required env (ORCA_RELAY_PUBLIC_URL, ORCA_RELAY_CELL_URL, ORCA_RELAY_AUTH_ISSUER, ORCA_RELAY_JWKS_URL, ...), TLS / reverse-proxy setup, health endpoint, and upgrade/rollback steps. Also make the GCP-only required vars (ORCA_RELAY_ADMIN_AUDIENCE, ORCA_RELAY_DEPLOY_SERVICE_ACCOUNT) optional in combined / self-hosted mode — today they must be set even for a single-box deployment.
Auth guidance. Can a self-hosted relay validate relay tokens issued by login.onorca.dev by pointing ORCA_RELAY_AUTH_ISSUER / ORCA_RELAY_JWKS_URL at the official service, so operators do not have to run an IdP? Please document this, including whether an Orca account or entitlement is required.
Desktop UI. Surface ORCA_RELAY_URL in Settings (Remote/Mobile) with origin validation and connection health, instead of requiring an environment variable. Show "self-hosted relay" and the assigned cell/region in the connection status.
Failure handling. Let the pairing offer carry an ordered endpoint list (LAN → Tailscale → relay) and have the client probe / fail over. That addresses instability, not only latency, and is useful even on the official relay.
Region / China.asia-east2 exists, but users in mainland China still report high latency and drops to relay.onorca.dev. Please add a region selector/status and more Asia cells (Singapore/Tokyo), and document self-hosted relay as the supported answer for mainland China — a nearby VPS is the only realistic fix there.
Suggested MVP: Phase 1 (combined relay container + ORCA_RELAY_URL + Settings field + docs) would already unblock users in high-latency regions. Phase 2: endpoint failover + region selection. Phase 3: operator-owned auth issuer and multi-cell.
I am happy to build and test Phase 1 from mainland China, and report before/after latency and traceroute. If a PR is welcome, tell me the preferred shape (self-hosted relay docs vs. an orca relay command) and I can draft it.
I've opened #46239 for this. It lets you run your own relay and point the desktop at it:
Settings → Mobile → Custom relay server on the desktop, with a connection test and a clean switch (signs out and drops relay pairings from the old server; LAN pairings stay).
cloud/apps/relay-auth, a small sign-in service that issues the tokens the relay already verifies. By default one admin signs in with a secret; optionally it hands login to your own OIDC provider (tested with Zitadel).
cloud/self-hosted, a Docker Compose example that runs the relay and the sign-in service behind Caddy with automatic HTTPS on one domain.
How sign-in works: only the desktop signs in, against your server instead of login.onorca.dev. The phone doesn't sign in at all, same as with the hosted relay today: it pairs by scanning the desktop's QR code, which carries the relay address and a one-time invite, and its traffic to the desktop stays end-to-end encrypted.
No phone app update needed: because the QR code tells the phone which relay to use, the current App Store and Play Store builds work with a self-hosted relay as they are.
This covers Phase 1 and the operator-owned sign-in from Phase 3 of the plan in the comment above. Endpoint failover, region selection and multi-cell setups aren't included. I've run it on a small VPS with a macOS desktop and an Android phone, and the end-to-end test also passes on Windows. Happy to reshape or split it if maintainers prefer a different approach.
Activity
AmethystLiang commentedon Jul 25, 2026
self-hostable relay is coming in 1-2 days!
omarshibli commentedon Jul 25, 2026
Amazing!
omarshibli commentedon Jul 30, 2026
Hey, would appreciate if you can provide any update. 🙏
iiiusky commentedon Sep 13, 2026
Is there any new progress?
wangbaoyi commentedon Nov 15, 2026
Strong +1 from mainland China — this is currently the biggest blocker for using Orca Mobile remotely.
What I see: with Orca Relay, the round trip to
relay.onorca.devis long and unstable from mainland China. The mobile terminal feels laggy, and the connection is not always stable (slow responses, occasional drops/reconnects). Direct LAN / Tailscale pairing is smooth, but on a mobile network I cannot always keep both devices on the same tailnet, so Relay is the only official "works from anywhere" path — and it is the slow one.Requests, in priority order:
Is there any update on the self-hostable relay mentioned above? Happy to test a self-hosted relay or a regional endpoint from mainland China, and happy to provide latency / traceroute data if that helps.
wangbaoyi commentedon Nov 15, 2026
Update after reading the public source: the self-hosted relay MVP may be smaller than it looks — most of the plumbing is already public.
I went through
cloud/and the desktop/mobile relay code. What already exists today:cloud/apps/relayis public MIT source with aDockerfile, andORCA_RELAY_ROLE=combined|director|cell(defaultcombined) lets one process act as director + cell. Percloud/README.md,ORCA_RELAY_ASSIGNMENT_SIGNING_KEYis the only required secret;DATABASE_URLis optional (Postgres in production, SQLite for local dev).ORCA_RELAY_URLoverrideshttps://relay.onorca.devinprofile-cloud-auth-config.ts(packaged builds require HTTPS; loopback HTTP only in dev).mobile-relay-pairing-offer.ts) already carriesrelay.directorUrl/relay.cellUrland only requires a canonical HTTPS origin — there is no*.onorca.devallowlist — and the phone dials the offer'sdirectorUrl(mobile-relay-invite-director.ts).us-central1andasia-east2(relay-regions.ts).So the missing piece is not the protocol, but an officially supported deployment path. Concrete gaps:
orca relaysubcommand) with a documenteddocker runforORCA_RELAY_ROLE=combined: required env (ORCA_RELAY_PUBLIC_URL,ORCA_RELAY_CELL_URL,ORCA_RELAY_AUTH_ISSUER,ORCA_RELAY_JWKS_URL, ...), TLS / reverse-proxy setup, health endpoint, and upgrade/rollback steps. Also make the GCP-only required vars (ORCA_RELAY_ADMIN_AUDIENCE,ORCA_RELAY_DEPLOY_SERVICE_ACCOUNT) optional in combined / self-hosted mode — today they must be set even for a single-box deployment.login.onorca.devby pointingORCA_RELAY_AUTH_ISSUER/ORCA_RELAY_JWKS_URLat the official service, so operators do not have to run an IdP? Please document this, including whether an Orca account or entitlement is required.ORCA_RELAY_URLin Settings (Remote/Mobile) with origin validation and connection health, instead of requiring an environment variable. Show "self-hosted relay" and the assigned cell/region in the connection status.asia-east2exists, but users in mainland China still report high latency and drops torelay.onorca.dev. Please add a region selector/status and more Asia cells (Singapore/Tokyo), and document self-hosted relay as the supported answer for mainland China — a nearby VPS is the only realistic fix there.Suggested MVP: Phase 1 (combined relay container +
ORCA_RELAY_URL+ Settings field + docs) would already unblock users in high-latency regions. Phase 2: endpoint failover + region selection. Phase 3: operator-owned auth issuer and multi-cell.I am happy to build and test Phase 1 from mainland China, and report before/after latency and traceroute. If a PR is welcome, tell me the preferred shape (self-hosted relay docs vs. an
orca relaycommand) and I can draft it.lexasoft123 commentedon Nov 21, 2026
I've opened #46239 for this. It lets you run your own relay and point the desktop at it:
cloud/apps/relay-auth, a small sign-in service that issues the tokens the relay already verifies. By default one admin signs in with a secret; optionally it hands login to your own OIDC provider (tested with Zitadel).cloud/self-hosted, a Docker Compose example that runs the relay and the sign-in service behind Caddy with automatic HTTPS on one domain.How sign-in works: only the desktop signs in, against your server instead of
login.onorca.dev. The phone doesn't sign in at all, same as with the hosted relay today: it pairs by scanning the desktop's QR code, which carries the relay address and a one-time invite, and its traffic to the desktop stays end-to-end encrypted.No phone app update needed: because the QR code tells the phone which relay to use, the current App Store and Play Store builds work with a self-hosted relay as they are.
This covers Phase 1 and the operator-owned sign-in from Phase 3 of the plan in the comment above. Endpoint failover, region selection and multi-cell setups aren't included. I've run it on a small VPS with a macOS desktop and an Android phone, and the end-to-end test also passes on Windows. Happy to reshape or split it if maintainers prefer a different approach.
zbl-jerry commentedon Nov 26, 2026
+1, we really need this. In China, the mobile app keeps timing out and reconnecting, which makes remote work from a phone basically impossible.