Of Notes

Knowledge Mirror

2 min read · revised 4 November 2026 · ·

This knowledge base as an offline reader on the reMarkable 2. It is an app inside the tablet's own interface. It keeps a read-only copy of the published notes, with maths and figures pre-rendered. Links, backlinks and search all work without a network. The copy refreshes every hour from the site, or over USB from the laptop. The reMarkable cloud plays no part. The code lives in remarkable/ in the repo, and its README has the full detail.

How it fits together

  • Export: web/scripts/rm-snapshot.mjs runs as part of the site build (npm run build). It turns every published note into simple rich-text blocks. Maths becomes SVG through MathJax, TikZ figures are kept as SVG, and links, backlinks and search text are collected. The result is web/dist/rm-snapshot/. It holds a manifest plus objects named by their sha256 (about 3000 objects, 15 MB).
  • Serve: the site route /api/rm/v1/ serves that snapshot. It hands out a manifest signed with Ed25519, then the objects. Every request needs a per-device bearer token.
  • Sync: the tablet runs a small C++/Qt program, backend/entry, from a systemd timer every hour. It checks the signature against a pinned public key and checks each object's hash. It downloads only what changed, then swaps to the new snapshot atomically. The previous snapshot stays until the new one is complete.
  • Read: the screens are written in QML and launched through AppLoad, which runs inside xochitl (the tablet's interface) by way of xovi. They are Home, Library, Reader, Search and Practice. Problem notes fold their solutions until revealed. Reading positions, bookmarks and solved marks are kept on the tablet only.

Setup

  1. Launcher: install xovi and AppLoad on the tablet with Vellum (vellum add appload). Then run xovi/rebuild_hashtable once, unlocking the tablet when it asks. After that, xovi/start loads xovi.
  2. App: run make rm.mirror.install from the KB root, with the tablet on USB. It cross-compiles in Docker, then copies the app, the device config and the sync timer to the tablet.
  3. Server: run node remarkable/tools/keys.mjs env. Add the two lines it prints (RM_SIGNING_KEY and RM_DEVICE_TOKENS) to the site app's environment in Dokploy, then redeploy.
  4. Check: make rm.mirror.status shows the last sync. make rm.mirror.push syncs over USB straight away, with no server involved.

The secrets live in ~/.config/knowledge-mirror/: the signing key and the device tokens. The server only keeps hashes of the tokens, so removing a device's entry from RM_DEVICE_TOKENS revokes that device.

Gotchas

  • Reboots: xovi/start does not survive a reboot. Run it again over SSH after the tablet restarts.
  • Firmware updates: an update resets /etc and the system partition. Run make rm.mirror.install again, and repeat the Vellum steps if AppLoad is gone.
  • USB push: it uses an SSH reverse tunnel on port 47831. The laptop's firewall blocks inbound connections from the tablet, and the tablet's own port 8787 is already taken.
  • Sharp figures: Qt draws an SVG at the size written inside the file, then stretches the bitmap. So the exporter writes the on-screen pixel size into each SVG. A size in points comes out blurry.
  • Error messages: "sync failed: Host requires authentication" means the server rejected the token. Usually the Dokploy variables are missing or out of date.

Edges

/ or Ctrl K
search; empty, it shows notes to revise and lately read
m
mark this note to revise, or unmark it
c
cover maths, proofs and solutions to test yourself
n
uncover the next covered item
y
copy this note’s org-roam link
e
copy this note as markdown, LaTeX kept as TeX
p
the next problem to work; there h hints, s shows the solution, x passes it for today
→ ← j k space
turn the page, when reading in pages
l
on the map, trace the greatest distance, then the longest path
double-click
a formula, to copy its TeX
rest on maths
bind a part of a formula and open the wheel of notes it comes from; scroll or ↑ ↓ widens it, 1–6 goes
?
this card