ratchet docs

Phone access

Open the same ratchet from your phone. You pick how the phone reaches your PC: through the ratchet relay, or through your own private Tailscale network.

On this pageQuick setupHow it connectsThe two choicesSet it up onceOn a server with no screenThrough the ratchet relayPhone app checkThrough TailscaleChanging the connectionPaired devicesOn the phoneAdd a Claude account from the phone
Phone screenshot of ratchet, agents view
ratchet on a phone: an agent's page, with the Agents, History and This PC tabs at the bottom.

Quick setup

On a fresh start, once the usage question and the crash-report question are answered, your PC shows the card Get alerts on your phone. It shows only on the PC, and only while no phone has ever been set up.

  1. Press Set up. ratchet turns phone access on through the ratchet relay and shows a QR code and a code to type.
  2. Scan the QR code with your phone's camera. The phone pairs and asks straight away: press Allow alerts.
  3. Your PC sends that phone one test alert. The card ticks each step as it happens: Phone paired, Alerts allowed, Test alert sent — did it buzz?
  4. Answer Did the alert arrive? with Yes or No. No tells you what to check on the phone.

On Android this takes about a minute. On an iPhone, alerts need ratchet on your Home Screen, so after scanning, Safari shows three steps instead: tap Share, then Add to Home Screen; open ratchet from the new icon; type the code shown next to the QR code on your PC. The phone then asks to allow alerts.

If the phone's browser can't show alerts, or alerts are blocked in the phone's settings, the phone says so after pairing. Press Continue without alerts to go on; you can turn them on later in Settings. When they are blocked, allow them for ratchet in the phone's settings, then press Check again.

If the test alert can't be sent, the card says Couldn't send the test alert. with Try again.

To use your own Tailscale instead of the relay, press Use Tailscale instead on the card; the Phone access window opens at its choice. Not now closes the card for good. ✕ closes it at any step; phone access and a phone that already paired stay as they are. The Phone access button at the bottom right always works as described below.

How it connects

ratchet keeps running on your PC, and your PC is never opened to the internet. Phone access is off until you turn it on. When you turn it on for the first time, ratchet asks how your phone should reach the PC. One connection is used at a time, and you can change it later.

With Start ratchet when I sign in on, your phone reaches the PC again after the PC restarts, without anyone typing ratchet. See Settings.

The two choices

  • Anywhere · ratchet relay. Nothing to install. Works on any network, even with a work VPN on your phone. Everything is encrypted: the relay passes it on but can't read it.
  • Tailscale. Your phone and this PC talk over your own private Tailscale network, and nothing passes through a ratchet server. Needs the Tailscale app on this PC and on your phone, and can't run next to another VPN on the phone.

The relay is optional. The first time, the relay is pre-selected. If you already used phone access with Tailscale, ratchet keeps Tailscale, and it stays your choice until you change it.

PC screenshot of ratchet, agents phone connection view
Phone access, first time: choose how your phone reaches this PC.

Set it up once

  1. If you choose Tailscale, first install it on your PC and phone and sign in on both with the same account.
  2. In ratchet on your PC, press Phone access: off at the bottom right, pick Anywhere · ratchet relay or Tailscale, then press Turn on.
  3. Scan the QR code with your phone's camera. It works once, for the next 10 minutes. Or type the eight-character code on the phone.
  4. On the phone, add ratchet to your home screen. It then opens like an app.
PC screenshot of ratchet, agents phone access view
Phone access on through the relay: the pairing QR code, the code to type, List this PC in my account, Approve a browser and your paired devices.

On a server with no screen

If ratchet runs on a machine you reach only over SSH, set up your phone from the terminal.

  1. On the server, type ratchet. It starts in the background and keeps running after you log out.
  2. Type ratchet phone. ratchet turns on phone access through the ratchet relay and shows a QR code. For Tailscale, type ratchet phone --tailscale.
  3. Scan the QR code with your phone's camera, or open the link it prints, or type the eight-character code. The command tells you when the phone is paired.
  4. To see this PC in your account on account.ratchet.build, type ratchet phone --list-pc and open the link it prints in any browser.

Signing in to a Claude account still needs a browser. Open ratchet's page from your laptop through an SSH tunnel: ssh -L 4700:127.0.0.1:4700 you@server. Then type ratchet on the server and open the link it prints in the laptop's browser. Use the same port number on both sides, and 127.0.0.1, not localhost. If ratchet uses another port, the link shows it.

Some servers end every program when you log out. If ratchet is gone when you come back, start it again with ratchet.

On Windows over SSH, ratchet can stop when you log out. Keep the SSH window open while you set up the phone.

Through the ratchet relay

With the relay, your PC keeps one outgoing connection to relay.ratchet.build. It opens no port. On the phone, ratchet opens from app.ratchet.build, the same app your PC serves, and the phone and the PC talk through the relay with every message encrypted between the two of them.

To pair, scan the QR code, or open app.ratchet.build on the phone and type the eight-character code shown on the PC. The code works once, for the next 10 minutes. Every phone gets its own key, so Remove cuts that phone off at once.

Several PCs on one phone

Over the relay, one phone can keep up to 10 PCs. The PCs you paired before stay on the phone when you pair the next one.

  • Add a PC. Open This PC → Your PCs, press + Pair another PC and type the code shown on that PC. On an iPhone, type the code inside the home-screen app: the camera opens Safari, which keeps its own list. With 10 PCs saved, the list says You have 10 PCs. Forget one first. and + Pair another PC stays off until you forget one.
  • Switch. ratchet opens on the PC you used last. With two or more PCs, its name shows at the top: under ratchet on a phone, and next to ratchet in a browser window 1024 pixels wide or more, for example on office-pc. Tap it, or open This PC → Your PCs, and tap a PC. In a wide browser window, Settings also has Your PCs with Show your PCs. Tapping an agent of another PC in the Agents tab switches too, with Opening on Laptop… while it does, and opens that agent there.
  • Every PC's agents in one list. With two or more PCs, the Agents tab shows one section per PC, in the order of Your PCs, each with up to five agents and Show all for the rest. The header says how many need you, work and are done, or what keeps the list away: checking…, offline since 18:40, not responding (the last agents stay, greyed), older ratchet with Open to update it, couldn't load its agents with Try again, open in another ratchet tab, or can't reach it with See Your PCs. The lists refresh every 10 seconds while the Agents tab is on screen and stop when the app goes to the background.
  • Status. Each PC in the list says whether it is online, offline and when it was last seen, or whether it removed this phone. The PC you have open says Open now. Can't reach ratchet's relay means this phone can't reach the relay: usually no internet, rarely the relay is down. It doesn't mean your PCs are off.
  • Alerts. Tapping a phone alert opens the PC that sent it. With two or more PCs, each alert starts with the PC's name, for example Home PC: fix-login-timeout needs you.
  • Find more PCs. Sign in to find more PCs, under your saved PCs, opens account.ratchet.build. See Find your PCs from any browser.
  • Approve a browser. ⋯ → Approve a browser lets a new browser open that PC: type the code the browser shows, check its name, and tap Approve. If that PC is offline, already has 10 devices, or is busy with another approval, the screen says Can't approve yet and why; press Try again for a new try.
  • Forget. ⋯ → Forget removes a PC from this phone. A PC that is online also drops this phone from its list. One that is offline still lists the phone, so remove it there under Phone access when you're back.
  • Older ratchet on a PC. A PC that runs a ratchet from before the PC list can't switch back. The phone asks first: Open anyway stays on that PC until you update ratchet there. Your other PCs stay saved.

The list is for the relay only. Over Tailscale, each PC has its own address.

Find your PCs from any browser

  1. On the PC, press Phone access at the bottom right of ratchet. With phone access on through the ratchet relay, turn on List this PC in my account. Your browser opens account.ratchet.build; sign in with GitHub there.
  2. In any browser, open account.ratchet.build to see your PCs with an online dot. Open takes you to the phone app. Remove from account takes a PC off the list. An account holds up to 20 PCs.
  3. A browser that never paired with that PC shows a QR code and an 8-character code. Approve it once, either way:
    • On a phone already paired with that PC, scan the QR with the phone's camera and tap Approve. On an iPhone where ratchet lives on the home screen, open ratchet there → This PC → Your PCs → ⋯ → Approve a browser, and type the code.
    • At the PC, press Phone access at the bottom right of ratchet, type the code under Approve a browser, and press Approve.

A code works once, for 10 minutes. After 5 wrong tries the new browser offers New code. One new browser at a time can wait for a PC; another one is asked to try again.

Signing in alone never opens a PC. The PC shows "New browser approved" with That was me and Remove, and you can remove an approved browser under Paired devices at any time. Turning List this PC in my account off takes the PC off your account.

What the relay stores

The relay stores room details only: when the room was made, when your PC was last seen, and for each paired phone or approved browser a random ID and a hash of its join pass. While a pairing code is live, it also keeps the first half of that code, for at most 10 minutes. When you list a PC in your account, it keeps that PC's link code as a hash, with the PC's name, until the code is used or for at most 10 minutes, and the times codes were made, so it can allow 5 an hour. A browser waiting for approval is an open connection, not something the relay stores. It stores no content and keeps no log of what you do.

Limits

  • A PC can have up to 10 devices over the relay: paired phones and approved browsers together.
  • An account can list up to 20 PCs, and a PC can make 5 link codes an hour.
  • A phone can keep up to 10 PCs. Forget one to add another.
  • A file over 100 MB can't be downloaded through the relay. Download it on the PC. Tailscale has no such limit.

Phone app check

Over the relay, the phone app comes from app.ratchet.build. Each phone works out a fingerprint of the app files it loaded and reports it to your PC, which compares it with the fingerprint of the app it ships. A phone that reports a different app gets a warning, your PC shows Phone access: needs attention, and your PC does not serve that phone.

When ratchet on your PC is a different version from the phone app you opened, the phone switches to the phone app for your PC's version by itself. app.ratchet.build keeps the last 10 releases. If it doesn't hold your PC's version, for example a ratchet older than those 10 or one that isn't released yet, the phone shows which side to update instead. With several PCs saved, the phone switches by itself only to a phone app that has the PC list; otherwise it shows that screen.

The check catches accidental changes, but whoever runs app.ratchet.build could hide a deliberate one. Tailscale needs no third party, because the phone app comes straight from your own PC. Choose Tailscale if you need that.

Through Tailscale

Your phone reaches ratchet through Tailscale, a free private network you install on both devices. Tailscale connects PC and phone directly where it can; when it can't, its relays pass on traffic they can't read. Only devices signed in to your Tailscale account can reach your PC, and nothing passes through a ratchet server. It works as it always has.

If Tailscale needs attention

ratchet says what's wrong and, where there is one, links to the fix: Tailscale not installed, signed out or stopped, MagicDNS or HTTPS certificates off, Funnel on, port 443 already in use, or ratchet couldn't talk to Tailscale.

Changing the connection

Press Change connection in the Phone access dialog. ratchet asks first. Switching removes the phones paired the other way, so each of them has to pair again: on the phone, remove the ratchet icon from the home screen, scan the new QR code, and add ratchet to the home screen again. Switching away from the relay also removes approved browsers. For Tailscale, ratchet checks Tailscale is ready on the PC (installed, signed in, running, HTTPS certificates on, Funnel off, port 443 free) before it switches. Nothing changes if that check fails.

Paired devices

While phone access is on, the dialog lists every paired phone with when it was paired and last seen. Over the relay the list is called Paired devices and also holds approved browsers, shown as the browser's name with "(web)" and the day it was approved. Remove unpairs one.

On the phone

A tablet, and any window under 1024 pixels wide, gets the same phone layout, for example an iPad held upright or ratchet on half a laptop screen.

  • Bottom tabs: Agents, History and This PC. Agents shows how many are waiting on you.
  • The Agents tab starts with a Since you left card, then one section per repo with its agents, or one section per PC when the phone has two or more. Each repo's last row, Files, Git, GitHub, opens its repo page, with CODE and GITHUB pages. Folders outside your repos come after them, under OTHER FOLDERS.
  • An agent's page has the same four buttons as on the PC, under its title. Its ⋯ menu is at the top right.
  • This PC holds Machine, Usage, Plugins, Settings, Your PCs and Phone access.
  • The round + at the top starts a new task. Pages open full screen. Back goes back, and tapping the current tab again returns to its top.
  • When a new version is out, the phone shows the update banner too. Update now updates ratchet on your PC, and the phone comes back by itself on the new version. If you started ratchet with npx, the banner shows the command to run on your PC instead. See Updating.
Phone screenshot of ratchet, this pc view
The This PC tab on the phone: Machine, Plugins, Settings and Phone access.

While phone access is on and agents are running, ratchet keeps your PC from going to sleep.

Add a Claude account from the phone

  1. Open Settings → Claude accounts and press Add account. Give it a name, for example Work, and press Sign in with Claude. The phone shows Starting Claude's sign-in on your PC… for a moment.
  2. Press Open Claude's sign-in page and sign in there with the account you want to add. Nothing opens on your PC's screen.
  3. Claude shows a code. Copy it.
  4. Back in ratchet, paste it into the box and press Continue. Going to the browser and back does not stop the sign-in.

Sign in again on an account's row works the same way, and Copy setup from Main… is in the account's ⋯ menu on the phone too. Rename, remove and adding a folder by hand stay on your PC. See Claude accounts.

Screenshots use example data. Written for ratchet 0.8.0.