Bookshelf: A Self-Hosted eBook Library Built for Object Storage
How Bookshelf Handles Different File Formats
A developer has launched Bookshelf, a self-hosted application designed to manage personal e Book collections using cloud object storage or local disk directories. The tool provides a single web interface for browsing, searching, downloading, and reading EPUB and PDF files directly in the browser. It runs as either a Node.js server or a Cloudflare Worker backed by R2 storage, offering flexibility in deployment. The project is open source and available on GitHub, with a live demo accessible via npm run demo.
Breaking news:
Bookshelf eliminates reliance on proprietary platforms by letting users host their own libraries on infrastructure they control. The interface renders a responsive bookshelf view where each title appears with cover art and metadata. Search functionality filters results in real time, while built-in readers handle EPUB and PDF formats without requiring external plugins. By leveraging object storage like Cloudflare R2, the system scales efficiently and reduces server load, as static assets are served directly from storage. The Node.js variant supports traditional hosting environments, making it accessible to users without edge computing experience.
Can You Use This With Existing e Book Collections?
The application includes two distinct readers: one for EPUB files that supports reflowable text and styling, and another for PDFs that preserves fixed-layout rendering. Both are implemented in JavaScript and run entirely in the browser, ensuring privacy since no file content is uploaded to a server during reading. Metadata extraction happens at scan time, allowing the library to sort by author, title, or date added. Users can add books by placing files in a monitored directory or uploading them via the interface when using the Node version.
Yes, Bookshelf is designed specifically for books users already own, whether purchased legally or obtained through other means. It does not include any content downloading or piracy tools; instead, it assumes users will populate their library with files they have the right to possess. The tool respects copyright by functioning purely as a local organizer and viewer. Deployment requires minimal setup: for the Worker version, users link an R2 bucket and configure a domain; for Node, they point the server to a local folder containing their e Books.
How does Bookshelf handle large libraries? Performance remains stable even with thousands of books, as indexing happens once and search uses client-side filtering with efficient JavaScript. Object storage backends like R2 are optimized for high-volume static asset delivery.
Frequently Asked Questions
Is an internet connection required to read books? Once the Bookshelf interface loads, reading EPUBs and PDFs works offline because all files are served from the same origin and cached by the browser. Only initial library loading requires connectivity.
Can I customize the appearance of the library? The interface uses CSS variables that can be overridden via custom stylesheets, allowing users to adjust fonts, colors, and layout to match their preferences without modifying core code.
More stories: