Find a file
2026-11-29 17:09:40 +03:00
.github Lint: add ESLint as a bug net, fix the five findings it found 2026-11-28 16:15:01 +03:00
assets/readme
bench
collections
converter
docs Preserve the pending reader position when the save timer fires during idle (#39) 2026-11-29 17:09:40 +03:00
public Preserve the pending reader position when the save timer fires during idle (#39) 2026-11-29 17:09:40 +03:00
scripts CI: run the tests with a coverage floor 2026-11-28 16:08:43 +03:00
site fbc 2.1.1: AZW3 conversion, fbc 2.x options, version-aware config keys 2026-11-16 18:47:16 +03:00
src Fix FB2 position sync and preserve bookmarks across section splits 2026-11-29 17:05:04 +03:00
test Fix FB2 position sync and preserve bookmarks across section splits 2026-11-29 17:05:04 +03:00
tools
.dockerignore
.env.example
.gitattributes .gitattributes: keep Windows .cmd/.bat scripts CRLF, shell scripts LF 2026-11-17 20:58:11 +03:00
.gitignore
AGENTS.md Fix FB2 position sync and preserve bookmarks across section splits 2026-11-29 17:05:04 +03:00
build-release.cmd
CHANGELOG.md Keep the next version unreleased 2026-11-29 15:05:09 +03:00
check-idx.cjs
CONTRIBUTING.md Agent docs: split AGENTS.md into root rules + per-subsystem reference 2026-11-28 14:44:56 +03:00
DESIGN.md
docker-compose.yml
docker-entrypoint.sh
Dockerfile fbc 2.1.1: AZW3 conversion, fbc 2.x options, version-aware config keys 2026-11-16 18:47:16 +03:00
eslint.config.js Lint: add ESLint as a bug net, fix the five findings it found 2026-11-28 16:15:01 +03:00
install.cmd fbc 2.1.1: AZW3 conversion, fbc 2.x options, version-aware config keys 2026-11-16 18:47:16 +03:00
install.sh fbc 2.1.1: AZW3 conversion, fbc 2.x options, version-aware config keys 2026-11-16 18:47:16 +03:00
LICENSE
package-lock.json Lint: add ESLint as a bug net, fix the five findings it found 2026-11-28 16:15:01 +03:00
package.json Keep the next version unreleased 2026-11-29 15:05:09 +03:00
pkgcontent.txt
PRODUCT.md
README.md fbc 2.1.1: AZW3 conversion, fbc 2.x options, version-aware config keys 2026-11-16 18:47:16 +03:00
README.ru.md
reset-admin.cmd
reset-admin.sh
restart-server.cmd
restart.sh
skills-lock.json
start-server.cmd
start.sh
stop-server.cmd
stop.sh

INPX Library Server

English · Русский

Self-hosted ebook library for INPX collections and plain book folders:
catalog and search, in-browser reader, OPDS, send to e-reader and an Android app.

Latest release Docker amd64 / arm64 Node.js 20+ OPDS 1.x / 2 MIT License

Library home page in the browser and the Android app

Installation · Getting started · Features · Android · OPDS and KOReader · Configuration · Changelog · Website

Support the project on Boosty

Point the server at a folder of books — an INPX collection (the format of large library dumps), a Calibre library or your own FB2 / EPUB files — and it builds a catalog with authors, series, genres and full-text search. Read in the browser or in the Android app: reading position, bookmarks and notes stay in sync. Runs on a NAS, a Raspberry Pi or a regular PC and is built for libraries of hundreds of thousands of books.

What it looks like

Catalog: covers, filters and sorting Book page: series, rating, reading and sending
Catalog — covers or list, filters, sorting Book — series, rating, download, send to e-reader
In-browser reader Series: progress and next volume
Reader — FB2 / EPUB in the browser, themes, bookmarks, read aloud Series — «N of M read» and the next volume

Web interface on a phone: home, book, reader

More screenshots: search, profile, shelves, dark theme, admin
Search suggestions Profile: yearly goal and stats
Search suggestions: books, authors, series Profile: yearly goal, stats, collection
Shelves and smart shelves Dark theme
Shelves and smart shelves Dark theme
Admin: dashboard Admin: book sources
Admin: server status and database memory Admin: book sources and folder watching

The screenshots show the Russian interface and a fictional demo library. The web interface is also available in English (EN in the top bar).

Installation

You need a folder with books: an INPX collection (.inpx + .zip / .7z archives) or a plain folder with FB2 / EPUB / MOBI / AZW3.

Docker

docker run -d \
  --name inpx-library \
  --restart unless-stopped \
  -p 3000:3000 \
  -v inpx-app:/app \
  -v inpx-data:/app/data \
  -v /path/to/library:/library:ro \
  -e LIBRARY_ROOT=/library \
  habsaec/inpx-library-server:latest

Open http://localhost:3000 and sign in as admin / admin.

  • inpx-data — database, settings and cache. This is the one to back up.
  • inpx-app — application code. When a new image starts, the code in the volume updates itself.
  • Mount other book folders under /sources/… (-v /path/to/epub:/sources/epub:ro) and add them as sources in the admin panel.

Updating: docker pull habsaec/inpx-library-server:latest, then recreate the container with the same command.

Docker Compose
services:
  library:
    image: habsaec/inpx-library-server:latest
    container_name: inpx-library
    restart: unless-stopped
    ports:
      - "3000:3000"
    volumes:
      - app-code:/app
      - app-data:/app/data
      - /path/to/library:/library:ro
    environment:
      - LIBRARY_ROOT=/library

volumes:
  app-code:
  app-data:
docker compose up -d

docker compose down -v also deletes the data volumes — don't use -v if you want to keep the library.

Synology NAS (Container Manager)

The repository has a ready-made docker-compose.yml for Synology: port 3000, data in /volume1/docker/inpx-library-data.

  1. Create the data folder: mkdir -p /volume1/docker/inpx-library-data.
  2. In docker-compose.yml, uncomment the books volume line and set your path, e.g. - /volume1/books/library:/library:ro.
  3. Container Manager → Project → Create, pick the folder with docker-compose.yml → Apply.
  4. Open http://<NAS-IP>:3000 → admin / admin.

The image is built for amd64 and arm64.

Windows

  1. Download inpx-library-server-<version>.zip from the latest release and unpack it, e.g. to D:\inpx-library-server.
  2. Run install.cmd. It downloads a portable Node.js 24 into the runtime folder, installs the dependencies and the fb2cng converter. No system Node.js is needed.
  3. Run start-server.cmd and open http://localhost:3000.

Stop with stop-server.cmd, restart with restart-server.cmd. The easiest way to set the books path is in the admin panel when you add a source.

Linux (Debian / Ubuntu / Raspberry Pi OS / OpenMediaVault)

git clone https://github.com/Habsaec/inpx-library-server.git
cd inpx-library-server
sudo ./install.sh    # Node.js 20, dependencies, converter; offers a systemd service
./start.sh

If you enabled the service during installation:

sudo systemctl status inpx-library
sudo journalctl -u inpx-library -f

macOS

You need the Xcode Command Line Tools and Node.js 20+ (Homebrew or the installer from nodejs.org).

git clone https://github.com/Habsaec/inpx-library-server.git
cd inpx-library-server
sudo ./install.sh
./start.sh

Getting started

  1. Sign in as admin / admin and change the password in your profile right away. To switch the interface to English, press EN in the top bar.
  2. Admin → Book sources → Add source: the path to a .inpx file, to a Calibre library or to a folder with books (in Docker, the path inside the container, e.g. /library).
  3. Wait for indexing. Progress is shown in the admin panel; a collection of hundreds of thousands of books takes about 45 minutes.
  4. Create users in Admin → Users, or turn on anonymous access there.
  5. To send books to e-readers, fill in Admin → Mail; for Telegram, Admin → Telegram bot.
  6. Backup: Admin → Backups & updates → Download DB backup (or copy data/library.db).

Behind HTTPS / a reverse proxy (nginx, Caddy, Traefik), set TRUST_PROXY=1 and SESSION_SECURE_COOKIE=true.

Calibre libraries

Keep your books in Calibre? Add the library folder (the one with metadata.db) as a source: the admin panel recognizes it and adds it as a Calibre library.

  • The catalog comes from metadata.db — the titles and authors you fixed in Calibre, series and series numbers, tags, ratings, languages, publisher, description, ISBN and cover.jpg. Book files are not opened during indexing, so even a large library indexes in minutes.
  • One catalog entry per Calibre book. The reader opens the first of EPUB → AZW3 → MOBI → FB2; every other format the book has in Calibre (AZW3, PDF…) is offered too — in the download menu, when sending to an e-reader and in OPDS — and served as is, without conversion. Books that only have PDF, DJVU, CBZ, CBR, TXT, RTF or DOCX are in the catalog too, in that order of preference (other formats such as LIT are skipped).
  • PDF, DJVU, CBZ, CBR, TXT, RTF, DOCX — in Calibre libraries and as loose files in plain book folders (a folder book gets author and title from the file name; files inside ZIP / 7z archives stay ignored): download, OPDS and send to an e-reader. «Read» in the browser is shown for FB2, EPUB, MOBI / AZW3, CBZ (comics) and PDF (the browser's own PDF viewer); the rest are download only. The Android app opens PDF, CBZ and TXT in its reader and offers Open in another app for DJVU, CBR, RTF and DOCX. A Kindle address only receives EPUB, PDF, DOCX, TXT and RTF — other formats are refused with a clear message instead of bouncing at Amazon.
  • Already added the library as a plain folder? Admin → Book sources → Convert to Calibre on that source: it is reindexed as a Calibre library, and reading positions, bookmarks, ratings and shelves move to the Calibre books (if two formats of one book had separate reading positions, the primary format's one is kept).
  • Tags become genres by default. If your tags are mostly workflow labels («to read», «kobo»), switch the source to «search only» (or «ignore») in the sources table.
  • Renaming a book or an author in Calibre does not break reading positions, bookmarks or shelves: books are identified by Calibre's book UUID, not by the file path.
  • The server only reads the library: it copies metadata.db to its data/calibre folder and reads that copy (one copy per library, roughly 1–3 KB per book), so Calibre can stay open and the folder can be mounted read-only. With folder watching on, a change in Calibre is picked up after the quiet period; otherwise run an incremental index or use the schedule.

Features

Catalog and search Full-text search with suggestions and typo correction · authors, series, genres, languages · filters (genre AND / OR, language, format, year, rating) · new arrivals, recommendations, similar books · curated lists (classics, school curriculum, science fiction and your own lists)
Reading FB2 and EPUB in the browser: themes, fonts, bookmarks, color-coded notes, read aloud · position syncs with your phone without «jumps» · export notes to Markdown / HTML
Personal library Reading · Want to read · Finished · My ratings · favorite authors and series · «New from favorites» · shelves and smart shelves · yearly goal and stats · import from Goodreads / LiveLib
Delivery FB2, FB2.ZIP; from FB2 via fb2cng: EPUB 2/3, KEPUB, KFX, AZW8, AZW3, PDF, TXT, Markdown (no MOBI conversion — MOBI files are served as is) · batch ZIP · send to an e-reader by e-mail (Kindle, PocketBook, Kobo) and to Telegram
Clients Android app · OPDS 1.x / 2 with reading progress · KOReader progress sync (KOSync) · Telegram bot with search
Sources INPX collections (ZIP / 7z, including PPMd), Calibre libraries and plain folders · several sources at once · duplicate cleanup · folder watching · covers, illustrations (JPEG XL, WebP), reviews and author portraits from sidecar files
Admin Users and permissions, anonymous access, OIDC / SSO · SMTP and Telegram · look and feel (logo, header, background, palette) · monitoring, log, backup, update from ZIP

The interface is available in English and Russian, with light, dark and automatic themes. Rebuilding the index or removing a source never loses users' bookmarks, positions or shelves.

Android app

INPX Book Reader is an Android reader that works with this server: catalog, offline reading, read aloud, E-Ink mode and position sync shared with the web reader. Its interface is in English and Russian (follows the phone language, switchable in the app).

  1. Install the APK from the app releases — the link and a QR code are also in the web interface sidebar («App»).
  2. Open the sign-in window there: the server shows a one-time QR code (valid for 10 minutes). Scan it in the app — no need to type the address, login or password.

OPDS and KOReader

OPDS — http://<server>:3000/opds (OPDS 2: /opds/v2). Sign in with a library user's login and password. Works with KOReader, FBReader, Moon+ Reader, Librera. Books you have started show their progress in the title: ◔ ◑ ◕ ⬤.

KOReader progress sync:

  1. In your profile, in the KOReader progress sync block, create a separate password for KOReader (your account password is not used).
  2. In KOReader: Progress sync → Custom sync server, address http://<server>:3000/kosync, your login and the password you created.
  3. Download the book through OPDS — that is how the server recognizes it in KOReader.

How it works

flowchart LR
  A["INPX collections<br>and book folders"] --> B["SQLite index<br>FTS5 search, covers"]
  B --> W["Web interface<br>and reader"]
  B --> O["OPDS / KOSync"]
  B --> R["Android app"]
  B --> T["Telegram bot<br>and e-mail"]

Metadata (series, authors, genres) comes from the index and is served through /api/* — one contract for the web, OPDS, Telegram and Android.

Configuration

Almost everything is configured in the admin panel. Environment variables set the defaults; the full list with comments is in .env.example (copy it to .env).

Main environment variables
Variable Default Description
PORT 3000 Server port
LIBRARY_ROOT /library Default books folder
SESSION_SECURE_COOKIE false true behind HTTPS
TRUST_PROXY false Proxy in front of the server: 1 — a single nginx / Caddy, loopback or a list of subnets
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, SMTP_FROM — Mail for sending to e-readers (or in the admin panel)
TELEGRAM_BOT_TOKEN — Telegram bot token (or in the admin panel)
SCAN_INTERVAL_HOURS 0 Rescan sources every N hours
FOLDER_WATCH 1 Watch folders and index new files
DOWNLOAD_MAX_CONCURRENT 4 How many books are prepared for download at once
PERF_PROFILE auto embedded for a NAS / low memory
CLUSTER_WORKERS 0 Number of processes (0 — one)
Large libraries and low-end hardware
  • Indexing and heavy recounts run in background threads — the server keeps responding during an import.
  • On devices with ≤ 2 GB of RAM a lean profile is used; the database cache is set in Admin → Dashboard → Maintenance → Database memory.
  • INPX builds with PPMd archives and WebP images are supported. For older e-readers, turn on Admin → Content → Books with WebP images (recode to PNG).
  • Added a second copy of the same collection? Run Admin → Duplicates → Auto-clean duplicates.
Troubleshooting
  • The server doesn't respond: curl -sS http://127.0.0.1:3000/health should return "ok":true.
  • The catalog is empty: is the source added and has indexing finished? In Docker, the source path is inside the container (/library, /sources/…).
  • «Archives not found» after an INPX import: the .zip / .7z archives must sit next to the .inpx; check the mount.
  • No EPUB / MOBI under «Download»: the converter is not installed — run install.cmd / install.sh again.
  • better-sqlite3 / NODE_MODULE_VERSION error: run install.cmd / install.sh again.
  • Forgot the admin password: reset-admin.cmd (Windows) or ./reset-admin.sh.
  • The server «freezes»: look for [perf] event loop stalled in data/runtime.log; response times are at /health/perf (signed in as an admin).

For developers

npm install
npm run dev      # restarts on changes
npm test

Node.js (ESM), Express, SQLite (better-sqlite3), vanilla JS / CSS without frameworks. Documentation (mostly in English): AGENTS.md (API for Android and project rules), docs/architecture (indexing, INPX, search, OPDS), docs/decisions. API errors carry a stable code field — clients should rely on it. Issues and pull requests in English are welcome.

Repository
inpx-library-server Server: index, web, OPDS, API (this repository)
inpx-book-reader Android app

License

MIT