Setup and pairing
What you need
Section titled “What you need”- An Android phone with an active SIM and the Sim Bridge app. It becomes the gateway.
- Your own relay. Sim Bridge has no central service: everyone runs a relay for their own bridge, on Cloudflare (free plan, no server to maintain) or on a computer of their own.
- Sim Bridge on the other phones and computers you want to pair.
Keep the relay’s owner key and each bridge’s recovery code private.
1. Run your relay
Section titled “1. Run your relay”Option A: Cloudflare Workers (recommended)
Section titled “Option A: Cloudflare Workers (recommended)”The relay runs in your own Cloudflare account. It keeps everything in memory and writes nothing to disk, and a personal bridge fits Cloudflare’s free plan.
One click:
- Sign in to Cloudflare, or create a free account.
- When asked for
SIM_BRIDGE_ACCESS_KEY, enter a new random secret of at least 32 characters, for example the output ofopenssl rand -base64 36. This is your owner key; your Android phone needs it once to create the bridge. - Deploy. Cloudflare shows the relay’s address, for example
https://sim-bridge-relay.<your-subdomain>.workers.dev. That is your relay URL.
Or from the command line:
git clone https://github.com/rennerdo30/sim-bridge.gitcd sim-bridge/servernpm cinpx wrangler loginnpx wrangler deploynpx wrangler secret put SIM_BRIDGE_ACCESS_KEY # paste your new owner keyCheck it: opening https://<your relay URL>/health shows "ok":true.
Optional hardening: to hide the owner dashboard and admin API completely, run
npx wrangler secret put SIM_BRIDGE_DASHBOARD and enter off. The apps keep working;
enter on again whenever you want the dashboard back.
Option B: your own computer or server
Section titled “Option B: your own computer or server”Requires Node.js 22 or newer.
git clone https://github.com/rennerdo30/sim-bridge.gitcd sim-bridge/servernpm ciCreate a private .env.local file in server/ with SIM_BRIDGE_ACCESS_KEY= set to a
long random secret, restrict it with chmod 600 .env.local (the file is ignored by Git),
and start the relay:
node --env-file=.env.local src/server.mjsThe relay listens on port 8787 and announces itself on your local network, so phones on
the same Wi-Fi find it automatically. Cleartext HTTP is accepted only on local and private
networks; to reach it from the internet, put it behind HTTPS, for example a Cloudflare
Tunnel or Docker (see relay configuration). The owner dashboard is
at http://localhost:8787 on that machine.
2. Create an Android gateway
Section titled “2. Create an Android gateway”Open Sim Bridge on the Android phone, choose SIM gateway, enter the relay URL and owner key, and create the bridge. Grant the SMS and phone permissions needed by the operations you intend to use. The app generates the bridge’s encryption key locally.
Check Settings → Gateway checks. Permission grants, background restrictions, battery optimization, notification visibility, and worker connectivity are separate checks. Some manufacturers require their own background autostart setting. If the app offers I enabled autostart, that records your confirmation; it does not read or grant the manufacturer switch.
The foreground gateway worker uploads durable events and processes commands. Android may still restrict it; force-stop requires reopening the app. A connected status is not a guarantee of permanent availability.
3. Join another device
Section titled “3. Join another device”Create an invitation on a paired device. On another phone, scan the QR invitation or enter its relay URL and full 52-character recovery code. Desktop clients use the manual relay URL and recovery code path.
Keep the Android owner gateway connected during enrollment so it can save the new member’s authorization. The client keeps its own independent signing identity; the shared invitation alone does not prove an existing device’s identity.
The invitation contains access to the bridge key. Anyone who receives it may join while enrollment is permitted, so transfer it through a trusted channel. The relay owner key is used to create/administer bridges and is not part of invitations.
After pairing, select an Android gateway and SIM for outgoing requests. Confirm the device roster and gateway health before trying an SMS with synthetic, non-sensitive test content. Carrier callbacks determine the outgoing SMS result.
If pairing or sync fails
Section titled “If pairing or sync fails”- Confirm the relay process is running and the entered URL is reachable from that device.
- Check local-network permission and firewall rules. Discovery uses mDNS/Bonjour; manual URLs remain available when discovery is unavailable.
- Check that the full recovery code belongs to the intended bridge and enrollment is open.
- On Android, review Gateway checks and the foreground-service status.
- Keep desktop applications open or minimized for event sync and local notifications.
After a relay restart, keep existing pairing data and bring the Android owner gateway online. It restores its current authorization policy and other clients resume with their existing IDs and keys. Waiting for it is expected; creating a new bridge would replace identities and is not the restart-recovery procedure. Pending relay work is lost at restart, while phone-side execution journals remain. Removal, locking, and deletion need the gateway to save the change before success can be confirmed. Do not restore stale gateway authorization backups.
Existing installations from before gateway-held authorization need a planned, identity-preserving migration before replacing the relay. See the migration contract.
For an operator-approved recovery, open Settings → Operator pairing recovery
on each existing device and copy its public identity details through a trusted
channel to the operator. They contain the existing bridge/device IDs and a signing
public key, not the private signing key, message encryption key, or bearer token.
The operator verifies device identities and roles, explicitly approves the Android
owner gateway as authority, and prepares the restore request described in the
protocol. The copied publicKey is the restore member’s devicePublicKey.
After the operator returns the matching certificate, paste it into that same dialog. The authority gateway also receives the exact approved policy JSON; bring its headless worker online to install and restore it before other clients resume. Apply approved recovery preserves the existing pairing IDs and native journals. Rejection leaves existing credentials intact. This is a migration path, not a substitute for verifying the operator’s approval or for rotating a lost message encryption key. Do not put certificates, verifier values, private operator requests, or real device identifiers in public issues or Git.
For Linux, discovery and credential storage have different system requirements; see desktop installation.