RepositoryTypeScript
crosspoint-reader

crosspoint-reader/crosspoint-sync

Reading progress sync, stats and highlights for any KOSync-compatible e-reader. Self-hostable, with a companion app. Syncs with 3rd party connectors such as Hardcover, Spotify, Audiobookshelf, BookOrbit, BookFusion, Readest, and Readwise.

171stars
39forks
19issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: reading-stats

#1 Repository of the week

1
TINIX TRENDING·Topic: crosspoint

#1 Repository of the week

1
TINIX TRENDING·Topic: e-reader

#1 Repository of the week

crosspoint-sync

A lightweight, self-hostable sync server for CrossPoint / CrossInk e-readers — and any KOReader device.

  • 100% KOSync-compatible. Point stock KOReader or current CrossPoint firmware at it by changing only the sync-server URL. Same accounts, same auth, same endpoints as sync.koreader.rocks.
  • Better multi-device sync. Progress is stored per device and the newest position wins, fixing the ping-pong you get with stock kosync servers.
  • Server-side service connectors. Link services such as Hardcover, Micro.blog, and Audiobookshelf once; readers continue speaking standard KOSync while the server updates external reading state.
  • Lossless CrossPoint sync. An extended API carries the full CrossPoint position (spine, paragraph, anchor, page hints), not just a lossy xpath + percentage.
  • Bookmarks, clippings, and reading stats. Delta sync with tombstones for bookmarks and clippings; per-device reading-stats snapshots with a server-side combined view (streaks included).
  • One codebase, one runtime. A single Node + SQLite server in one Docker image — the hosted service and self-hosted installs run the exact same thing. No native dependencies (uses Node's built-in node:sqlite).

The full wire contract is in docs/API.md.

Run it

Docker

docker run -d --name crosspoint-sync \
  -p 8080:8080 \
  -v crosspoint-data:/data \
  ghcr.io/crosspoint-reader/crosspoint-sync:main

Or from a checkout: docker compose up -d uses the published image from docker-compose.yml.

For local image builds from the checkout, use:

docker compose -f docker-compose.dev.yml up -d --build

Railway (hosted-style deploy)

  1. New project → Deploy from this repo (Railway detects the Dockerfile).
  2. Attach a volume mounted at /data.
  3. That's it — the server listens on Railway's PORT automatically.

Bare Node (≥ 22.13)

npm ci && npm run build
DATABASE_PATH=./data/crosspoint.db PORT=8080 node dist/index.js

Configuration

Env varDefaultMeaning
PORT8080Listen port
DATABASE_PATH/data/crosspoint.dbSQLite file (parent dirs auto-created)
REGISTRATION_DISABLEDfalseSet true to lock down a private instance
AUTH_RATE_LIMIT_PER_MINUTE30Per-IP limit on registration (0 disables)
TOKEN_ENC_KEY(unset)Enables external-service connectors. 64 hex chars, a base64 32-byte key, or a ≥32-char passphrase. Encrypts stored connector credentials at rest; unset = connectors disabled.
TRUST_PROXYfalse (true on Railway)Set true only when direct access is blocked and a trusted reverse proxy overwrites any client-supplied X-Forwarded-Proto; permits connector linking through an HTTPS-terminating proxy. Defaults to true when RAILWAY_ENVIRONMENT is present, since Railway always fronts the service with its TLS-terminating edge; set TRUST_PROXY=false to override.
CORS_ORIGINS*Origins allowed to call the sync API from browsers (comma-separated). The default wildcard is safe: the API authenticates with headers, not cookies, and the web UI's cookie routes never get CORS headers.
  1. Sign in to Micro.blog.
  2. Open Account → App tokens.
  3. Create a separate app token for CrossPoint Sync.
  4. In CrossPoint Sync, open your account, choose Micro.blog, and paste the new token.

Treat the token like a password: Micro.blog app tokens have full account access. CrossPoint Sync encrypts the token at rest using TOKEN_ENC_KEY.

Point your reader at it

  • KOReader: Tools → Progress sync → Custom sync server → http://your-host:8080
  • CrossPoint / CrossInk: Settings → KOReader Sync → Sync Server URL

Create an account from the device (register via the sync settings), or:

curl -X POST http://localhost:8080/users/create \
  -H 'content-type: application/json' \
  -d '{"username":"justin","password":"'"$(printf '%s' 'my-password' | md5sum | cut -d' ' -f1)"'"}'

(The password field is the MD5 of your password — that's the kosync protocol; the server stores a salted PBKDF2 of it, never the raw value.)

Development

npm ci
npm run dev        # tsx watch, http://localhost:8080 (set DATABASE_PATH=./data/dev.db)
npm test           # vitest: kosync compat suite + v1 API suite
scripts/curl-smoke.sh http://localhost:8080   # end-to-end smoke against a running server

License

MIT

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

212.9k
Dec 2, 2026
RepositoryLua
ZlibraryKO/zlibrary.koplugin

Home of the KOReader Zlibrary plugin

914
Nov 27, 2026
RepositoryLua
zeeyado/koassistant.koplugin

A powerful AI assistant integrated into KOReader.

307
Nov 30, 2026
RepositoryLua
greywolf1499/opds_plus.koplugin

Enhanced OPDS catalog browser for KOReader with visual cover display, grid/list views, and extensive customization options

214
Nov 11, 2026
RepositoryLua
JoeBumm/Koreader-Menu-customizer

Simplify KOReader. Hide menus. Hide plugins. Focus on reading.

158
May 21, 2026
RepositoryLua
iceyear/readeck.koplugin

KOReader plugin for Readeck servers

153
May 7, 2026
RepositoryC
Sichroteph/YACP

Personal, opinionated Xteink firmware focused on battery life and rendering efficiency. Based on CrossInk and CrossPoint.

92
Nov 28, 2026
Repository
awesome-selfhosted/awesome-selfhosted

A list of Free Software network services and web applications which can be hosted on your own servers

342.5k
Nov 28, 2026
RepositoryTypeScript
immich-app/immich

High performance self-hosted photo and video management solution.

120.6k
Dec 1, 2026