Readwyn 0.1.0

How to pair a second Mac with your library

Turn on “Readwyn server” on the Mac that holds your libraries. Then, on the second Mac, type the first Mac's address in Settings › Other devices › Another device and enter the 6-digit code the first Mac shows. If you don't have a code to hand, the second Mac can ask to connect instead, and you choose Allow on the first Mac. Either way you pair only once: after that, the second Mac connects by itself and shows the first Mac's libraries.

On the first Mac

Open Settings › Other devices:

  1. Turn on “Readwyn server”. While it's off, no other device can connect, and “Pair a device…” isn't there.
  2. In “Listen on”, choose your network, for example “Wi-Fi · 192.168.1.20”. If you leave the default, “This Mac only”, the pairing sheet says “This Mac listens to itself only. Choose a network in Listen on first.”
  3. Choose “Pair a device…”. The sheet shows this Mac's address with Copy, the code in two groups of three digits (“482 913”, say), and “It can” with the level the new device will get. That's Read unless you pick Guest or Admin.

The code “Works once, for the next 10 minutes.” After 5 wrong codes in a row, every open code stops working and you have to make a new one.

Pairing with the code

On the second Mac, open Settings › Other devices and choose “Another device” under “Show libraries from”. Type the address from the sheet and choose Connect.

When it finds the first Mac, the second Mac says, in green, “Found Sid’s iMac. It needs to know this Mac first.” Below that are six boxes under “Type the code that Sid’s iMac shows”, with the reminder “On Sid’s iMac: Settings › Other devices › Pair a device…”. Type the six digits and choose Pair. The sheet on the first Mac says when the device has paired, and the second Mac switches to the first Mac's libraries.

The code itself never crosses the network. Instead, the second Mac makes a key pair for the first Mac and sends the public half along with proof that it knows the code. The private key stays in its macOS Keychain, and the first Mac stores only the public key. Every later connection signs in with that key.

Pairing with a request

Under the six boxes, “Ask Sid’s iMac to allow this Mac instead” sends a request. The second Mac then shows “Waiting for Sid’s iMac.” and “Choose Allow there, in the notification or in Settings › Other devices.”

On the first Mac, a notification appears, for example “Sid’s MacBook Air asks to connect.” with “It gets the Read level. You can change it in Settings.” Allow in the notification gives it the Read level. To choose another level, answer in Settings › Other devices instead, where the request sits at the top of “Paired devices” with a level menu, Deny, and Allow.

Settings, Other devices: under Paired devices, Sid’s MacBook Air asks to connect, with the level Read and the buttons Deny and Allow, above three paired devices
A request to connect, with its level, Deny, and Allow

A request waits for 24 hours. Quitting Readwyn on the second Mac doesn't cancel it: the app checks on it again when it opens.

When the pairing fails

The second Mac gives the reason in red under the address:

  • “Can’t reach 192.168.1.20:7313. Check that both devices are on the same network and that Readwyn server is on there.”
  • “The code is not right. Check it on Sid’s iMac.”
  • “Sid’s iMac did not allow this Mac.”
  • “Sid’s iMac removed this Mac. Pair again.”

macOS may also ask for permission, on the first Mac to accept incoming connections and on the second to use the local network. Allow both. Readwyn doesn't look for other Macs by name, so you always type the address.

Until the pairing succeeds, the second Mac keeps showing its own libraries. If it later loses its key, after a reinstall for instance, Readwyn falls back to its own libraries and opens Settings › Other devices at the six boxes so that you can pair again.

A server without a display

A Linux machine running the headless server pairs the same way, only without a window: ryn-server code makes the code, and the second Mac asks you to “Type the code that gives”.