QR Device Pairing

Add new laptops, phones, and tablets using single-use, 5-minute enrollment codes that never expose permanent credentials.

Generating a Pairing Code

You can generate a pairing QR code from either an already-connected Obsidian client or directly on the VPS via SSH.

Method 1: Inside Obsidian

Open Settings → Synora → Pair another device and click Generate QR code (or run the command Synora: Pair another device (QR code)). Obsidian calls POST /api/pair/start and displays both a scannable SVG QR code and a 12-character fallback code with a live 5-minute countdown.

Method 2: From Your VPS SSH Terminal

sudo bash /opt/synora/installer/pair.sh

installer/pair.sh reads your active Lite or Standard deployment, detects your Quick Tunnel or configured SYNORA_DOMAIN URL, and runs node src/pair-cli.js inside the api container to print a compact Unicode QR code and enrollment code directly in your terminal.

Optional flags supported by pair-cli.js (passed through installer/pair.sh):

  • --vault <id-or-name> — select a vault when multiple vaults exist on the server.
  • --init "<Vault Name>" — initialize a first vault if none exists yet.
  • --url https://sync.example.com — override the public server URL.

Payload Structure & Security

Synora encodes enrollment metadata using the Obsidian custom protocol handler:

obsidian://synora-pair?url=https%3A%2F%2Fsync.example.com&code=ABCD-EFGH-JKLM&exp=2026-12-06T18%3A00%3A00.000Z&vault=My+Vault
  • 60-bit code entropy: 12 characters drawn from unambiguous alphabet 23456789ABCDEFGHJKLMNPQRSTUVWXYZ.
  • Short-lived & single-use: Default TTL is 300 seconds (configurable 30–600 seconds on the API). Once redeemed via POST /api/pair/complete, the code is marked used and cannot be replayed.
  • Server-side hashing: Only SHA-256(normalizedCode) is persisted on the server; raw codes are never logged.
  • No permanent secrets in QR: QR codes never embed SYNORA_API_KEY, syn_dev_... tokens, or E2EE passphrases.
  • Brute-force protection: POST /api/pair/complete is rate-limited to 15 failed attempts per 60-second sliding window per IP.