XTLibre is a self-hosted companion app for Xteink and CrossPoint e-readers. It turns EPUB files into device-ready XTC packages, stores them in a local library, exposes them over OPDS, and can send them straight to a reader over WiFi.
It is built for people who want a practical replacement for manual USB workflows: drop in a book, tune the rendering for e-ink, save it to your library, then download or transfer it to the device.
export-1774695022894.mp4
- Built around Xteink/CrossPoint instead of generic EPUB reading
- Self-hosted, with your library and settings stored on your own server
- Real conversion controls for e-ink output, not just file sync
- OPDS support so devices can browse your generated books directly
- Wireless transfer to the device without leaving the browser
- Render EPUB files for Xteink X4 and X3 screen sizes
- Tune font family, size, weight, margins, line height, alignment, and hyphenation
- Upload custom TTF/OTF fonts
- Preview the result in a device-style frame before exporting
- Generate standard
XTCoutput or high-qualityXTCHoutput - Apply 1-bit / 2-bit e-ink quantization and Floyd-Steinberg dithering
- Add a configurable reading progress bar with chapter markers and page info
- Save source EPUB files and generated XTC files on the server
- Edit title and author metadata after import
- Re-open saved EPUBs for reconversion
- Publish generated books through an authenticated OPDS feed at
/opds - Browse and import books from Calibre-Web or any OPDS-compatible source
- Discover compatible devices on the local network
- Test connectivity before sending books
- Transfer books wirelessly in direct or relay mode
- Browse files on the device from the web UI
- View device status such as firmware, WiFi mode, signal, memory, and uptime
| Device | Resolution |
|---|---|
| Xteink X4 | 480 x 800 |
| Xteink X3 | 528 x 792 |
- Open XTLibre in the browser and log in.
- Drop in an EPUB or import one from your OPDS / Calibre catalog.
- Tune typography and e-ink rendering while previewing pages live.
- Generate an
XTCorXTCHfile and store it in the library. - Download it, browse it through OPDS, or send it directly to the device.
The fastest way to run XTLibre is with Docker:
docker run -d \
--name xtlibre \
--network host \
-e PORT=3000 \
-e AUTH_USERNAME=admin \
-e AUTH_PASSWORD=changeme \
-e PUBLIC_URL=http://localhost:3000 \
-v xtlibre-data:/data \
shakogegia/xtlibreThen open http://localhost:3000.
Note:
--network hostis required for the relay mode device scan to discover e-readers on your LAN. Without it, UDP broadcasts stay inside the Docker network. If you don't need device scanning, you can use-p 3000:3000instead. Set thePORTenv var to change the listening port (default 3000).
services:
xtlibre:
image: shakogegia/xtlibre
network_mode: host
environment:
PORT: 3000 # default 3000, change if needed
AUTH_USERNAME: admin
AUTH_PASSWORD: changeme
PUBLIC_URL: http://localhost:3000
volumes:
- xtlibre-data:/data
restart: unless-stopped
volumes:
xtlibre-data:docker compose up -dpnpm install
AUTH_USERNAME=admin AUTH_PASSWORD=secret pnpm devOpen http://localhost:3000.
XTLibre requires authentication. These environment variables matter in practice:
| Variable | Required | Description |
|---|---|---|
AUTH_USERNAME |
Yes | Login username for the web UI and OPDS basic auth |
AUTH_PASSWORD |
Yes | Login password and signing secret for sessions / download tokens |
PUBLIC_URL |
Recommended | Public base URL used when building OPDS links |
DATA_DIR |
No | Storage directory for the SQLite DB, uploaded fonts, EPUBs, and XTC files |
By default XTLibre stores persistent data in ./data locally or /data in Docker:
library.dbfor metadata and saved settingslibrary/for EPUB, XTC, and XTCH filesfonts/for uploaded custom fonts
Mount that directory as a volume in production.
XTLibre exposes an authenticated OPDS catalog at /opds. Add that URL to your e-reader to browse and download generated books from your XTLibre library.
The app can also connect to Calibre-Web, Calibre-Web-Automated, or another OPDS-compatible source. Configure the server from the Calibre tab, browse the catalog in the UI, and import EPUBs directly into XTLibre.
Open the Device tab, put the reader into File Transfer, and connect it over WiFi.
XTLibre supports two transfer modes:
Direct: the browser connects to the device directlyRelay: the XTLibre server connects to the device and streams the file
Use Relay when XTLibre is running on the same LAN as the e-reader. Use Direct when the browser can reach the device directly.
Direct mode is currently intended for HTTP/local-network usage. If you access XTLibre over HTTPS, use relay mode instead.
pnpm build
pnpm startThe repository also includes convenience make targets:
| Command | Description |
|---|---|
make dev |
Run the development server |
make build |
Build the Docker image |
make run |
Build and start the container |
make stop |
Stop and remove the container |
make logs |
Tail container logs |
make shell |
Open a shell inside the container |
make push |
Build and push the multi-arch image |
make clean |
Remove the local image and volume |
When using make run, pass the required auth env vars:
make run AUTH_USERNAME=admin AUTH_PASSWORD=changeme- Next.js 16 with React 19 and TypeScript
- Tailwind CSS 4
- SQLite via
better-sqlite3 - CREngine WASM for EPUB layout and rendering
- Web Workers for image processing and dithering
- WebSocket and HTTP APIs for device communication